From f011b3cb22fc994f474c56de0818d98e6dba4baf Mon Sep 17 00:00:00 2001 From: Evghenii Date: Wed, 8 Jan 2014 11:46:36 +0100 Subject: [PATCH] added Error when varying variable is defined in global scope with nvptx target --- module.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/module.cpp b/module.cpp index 03c70910..4b3ad351 100644 --- a/module.cpp +++ b/module.cpp @@ -422,6 +422,13 @@ Module::AddGlobalVariable(const std::string &name, const Type *type, Expr *initE return; } + if (g->target->getISA() == Target::NVPTX && + type->IsVaryingType()) + { + Error(pos, "Global \"varying\" variables are not yet supported in \"nvptx\" target."); + return; + } + if (Type::Equal(type, AtomicType::Void)) { Error(pos, "\"void\" type global variable is illegal."); return;