Merge remote-tracking branch 'aosp/master-ndk' into shader-tools
diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp
index 49bb0a1..15af947 100755
--- a/SPIRV/GlslangToSpv.cpp
+++ b/SPIRV/GlslangToSpv.cpp
@@ -99,7 +99,7 @@
 class TGlslangToSpvTraverser : public glslang::TIntermTraverser {
 public:
     TGlslangToSpvTraverser(const glslang::TIntermediate*, spv::SpvBuildLogger* logger);
-    virtual ~TGlslangToSpvTraverser();
+    virtual ~TGlslangToSpvTraverser() { }
 
     bool visitAggregate(glslang::TVisit, glslang::TIntermAggregate*);
     bool visitBinary(glslang::TVisit, glslang::TIntermBinary*);
@@ -111,6 +111,7 @@
     bool visitLoop(glslang::TVisit, glslang::TIntermLoop*);
     bool visitBranch(glslang::TVisit visit, glslang::TIntermBranch*);
 
+    void finishSpv();
     void dumpSpv(std::vector<unsigned int>& out);
 
 protected:
@@ -181,8 +182,8 @@
 
     // There is a 1:1 mapping between a spv builder and a module; this is thread safe
     spv::Builder builder;
-    bool inMain;
-    bool mainTerminated;
+    bool inEntryPoint;
+    bool entryPointTerminated;
     bool linkageOnly;                  // true when visiting the set of objects in the AST present only for establishing interface, whether or not they were statically used
     std::set<spv::Id> iOSet;           // all input/output variables from either static use or declaration of interface
     const glslang::TIntermediate* glslangIntermediate;
@@ -768,7 +769,7 @@
     : TIntermTraverser(true, false, true), shaderEntry(nullptr), currentFunction(nullptr),
       sequenceDepth(0), logger(buildLogger),
       builder((glslang::GetKhronosToolId() << 16) | GeneratorVersion, logger),
-      inMain(false), mainTerminated(false), linkageOnly(false),
+      inEntryPoint(false), entryPointTerminated(false), linkageOnly(false),
       glslangIntermediate(glslangIntermediate)
 {
     spv::ExecutionModel executionModel = TranslateExecutionModel(glslangIntermediate->getStage());
@@ -896,27 +897,27 @@
     default:
         break;
     }
-
 }
 
-// Finish everything and dump
-void TGlslangToSpvTraverser::dumpSpv(std::vector<unsigned int>& out)
+// Finish creating SPV, after the traversal is complete.
+void TGlslangToSpvTraverser::finishSpv()
 {
+    if (! entryPointTerminated) {
+        builder.setBuildPoint(shaderEntry->getLastBlock());
+        builder.leaveFunction();
+    }
+
     // finish off the entry-point SPV instruction by adding the Input/Output <id>
     for (auto it = iOSet.cbegin(); it != iOSet.cend(); ++it)
         entryPoint->addIdOperand(*it);
 
     builder.eliminateDeadDecorations();
-    builder.dump(out);
 }
 
-TGlslangToSpvTraverser::~TGlslangToSpvTraverser()
+// Write the SPV into 'out'.
+void TGlslangToSpvTraverser::dumpSpv(std::vector<unsigned int>& out)
 {
-    if (! mainTerminated) {
-        spv::Block* lastMainBlock = shaderEntry->getLastBlock();
-        builder.setBuildPoint(lastMainBlock);
-        builder.leaveFunction();
-    }
+    builder.dump(out);
 }
 
 //
@@ -1351,7 +1352,7 @@
             // anything else gets there, so visit out of order, doing them all now.
             makeGlobalInitializers(node->getAsAggregate()->getSequence());
 
-            // Initializers are done, don't want to visit again, but functions link objects need to be processed,
+            // Initializers are done, don't want to visit again, but functions and link objects need to be processed,
             // so do them manually.
             visitFunctions(node->getAsAggregate()->getSequence());
 
@@ -1382,17 +1383,17 @@
     case glslang::EOpFunction:
         if (visit == glslang::EvPreVisit) {
             if (isShaderEntryPoint(node)) {
-                inMain = true;
+                inEntryPoint = true;
                 builder.setBuildPoint(shaderEntry->getLastBlock());
                 currentFunction = shaderEntry;
             } else {
                 handleFunctionEntry(node);
             }
         } else {
-            if (inMain)
-                mainTerminated = true;
+            if (inEntryPoint)
+                entryPointTerminated = true;
             builder.leaveFunction();
-            inMain = false;
+            inEntryPoint = false;
         }
 
         return true;
@@ -2633,7 +2634,7 @@
 {
     for (int f = 0; f < (int)glslFunctions.size(); ++f) {
         glslang::TIntermAggregate* node = glslFunctions[f]->getAsAggregate();
-        if (node && (node->getOp() == glslang::EOpFunction || node->getOp() == glslang ::EOpLinkerObjects))
+        if (node && (node->getOp() == glslang::EOpFunction || node->getOp() == glslang::EOpLinkerObjects))
             node->traverse(this);
     }
 }
@@ -4118,11 +4119,9 @@
 // Create group invocation operations.
 spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy)
 {
-    bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64;
 #ifdef AMD_EXTENSIONS
+    bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64;
     bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble || typeProxy == glslang::EbtFloat16;
-#else
-    bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble;
 #endif
 
     spv::Op opCode = spv::OpNop;
@@ -4133,10 +4132,12 @@
         builder.addCapability(spv::CapabilitySubgroupBallotKHR);
     } else {
         builder.addCapability(spv::CapabilityGroups);
+#ifdef AMD_EXTENSIONS
         if (op == glslang::EOpMinInvocationsNonUniform ||
             op == glslang::EOpMaxInvocationsNonUniform ||
             op == glslang::EOpAddInvocationsNonUniform)
             builder.addExtension(spv::E_SPV_AMD_shader_ballot);
+#endif
 
         spvGroupOperands.push_back(builder.makeUintConstant(spv::ScopeSubgroup));
 #ifdef AMD_EXTENSIONS
@@ -4597,7 +4598,7 @@
         builder.createNoResultOp(spv::OpEndPrimitive);
         return 0;
     case glslang::EOpBarrier:
-        builder.createControlBarrier(spv::ScopeDevice, spv::ScopeDevice, spv::MemorySemanticsMaskNone);
+        builder.createControlBarrier(spv::ScopeWorkgroup, spv::ScopeDevice, spv::MemorySemanticsMaskNone);
         return 0;
     case glslang::EOpMemoryBarrier:
         builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsAllMemory);
@@ -5120,9 +5121,8 @@
     glslang::GetThreadPoolAllocator().push();
 
     TGlslangToSpvTraverser it(&intermediate, logger);
-
     root->traverse(&it);
-
+    it.finishSpv();
     it.dumpSpv(spirv);
 
     glslang::GetThreadPoolAllocator().pop();
diff --git a/SPIRV/GlslangToSpv.h b/SPIRV/GlslangToSpv.h
index 97b280c..428cfb6 100644
--- a/SPIRV/GlslangToSpv.h
+++ b/SPIRV/GlslangToSpv.h
@@ -32,6 +32,10 @@
 //ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 //POSSIBILITY OF SUCH DAMAGE.
 
+#if _MSC_VER >= 1900
+    #pragma warning(disable : 4464) // relative include path contains '..'
+#endif
+
 #include "../glslang/Include/intermediate.h"
 
 #include <string>
diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp
index 4703edc..04b0f04 100644
--- a/SPIRV/SpvBuilder.cpp
+++ b/SPIRV/SpvBuilder.cpp
@@ -64,7 +64,7 @@
     builderNumber(magicNumber),
     buildPoint(0),
     uniqueId(0),
-    mainFunction(0),
+    entryPointFunction(0),
     generatingOpCodeForSpecConst(false),
     logger(buildLogger)
 {
@@ -967,15 +967,15 @@
 // Comments in header
 Function* Builder::makeEntryPoint(const char* entryPoint)
 {
-    assert(! mainFunction);
+    assert(! entryPointFunction);
 
     Block* entry;
     std::vector<Id> params;
     std::vector<Decoration> precisions;
 
-    mainFunction = makeFunctionEntry(NoPrecision, makeVoidType(), entryPoint, params, precisions, &entry);
+    entryPointFunction = makeFunctionEntry(NoPrecision, makeVoidType(), entryPoint, params, precisions, &entry);
 
-    return mainFunction;
+    return entryPointFunction;
 }
 
 // Comments in header
diff --git a/SPIRV/SpvBuilder.h b/SPIRV/SpvBuilder.h
index 0e8d9ca..e8524b2 100755
--- a/SPIRV/SpvBuilder.h
+++ b/SPIRV/SpvBuilder.h
@@ -564,7 +564,7 @@
     Module module;
     Block* buildPoint;
     Id uniqueId;
-    Function* mainFunction;
+    Function* entryPointFunction;
     bool generatingOpCodeForSpecConst;
     AccessChain accessChain;
 
diff --git a/StandAlone/ResourceLimits.cpp b/StandAlone/ResourceLimits.cpp
index 8a5e6f3..e22ec80 100644
--- a/StandAlone/ResourceLimits.cpp
+++ b/StandAlone/ResourceLimits.cpp
@@ -35,6 +35,7 @@
 #include <cstdlib>
 #include <cstring>
 #include <sstream>
+#include <cctype>
 
 #include "ResourceLimits.h"
 
@@ -240,208 +241,217 @@
 
 void DecodeResourceLimits(TBuiltInResource* resources, char* config)
 {
-    const char* delims = " \t\n\r";
-#pragma warning(suppress: 4996)
-    const char* token = strtok(config, delims);
-    while (token) {
-#pragma warning(suppress: 4996)
-        const char* valueStr = strtok(0, delims);
-        if (valueStr == 0 || ! (valueStr[0] == '-' || (valueStr[0] >= '0' && valueStr[0] <= '9'))) {
-            printf("Error: '%s' bad .conf file.  Each name must be followed by one number.\n", valueStr ? valueStr : "");
+    static const char* delims = " \t\n\r";
+
+    size_t pos     = 0;
+    std::string configStr(config);
+
+    while ((pos = configStr.find_first_not_of(delims, pos)) != std::string::npos) {
+        const size_t token_s = pos;
+        const size_t token_e = configStr.find_first_of(delims, token_s);
+        const size_t value_s = configStr.find_first_not_of(delims, token_e);
+        const size_t value_e = configStr.find_first_of(delims, value_s);
+        pos = value_e;
+
+        // Faster to use compare(), but prefering readability.
+        const std::string tokenStr = configStr.substr(token_s, token_e-token_s);
+        const std::string valueStr = configStr.substr(value_s, value_e-value_s);
+
+        if (value_s == std::string::npos || ! (valueStr[0] == '-' || isdigit(valueStr[0]))) {
+            printf("Error: '%s' bad .conf file.  Each name must be followed by one number.\n",
+                   valueStr.c_str());
             return;
         }
-        int value = atoi(valueStr);
 
-        if (strcmp(token, "MaxLights") == 0)
+        const int value = std::atoi(valueStr.c_str());
+
+        if (tokenStr == "MaxLights")
             resources->maxLights = value;
-        else if (strcmp(token, "MaxClipPlanes") == 0)
+        else if (tokenStr == "MaxClipPlanes")
             resources->maxClipPlanes = value;
-        else if (strcmp(token, "MaxTextureUnits") == 0)
+        else if (tokenStr == "MaxTextureUnits")
             resources->maxTextureUnits = value;
-        else if (strcmp(token, "MaxTextureCoords") == 0)
+        else if (tokenStr == "MaxTextureCoords")
             resources->maxTextureCoords = value;
-        else if (strcmp(token, "MaxVertexAttribs") == 0)
+        else if (tokenStr == "MaxVertexAttribs")
             resources->maxVertexAttribs = value;
-        else if (strcmp(token, "MaxVertexUniformComponents") == 0)
+        else if (tokenStr == "MaxVertexUniformComponents")
             resources->maxVertexUniformComponents = value;
-        else if (strcmp(token, "MaxVaryingFloats") == 0)
+        else if (tokenStr == "MaxVaryingFloats")
             resources->maxVaryingFloats = value;
-        else if (strcmp(token, "MaxVertexTextureImageUnits") == 0)
+        else if (tokenStr == "MaxVertexTextureImageUnits")
             resources->maxVertexTextureImageUnits = value;
-        else if (strcmp(token, "MaxCombinedTextureImageUnits") == 0)
+        else if (tokenStr == "MaxCombinedTextureImageUnits")
             resources->maxCombinedTextureImageUnits = value;
-        else if (strcmp(token, "MaxTextureImageUnits") == 0)
+        else if (tokenStr == "MaxTextureImageUnits")
             resources->maxTextureImageUnits = value;
-        else if (strcmp(token, "MaxFragmentUniformComponents") == 0)
+        else if (tokenStr == "MaxFragmentUniformComponents")
             resources->maxFragmentUniformComponents = value;
-        else if (strcmp(token, "MaxDrawBuffers") == 0)
+        else if (tokenStr == "MaxDrawBuffers")
             resources->maxDrawBuffers = value;
-        else if (strcmp(token, "MaxVertexUniformVectors") == 0)
+        else if (tokenStr == "MaxVertexUniformVectors")
             resources->maxVertexUniformVectors = value;
-        else if (strcmp(token, "MaxVaryingVectors") == 0)
+        else if (tokenStr == "MaxVaryingVectors")
             resources->maxVaryingVectors = value;
-        else if (strcmp(token, "MaxFragmentUniformVectors") == 0)
+        else if (tokenStr == "MaxFragmentUniformVectors")
             resources->maxFragmentUniformVectors = value;
-        else if (strcmp(token, "MaxVertexOutputVectors") == 0)
+        else if (tokenStr == "MaxVertexOutputVectors")
             resources->maxVertexOutputVectors = value;
-        else if (strcmp(token, "MaxFragmentInputVectors") == 0)
+        else if (tokenStr == "MaxFragmentInputVectors")
             resources->maxFragmentInputVectors = value;
-        else if (strcmp(token, "MinProgramTexelOffset") == 0)
+        else if (tokenStr == "MinProgramTexelOffset")
             resources->minProgramTexelOffset = value;
-        else if (strcmp(token, "MaxProgramTexelOffset") == 0)
+        else if (tokenStr == "MaxProgramTexelOffset")
             resources->maxProgramTexelOffset = value;
-        else if (strcmp(token, "MaxClipDistances") == 0)
+        else if (tokenStr == "MaxClipDistances")
             resources->maxClipDistances = value;
-        else if (strcmp(token, "MaxComputeWorkGroupCountX") == 0)
+        else if (tokenStr == "MaxComputeWorkGroupCountX")
             resources->maxComputeWorkGroupCountX = value;
-        else if (strcmp(token, "MaxComputeWorkGroupCountY") == 0)
+        else if (tokenStr == "MaxComputeWorkGroupCountY")
             resources->maxComputeWorkGroupCountY = value;
-        else if (strcmp(token, "MaxComputeWorkGroupCountZ") == 0)
+        else if (tokenStr == "MaxComputeWorkGroupCountZ")
             resources->maxComputeWorkGroupCountZ = value;
-        else if (strcmp(token, "MaxComputeWorkGroupSizeX") == 0)
+        else if (tokenStr == "MaxComputeWorkGroupSizeX")
             resources->maxComputeWorkGroupSizeX = value;
-        else if (strcmp(token, "MaxComputeWorkGroupSizeY") == 0)
+        else if (tokenStr == "MaxComputeWorkGroupSizeY")
             resources->maxComputeWorkGroupSizeY = value;
-        else if (strcmp(token, "MaxComputeWorkGroupSizeZ") == 0)
+        else if (tokenStr == "MaxComputeWorkGroupSizeZ")
             resources->maxComputeWorkGroupSizeZ = value;
-        else if (strcmp(token, "MaxComputeUniformComponents") == 0)
+        else if (tokenStr == "MaxComputeUniformComponents")
             resources->maxComputeUniformComponents = value;
-        else if (strcmp(token, "MaxComputeTextureImageUnits") == 0)
+        else if (tokenStr == "MaxComputeTextureImageUnits")
             resources->maxComputeTextureImageUnits = value;
-        else if (strcmp(token, "MaxComputeImageUniforms") == 0)
+        else if (tokenStr == "MaxComputeImageUniforms")
             resources->maxComputeImageUniforms = value;
-        else if (strcmp(token, "MaxComputeAtomicCounters") == 0)
+        else if (tokenStr == "MaxComputeAtomicCounters")
             resources->maxComputeAtomicCounters = value;
-        else if (strcmp(token, "MaxComputeAtomicCounterBuffers") == 0)
+        else if (tokenStr == "MaxComputeAtomicCounterBuffers")
             resources->maxComputeAtomicCounterBuffers = value;
-        else if (strcmp(token, "MaxVaryingComponents") == 0)
+        else if (tokenStr == "MaxVaryingComponents")
             resources->maxVaryingComponents = value;
-        else if (strcmp(token, "MaxVertexOutputComponents") == 0)
+        else if (tokenStr == "MaxVertexOutputComponents")
             resources->maxVertexOutputComponents = value;
-        else if (strcmp(token, "MaxGeometryInputComponents") == 0)
+        else if (tokenStr == "MaxGeometryInputComponents")
             resources->maxGeometryInputComponents = value;
-        else if (strcmp(token, "MaxGeometryOutputComponents") == 0)
+        else if (tokenStr == "MaxGeometryOutputComponents")
             resources->maxGeometryOutputComponents = value;
-        else if (strcmp(token, "MaxFragmentInputComponents") == 0)
+        else if (tokenStr == "MaxFragmentInputComponents")
             resources->maxFragmentInputComponents = value;
-        else if (strcmp(token, "MaxImageUnits") == 0)
+        else if (tokenStr == "MaxImageUnits")
             resources->maxImageUnits = value;
-        else if (strcmp(token, "MaxCombinedImageUnitsAndFragmentOutputs") == 0)
+        else if (tokenStr == "MaxCombinedImageUnitsAndFragmentOutputs")
             resources->maxCombinedImageUnitsAndFragmentOutputs = value;
-        else if (strcmp(token, "MaxCombinedShaderOutputResources") == 0)
+        else if (tokenStr == "MaxCombinedShaderOutputResources")
             resources->maxCombinedShaderOutputResources = value;
-        else if (strcmp(token, "MaxImageSamples") == 0)
+        else if (tokenStr == "MaxImageSamples")
             resources->maxImageSamples = value;
-        else if (strcmp(token, "MaxVertexImageUniforms") == 0)
+        else if (tokenStr == "MaxVertexImageUniforms")
             resources->maxVertexImageUniforms = value;
-        else if (strcmp(token, "MaxTessControlImageUniforms") == 0)
+        else if (tokenStr == "MaxTessControlImageUniforms")
             resources->maxTessControlImageUniforms = value;
-        else if (strcmp(token, "MaxTessEvaluationImageUniforms") == 0)
+        else if (tokenStr == "MaxTessEvaluationImageUniforms")
             resources->maxTessEvaluationImageUniforms = value;
-        else if (strcmp(token, "MaxGeometryImageUniforms") == 0)
+        else if (tokenStr == "MaxGeometryImageUniforms")
             resources->maxGeometryImageUniforms = value;
-        else if (strcmp(token, "MaxFragmentImageUniforms") == 0)
+        else if (tokenStr == "MaxFragmentImageUniforms")
             resources->maxFragmentImageUniforms = value;
-        else if (strcmp(token, "MaxCombinedImageUniforms") == 0)
+        else if (tokenStr == "MaxCombinedImageUniforms")
             resources->maxCombinedImageUniforms = value;
-        else if (strcmp(token, "MaxGeometryTextureImageUnits") == 0)
+        else if (tokenStr == "MaxGeometryTextureImageUnits")
             resources->maxGeometryTextureImageUnits = value;
-        else if (strcmp(token, "MaxGeometryOutputVertices") == 0)
+        else if (tokenStr == "MaxGeometryOutputVertices")
             resources->maxGeometryOutputVertices = value;
-        else if (strcmp(token, "MaxGeometryTotalOutputComponents") == 0)
+        else if (tokenStr == "MaxGeometryTotalOutputComponents")
             resources->maxGeometryTotalOutputComponents = value;
-        else if (strcmp(token, "MaxGeometryUniformComponents") == 0)
+        else if (tokenStr == "MaxGeometryUniformComponents")
             resources->maxGeometryUniformComponents = value;
-        else if (strcmp(token, "MaxGeometryVaryingComponents") == 0)
+        else if (tokenStr == "MaxGeometryVaryingComponents")
             resources->maxGeometryVaryingComponents = value;
-        else if (strcmp(token, "MaxTessControlInputComponents") == 0)
+        else if (tokenStr == "MaxTessControlInputComponents")
             resources->maxTessControlInputComponents = value;
-        else if (strcmp(token, "MaxTessControlOutputComponents") == 0)
+        else if (tokenStr == "MaxTessControlOutputComponents")
             resources->maxTessControlOutputComponents = value;
-        else if (strcmp(token, "MaxTessControlTextureImageUnits") == 0)
+        else if (tokenStr == "MaxTessControlTextureImageUnits")
             resources->maxTessControlTextureImageUnits = value;
-        else if (strcmp(token, "MaxTessControlUniformComponents") == 0)
+        else if (tokenStr == "MaxTessControlUniformComponents")
             resources->maxTessControlUniformComponents = value;
-        else if (strcmp(token, "MaxTessControlTotalOutputComponents") == 0)
+        else if (tokenStr == "MaxTessControlTotalOutputComponents")
             resources->maxTessControlTotalOutputComponents = value;
-        else if (strcmp(token, "MaxTessEvaluationInputComponents") == 0)
+        else if (tokenStr == "MaxTessEvaluationInputComponents")
             resources->maxTessEvaluationInputComponents = value;
-        else if (strcmp(token, "MaxTessEvaluationOutputComponents") == 0)
+        else if (tokenStr == "MaxTessEvaluationOutputComponents")
             resources->maxTessEvaluationOutputComponents = value;
-        else if (strcmp(token, "MaxTessEvaluationTextureImageUnits") == 0)
+        else if (tokenStr == "MaxTessEvaluationTextureImageUnits")
             resources->maxTessEvaluationTextureImageUnits = value;
-        else if (strcmp(token, "MaxTessEvaluationUniformComponents") == 0)
+        else if (tokenStr == "MaxTessEvaluationUniformComponents")
             resources->maxTessEvaluationUniformComponents = value;
-        else if (strcmp(token, "MaxTessPatchComponents") == 0)
+        else if (tokenStr == "MaxTessPatchComponents")
             resources->maxTessPatchComponents = value;
-        else if (strcmp(token, "MaxPatchVertices") == 0)
+        else if (tokenStr == "MaxPatchVertices")
             resources->maxPatchVertices = value;
-        else if (strcmp(token, "MaxTessGenLevel") == 0)
+        else if (tokenStr == "MaxTessGenLevel")
             resources->maxTessGenLevel = value;
-        else if (strcmp(token, "MaxViewports") == 0)
+        else if (tokenStr == "MaxViewports")
             resources->maxViewports = value;
-        else if (strcmp(token, "MaxVertexAtomicCounters") == 0)
+        else if (tokenStr == "MaxVertexAtomicCounters")
             resources->maxVertexAtomicCounters = value;
-        else if (strcmp(token, "MaxTessControlAtomicCounters") == 0)
+        else if (tokenStr == "MaxTessControlAtomicCounters")
             resources->maxTessControlAtomicCounters = value;
-        else if (strcmp(token, "MaxTessEvaluationAtomicCounters") == 0)
+        else if (tokenStr == "MaxTessEvaluationAtomicCounters")
             resources->maxTessEvaluationAtomicCounters = value;
-        else if (strcmp(token, "MaxGeometryAtomicCounters") == 0)
+        else if (tokenStr == "MaxGeometryAtomicCounters")
             resources->maxGeometryAtomicCounters = value;
-        else if (strcmp(token, "MaxFragmentAtomicCounters") == 0)
+        else if (tokenStr == "MaxFragmentAtomicCounters")
             resources->maxFragmentAtomicCounters = value;
-        else if (strcmp(token, "MaxCombinedAtomicCounters") == 0)
+        else if (tokenStr == "MaxCombinedAtomicCounters")
             resources->maxCombinedAtomicCounters = value;
-        else if (strcmp(token, "MaxAtomicCounterBindings") == 0)
+        else if (tokenStr == "MaxAtomicCounterBindings")
             resources->maxAtomicCounterBindings = value;
-        else if (strcmp(token, "MaxVertexAtomicCounterBuffers") == 0)
+        else if (tokenStr == "MaxVertexAtomicCounterBuffers")
             resources->maxVertexAtomicCounterBuffers = value;
-        else if (strcmp(token, "MaxTessControlAtomicCounterBuffers") == 0)
+        else if (tokenStr == "MaxTessControlAtomicCounterBuffers")
             resources->maxTessControlAtomicCounterBuffers = value;
-        else if (strcmp(token, "MaxTessEvaluationAtomicCounterBuffers") == 0)
+        else if (tokenStr == "MaxTessEvaluationAtomicCounterBuffers")
             resources->maxTessEvaluationAtomicCounterBuffers = value;
-        else if (strcmp(token, "MaxGeometryAtomicCounterBuffers") == 0)
+        else if (tokenStr == "MaxGeometryAtomicCounterBuffers")
             resources->maxGeometryAtomicCounterBuffers = value;
-        else if (strcmp(token, "MaxFragmentAtomicCounterBuffers") == 0)
+        else if (tokenStr == "MaxFragmentAtomicCounterBuffers")
             resources->maxFragmentAtomicCounterBuffers = value;
-        else if (strcmp(token, "MaxCombinedAtomicCounterBuffers") == 0)
+        else if (tokenStr == "MaxCombinedAtomicCounterBuffers")
             resources->maxCombinedAtomicCounterBuffers = value;
-        else if (strcmp(token, "MaxAtomicCounterBufferSize") == 0)
+        else if (tokenStr == "MaxAtomicCounterBufferSize")
             resources->maxAtomicCounterBufferSize = value;
-        else if (strcmp(token, "MaxTransformFeedbackBuffers") == 0)
+        else if (tokenStr == "MaxTransformFeedbackBuffers")
             resources->maxTransformFeedbackBuffers = value;
-        else if (strcmp(token, "MaxTransformFeedbackInterleavedComponents") == 0)
+        else if (tokenStr == "MaxTransformFeedbackInterleavedComponents")
             resources->maxTransformFeedbackInterleavedComponents = value;
-        else if (strcmp(token, "MaxCullDistances") == 0)
+        else if (tokenStr == "MaxCullDistances")
             resources->maxCullDistances = value;
-        else if (strcmp(token, "MaxCombinedClipAndCullDistances") == 0)
+        else if (tokenStr == "MaxCombinedClipAndCullDistances")
             resources->maxCombinedClipAndCullDistances = value;
-        else if (strcmp(token, "MaxSamples") == 0)
+        else if (tokenStr == "MaxSamples")
             resources->maxSamples = value;
-
-        else if (strcmp(token, "nonInductiveForLoops") == 0)
+        else if (tokenStr == "nonInductiveForLoops")
             resources->limits.nonInductiveForLoops = (value != 0);
-        else if (strcmp(token, "whileLoops") == 0)
+        else if (tokenStr == "whileLoops")
             resources->limits.whileLoops = (value != 0);
-        else if (strcmp(token, "doWhileLoops") == 0)
+        else if (tokenStr == "doWhileLoops")
             resources->limits.doWhileLoops = (value != 0);
-        else if (strcmp(token, "generalUniformIndexing") == 0)
+        else if (tokenStr == "generalUniformIndexing")
             resources->limits.generalUniformIndexing = (value != 0);
-        else if (strcmp(token, "generalAttributeMatrixVectorIndexing") == 0)
+        else if (tokenStr == "generalAttributeMatrixVectorIndexing")
             resources->limits.generalAttributeMatrixVectorIndexing = (value != 0);
-        else if (strcmp(token, "generalVaryingIndexing") == 0)
+        else if (tokenStr == "generalVaryingIndexing")
             resources->limits.generalVaryingIndexing = (value != 0);
-        else if (strcmp(token, "generalSamplerIndexing") == 0)
+        else if (tokenStr == "generalSamplerIndexing")
             resources->limits.generalSamplerIndexing = (value != 0);
-        else if (strcmp(token, "generalVariableIndexing") == 0)
+        else if (tokenStr == "generalVariableIndexing")
             resources->limits.generalVariableIndexing = (value != 0);
-        else if (strcmp(token, "generalConstantMatrixVectorIndexing") == 0)
+        else if (tokenStr == "generalConstantMatrixVectorIndexing")
             resources->limits.generalConstantMatrixVectorIndexing = (value != 0);
         else
-            printf("Warning: unrecognized limit (%s) in configuration file.\n", token);
+            printf("Warning: unrecognized limit (%s) in configuration file.\n", tokenStr.c_str());
 
-#pragma warning(suppress: 4996)
-        token = strtok(0, delims);
     }
 }
 
diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp
index 0ac72d3..d40673c 100644
--- a/StandAlone/StandAlone.cpp
+++ b/StandAlone/StandAlone.cpp
@@ -60,29 +60,30 @@
 
 // Command-line options
 enum TOptions {
-    EOptionNone               = 0,
-    EOptionIntermediate       = (1 <<  0),
-    EOptionSuppressInfolog    = (1 <<  1),
-    EOptionMemoryLeakMode     = (1 <<  2),
-    EOptionRelaxedErrors      = (1 <<  3),
-    EOptionGiveWarnings       = (1 <<  4),
-    EOptionLinkProgram        = (1 <<  5),
-    EOptionMultiThreaded      = (1 <<  6),
-    EOptionDumpConfig         = (1 <<  7),
-    EOptionDumpReflection     = (1 <<  8),
-    EOptionSuppressWarnings   = (1 <<  9),
-    EOptionDumpVersions       = (1 << 10),
-    EOptionSpv                = (1 << 11),
-    EOptionHumanReadableSpv   = (1 << 12),
-    EOptionVulkanRules        = (1 << 13),
-    EOptionDefaultDesktop     = (1 << 14),
-    EOptionOutputPreprocessed = (1 << 15),
-    EOptionOutputHexadecimal  = (1 << 16),
-    EOptionReadHlsl           = (1 << 17),
-    EOptionCascadingErrors    = (1 << 18),
-    EOptionAutoMapBindings    = (1 << 19),
+    EOptionNone                 = 0,
+    EOptionIntermediate         = (1 <<  0),
+    EOptionSuppressInfolog      = (1 <<  1),
+    EOptionMemoryLeakMode       = (1 <<  2),
+    EOptionRelaxedErrors        = (1 <<  3),
+    EOptionGiveWarnings         = (1 <<  4),
+    EOptionLinkProgram          = (1 <<  5),
+    EOptionMultiThreaded        = (1 <<  6),
+    EOptionDumpConfig           = (1 <<  7),
+    EOptionDumpReflection       = (1 <<  8),
+    EOptionSuppressWarnings     = (1 <<  9),
+    EOptionDumpVersions         = (1 << 10),
+    EOptionSpv                  = (1 << 11),
+    EOptionHumanReadableSpv     = (1 << 12),
+    EOptionVulkanRules          = (1 << 13),
+    EOptionDefaultDesktop       = (1 << 14),
+    EOptionOutputPreprocessed   = (1 << 15),
+    EOptionOutputHexadecimal    = (1 << 16),
+    EOptionReadHlsl             = (1 << 17),
+    EOptionCascadingErrors      = (1 << 18),
+    EOptionAutoMapBindings      = (1 << 19),
     EOptionFlattenUniformArrays = (1 << 20),
-    EOptionNoStorageFormat    = (1 << 21),
+    EOptionNoStorageFormat      = (1 << 21),
+    EOptionKeepUncalled         = (1 << 22),
 };
 
 //
@@ -160,10 +161,12 @@
 const char* ExecutableName = nullptr;
 const char* binaryFileName = nullptr;
 const char* entryPointName = nullptr;
+const char* sourceEntryPointName = nullptr;
 const char* shaderStageName = nullptr;
 
 std::array<unsigned int, EShLangCount> baseSamplerBinding;
 std::array<unsigned int, EShLangCount> baseTextureBinding;
+std::array<unsigned int, EShLangCount> baseImageBinding;
 std::array<unsigned int, EShLangCount> baseUboBinding;
 
 //
@@ -252,6 +255,7 @@
 {
     baseSamplerBinding.fill(0);
     baseTextureBinding.fill(0);
+    baseImageBinding.fill(0);
     baseUboBinding.fill(0);
 
     ExecutableName = argv[0];
@@ -279,6 +283,10 @@
                                lowerword == "shift-texture-binding"  ||
                                lowerword == "stb") {
                         ProcessBindingBase(argc, argv, baseTextureBinding);
+                    } else if (lowerword == "shift-image-bindings" ||  // synonyms
+                               lowerword == "shift-image-binding"  ||
+                               lowerword == "sib") {
+                        ProcessBindingBase(argc, argv, baseImageBinding);
                     } else if (lowerword == "shift-ubo-bindings" ||  // synonyms
                                lowerword == "shift-ubo-binding"  ||
                                lowerword == "sub") {
@@ -294,6 +302,18 @@
                     } else if (lowerword == "no-storage-format" || // synonyms
                                lowerword == "nsf") {
                         Options |= EOptionNoStorageFormat;
+                    } else if (lowerword == "source-entrypoint" || // synonyms
+                               lowerword == "sep") {
+                        sourceEntryPointName = argv[1];
+                        if (argc > 0) {
+                            argc--;
+                            argv++;
+                        } else
+                            Error("no <entry-point> provided for --source-entrypoint");
+                        break;
+                    } else if (lowerword == "keep-uncalled" || // synonyms
+                               lowerword == "ku") {
+                        Options |= EOptionKeepUncalled;
                     } else {
                         usage();
                     }
@@ -443,6 +463,8 @@
         messages = (EShMessages)(messages | EShMsgReadHlsl);
     if (Options & EOptionCascadingErrors)
         messages = (EShMessages)(messages | EShMsgCascadingErrors);
+    if (Options & EOptionKeepUncalled)
+        messages = (EShMessages)(messages | EShMsgKeepUncalled);
 }
 
 //
@@ -541,9 +563,12 @@
         shader->setStringsWithLengthsAndNames(compUnit.text, NULL, compUnit.fileNameList, 1);
         if (entryPointName) // HLSL todo: this needs to be tracked per compUnits
             shader->setEntryPoint(entryPointName);
+        if (sourceEntryPointName)
+            shader->setSourceEntryPoint(sourceEntryPointName);
 
         shader->setShiftSamplerBinding(baseSamplerBinding[compUnit.stage]);
         shader->setShiftTextureBinding(baseTextureBinding[compUnit.stage]);
+        shader->setShiftImageBinding(baseImageBinding[compUnit.stage]);
         shader->setShiftUboBinding(baseUboBinding[compUnit.stage]);
         shader->setFlattenUniformArrays((Options & EOptionFlattenUniformArrays) != 0);
         shader->setNoStorageFormat((Options & EOptionNoStorageFormat) != 0);
@@ -941,6 +966,9 @@
            "  --shift-texture-binding [stage] num     set base binding number for textures\n"
            "  --stb [stage] num                       synonym for --shift-texture-binding\n"
            "\n"
+           "  --shift-image-binding [stage] num       set base binding number for images (uav)\n"
+           "  --sib [stage] num                       synonym for --shift-image-binding\n"
+           "\n"
            "  --shift-UBO-binding [stage] num         set base binding number for UBOs\n"
            "  --sub [stage] num                       synonym for --shift-UBO-binding\n"
            "\n"
@@ -953,6 +981,12 @@
            "\n"
            "  --no-storage-format                     use Unknown image format\n"
            "  --nsf                                   synonym for --no-storage-format\n"
+           "\n"
+           "  --source-entrypoint name                the given shader source function is renamed to be the entry point given in -e\n"
+           "  --sep                                   synonym for --source-entrypoint\n"
+           "\n"
+           "  --keep-uncalled                         don't eliminate uncalled functions when linking\n"
+           "  --ku                                    synonym for --keep-uncalled\n"
            );
 
     exit(EFailUsage);
diff --git a/Test/baseResults/100.frag.out b/Test/baseResults/100.frag.out
index edd65ab..42635d3 100644
--- a/Test/baseResults/100.frag.out
+++ b/Test/baseResults/100.frag.out
@@ -393,13 +393,13 @@
 0:?     'a' (global 3-element array of mediump int)
 0:?     'uint' (global mediump int)
 0:?     'v' (smooth in 3-element array of mediump 4-component vector of float)
-0:?     'f' (global mediump float)
+0:?     'f' (invariant global mediump float)
 0:?     'anon@0' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump int x})
 0:?     'fa' (global implicitly-sized array of mediump float)
-0:?     'f13' (global mediump float)
+0:?     'f13' (invariant global mediump float)
 0:?     'fi' (invariant temp mediump float)
-0:?     'av' (smooth in mediump 4-component vector of float)
-0:?     'uv2' (uniform mediump 2-component vector of float)
+0:?     'av' (invariant smooth in mediump 4-component vector of float)
+0:?     'uv2' (invariant uniform mediump 2-component vector of float)
 0:?     'uv3' (invariant uniform mediump 3-component vector of float)
 0:?     'glob2D' (global lowp sampler2D)
 0:?     'vary2D' (smooth in lowp sampler2D)
@@ -507,123 +507,6 @@
 0:38          's2' (temp structure{temp mediump float f, temp 10-element array of mediump float a})
 0:38        true case is null
 0:40      'b' (temp mediump int)
-0:54  Function Definition: foo10( (global void)
-0:54    Function Parameters: 
-0:67  Function Definition: f11(s21; (global void)
-0:67    Function Parameters: 
-0:67      'p2d' (in lowp sampler2D)
-0:87  Function Definition: foo234( (global void)
-0:87    Function Parameters: 
-0:89    Sequence
-0:89      texture (global highp 4-component vector of float)
-0:89        's3D2' (uniform highp sampler3D)
-0:89        Constant:
-0:89          0.200000
-0:89          0.200000
-0:89          0.200000
-0:89        Constant:
-0:89          0.200000
-0:90      textureProj (global highp 4-component vector of float)
-0:90        's3D2' (uniform highp sampler3D)
-0:90        direct index (smooth temp mediump 4-component vector of float)
-0:90          'v' (smooth in 3-element array of mediump 4-component vector of float)
-0:90          Constant:
-0:90            1 (const int)
-0:90        Constant:
-0:90          0.400000
-0:91      dPdx (global mediump 4-component vector of float)
-0:91        direct index (smooth temp mediump 4-component vector of float)
-0:91          'v' (smooth in 3-element array of mediump 4-component vector of float)
-0:91          Constant:
-0:91            0 (const int)
-0:92      Constant:
-0:92        0.000000
-0:93      fwidth (global mediump float)
-0:93        'f13' (invariant global mediump float)
-0:98  Function Definition: foo236( (global void)
-0:98    Function Parameters: 
-0:100    Sequence
-0:100      dPdx (global mediump 4-component vector of float)
-0:100        direct index (smooth temp mediump 4-component vector of float)
-0:100          'v' (smooth in 3-element array of mediump 4-component vector of float)
-0:100          Constant:
-0:100            0 (const int)
-0:101      Constant:
-0:101        0.000000
-0:102      fwidth (global mediump float)
-0:102        'f13' (invariant global mediump float)
-0:103      move second child to first child (temp mediump float)
-0:103        'gl_FragDepth' (temp mediump float)
-0:103        'f13' (invariant global mediump float)
-0:104      move second child to first child (temp highp float)
-0:104        'gl_FragDepthEXT' (gl_FragDepth highp float FragDepth)
-0:104        'f13' (invariant global mediump float)
-0:109  Function Definition: foo239( (global void)
-0:109    Function Parameters: 
-0:111    Sequence
-0:111      move second child to first child (temp mediump float)
-0:111        'gl_FragDepth' (temp mediump float)
-0:111        'f13' (invariant global mediump float)
-0:112      move second child to first child (temp highp float)
-0:112        'gl_FragDepthEXT' (gl_FragDepth highp float FragDepth)
-0:112        'f13' (invariant global mediump float)
-0:119  Function Definition: foo245( (global void)
-0:119    Function Parameters: 
-0:121    Sequence
-0:121      texture (global lowp 4-component vector of float)
-0:121        'sExt' (uniform lowp samplerExternalOES)
-0:121        Constant:
-0:121          0.200000
-0:121          0.200000
-0:122      textureProj (global lowp 4-component vector of float)
-0:122        'sExt' (uniform lowp samplerExternalOES)
-0:122        Construct vec3 (temp lowp 3-component vector of float)
-0:122          'f13' (invariant global mediump float)
-0:123      textureProj (global lowp 4-component vector of float, operation at mediump)
-0:123        'sExt' (uniform lowp samplerExternalOES)
-0:123        direct index (smooth temp mediump 4-component vector of float)
-0:123          'v' (smooth in 3-element array of mediump 4-component vector of float)
-0:123          Constant:
-0:123            2 (const int)
-0:130  Function Definition: foo246( (global void)
-0:130    Function Parameters: 
-0:132    Sequence
-0:132      texture (global mediump 4-component vector of float)
-0:132        'mediumExt' (uniform mediump samplerExternalOES)
-0:132        Constant:
-0:132          0.200000
-0:132          0.200000
-0:133      textureProj (global highp 4-component vector of float)
-0:133        'highExt' (uniform highp samplerExternalOES)
-0:133        direct index (smooth temp mediump 4-component vector of float)
-0:133          'v' (smooth in 3-element array of mediump 4-component vector of float)
-0:133          Constant:
-0:133            2 (const int)
-0:134      Constant:
-0:134        0.000000
-0:135      Constant:
-0:135        0.000000
-0:137      Bitwise not (temp mediump int)
-0:137        'a' (temp mediump int)
-0:138      inclusive-or (temp mediump int)
-0:138        'a' (temp mediump int)
-0:138        'a' (temp mediump int)
-0:139      bitwise and (temp mediump int)
-0:139        'a' (temp mediump int)
-0:139        'a' (temp mediump int)
-0:145  Function Definition: foo203940(i1;f1;f1; (global mediump int)
-0:145    Function Parameters: 
-0:145      'a' (in mediump int)
-0:145      'b' (in mediump float)
-0:147    Sequence
-0:147      textureProjGrad (global lowp 4-component vector of float, operation at mediump)
-0:147        's2Dg' (uniform lowp sampler2D)
-0:147        Construct vec3 (temp mediump 3-component vector of float)
-0:147          'f13' (invariant global mediump float)
-0:147        'uv2' (invariant uniform mediump 2-component vector of float)
-0:147        'uv2' (invariant uniform mediump 2-component vector of float)
-0:148      Branch: Return with expression
-0:148        'a' (in mediump int)
 0:151  Sequence
 0:151    move second child to first child (temp mediump float)
 0:151      'f123' (global mediump float)
@@ -634,75 +517,6 @@
 0:152      'f124' (global mediump float)
 0:152      Constant:
 0:152        50000000000.000000
-0:158  Function Definition: foo323433( (global void)
-0:158    Function Parameters: 
-0:160    Sequence
-0:160      textureLod (global lowp 4-component vector of float, operation at mediump)
-0:160        's2Dg' (uniform lowp sampler2D)
-0:160        'uv2' (invariant uniform mediump 2-component vector of float)
-0:160        'f13' (invariant global mediump float)
-0:161      textureProjGrad (global lowp 4-component vector of float, operation at mediump)
-0:161        's2Dg' (uniform lowp sampler2D)
-0:161        Construct vec3 (temp mediump 3-component vector of float)
-0:161          'f13' (invariant global mediump float)
-0:161        'uv2' (invariant uniform mediump 2-component vector of float)
-0:161        'uv2' (invariant uniform mediump 2-component vector of float)
-0:162      textureGrad (global lowp 4-component vector of float, operation at mediump)
-0:162        's2Dg' (uniform lowp sampler2D)
-0:162        'uv2' (invariant uniform mediump 2-component vector of float)
-0:162        'uv2' (invariant uniform mediump 2-component vector of float)
-0:162        'uv2' (invariant uniform mediump 2-component vector of float)
-0:163      textureGrad (global lowp 4-component vector of float)
-0:163        'sCube' (uniform lowp samplerCube)
-0:163        Construct vec3 (temp lowp 3-component vector of float)
-0:163          'f13' (invariant global mediump float)
-0:163        Construct vec3 (temp lowp 3-component vector of float)
-0:163          'f13' (invariant global mediump float)
-0:163        Construct vec3 (temp lowp 3-component vector of float)
-0:163          'f13' (invariant global mediump float)
-0:167  Function Definition: fgfg(f1;i1; (global mediump int)
-0:167    Function Parameters: 
-0:167      'f' (in mediump float)
-0:167      'i' (in highp int)
-0:167    Sequence
-0:167      Branch: Return with expression
-0:167        Constant:
-0:167          2 (const int)
-0:173  Function Definition: gggf(f1; (global mediump int)
-0:173    Function Parameters: 
-0:173      'f' (in mediump float)
-0:173    Sequence
-0:173      Branch: Return with expression
-0:173        Constant:
-0:173          2 (const int)
-0:175  Function Definition: agggf(f1; (global mediump int)
-0:175    Function Parameters: 
-0:175      'f' (in mediump float)
-0:175    Sequence
-0:175      Branch: Return with expression
-0:175        Constant:
-0:175          2 (const int)
-0:187  Function Definition: badswizzle( (global void)
-0:187    Function Parameters: 
-0:?     Sequence
-0:190      'a' (temp 5-element array of mediump 3-component vector of float)
-0:191      'a' (temp 5-element array of mediump 3-component vector of float)
-0:192      'a' (temp 5-element array of mediump 3-component vector of float)
-0:193      Constant:
-0:193        5 (const int)
-0:194      Constant:
-0:194        0.000000
-0:199  Function Definition: fooinittest( (global mediump float)
-0:199    Function Parameters: 
-0:201    Sequence
-0:201      Branch: Return with expression
-0:201        Function Call: fooinit( (global mediump float)
-0:209  Function Definition: fooinit( (global mediump float)
-0:209    Function Parameters: 
-0:211    Sequence
-0:211      Branch: Return with expression
-0:211        Constant:
-0:211          12.000000
 0:214  Sequence
 0:214    move second child to first child (temp mediump int)
 0:214      'init1' (global mediump int)
@@ -731,13 +545,13 @@
 0:?     'a' (global 3-element array of mediump int)
 0:?     'uint' (global mediump int)
 0:?     'v' (smooth in 3-element array of mediump 4-component vector of float)
-0:?     'f' (global mediump float)
+0:?     'f' (invariant global mediump float)
 0:?     'anon@0' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump int x})
 0:?     'fa' (global 1-element array of mediump float)
-0:?     'f13' (global mediump float)
+0:?     'f13' (invariant global mediump float)
 0:?     'fi' (invariant temp mediump float)
-0:?     'av' (smooth in mediump 4-component vector of float)
-0:?     'uv2' (uniform mediump 2-component vector of float)
+0:?     'av' (invariant smooth in mediump 4-component vector of float)
+0:?     'uv2' (invariant uniform mediump 2-component vector of float)
 0:?     'uv3' (invariant uniform mediump 3-component vector of float)
 0:?     'glob2D' (global lowp sampler2D)
 0:?     'vary2D' (smooth in lowp sampler2D)
diff --git a/Test/baseResults/100LimitsConf.vert.out b/Test/baseResults/100LimitsConf.vert.out
index e27c2cc..46cb845 100644
--- a/Test/baseResults/100LimitsConf.vert.out
+++ b/Test/baseResults/100LimitsConf.vert.out
@@ -22,7 +22,3 @@
 ERROR: 20 compilation errors.  No code generated.
 
 
-
-Linked vertex stage:
-
-
diff --git a/Test/baseResults/100scope.vert.out b/Test/baseResults/100scope.vert.out
index 2b542b0..17423dc 100644
--- a/Test/baseResults/100scope.vert.out
+++ b/Test/baseResults/100scope.vert.out
@@ -128,6 +128,8 @@
 
 Linked vertex stage:
 
+ERROR: Linking vertex stage: No function definition (body) found: 
+    g(
 
 Shader version: 100
 ERROR: node is still EOpNull!
@@ -148,20 +150,6 @@
 0:8                1.000000
 0:11      Branch: Return with expression
 0:11        'a' (in highp int)
-0:25  Function Definition: cos(f1; (global highp float)
-0:25    Function Parameters: 
-0:25      'x' (in highp float)
-0:27    Sequence
-0:27      Branch: Return with expression
-0:27        Constant:
-0:27          1.000000
-0:29  Function Definition: radians(b1; (global bool)
-0:29    Function Parameters: 
-0:29      'x' (in bool)
-0:31    Sequence
-0:31      Branch: Return with expression
-0:31        Constant:
-0:31          true (const bool)
 0:36  Function Definition: main( (global void)
 0:36    Function Parameters: 
 0:?     Sequence
diff --git a/Test/baseResults/110scope.vert.out b/Test/baseResults/110scope.vert.out
index 5f41b86..74002ba 100644
--- a/Test/baseResults/110scope.vert.out
+++ b/Test/baseResults/110scope.vert.out
@@ -1,9 +1,8 @@
 110scope.vert
 ERROR: 0:5: 'a' : redefinition 
-ERROR: 0:34: 'f' : can't call user function from global scope 
 ERROR: 0:57: 'z' : undeclared identifier 
 ERROR: 0:57: 'z' : redefinition 
-ERROR: 4 compilation errors.  No code generated.
+ERROR: 3 compilation errors.  No code generated.
 
 
 Shader version: 110
@@ -131,6 +130,10 @@
 
 Linked vertex stage:
 
+ERROR: Linking vertex stage: No function definition (body) found: 
+    sin(f1;
+ERROR: Linking vertex stage: No function definition (body) found: 
+    g(
 
 Shader version: 110
 ERROR: node is still EOpNull!
@@ -151,20 +154,6 @@
 0:8                1.000000
 0:11      Branch: Return with expression
 0:11        'a' (in int)
-0:25  Function Definition: cos(f1; (global float)
-0:25    Function Parameters: 
-0:25      'x' (in float)
-0:27    Sequence
-0:27      Branch: Return with expression
-0:27        Constant:
-0:27          1.000000
-0:29  Function Definition: radians(b1; (global bool)
-0:29    Function Parameters: 
-0:29      'x' (in bool)
-0:31    Sequence
-0:31      Branch: Return with expression
-0:31        Constant:
-0:31          true (const bool)
 0:34  Sequence
 0:34    move second child to first child (temp int)
 0:34      'gi' (global int)
diff --git a/Test/baseResults/120.frag.out b/Test/baseResults/120.frag.out
index 4fa7600..79898aa 100644
--- a/Test/baseResults/120.frag.out
+++ b/Test/baseResults/120.frag.out
@@ -630,537 +630,9 @@
 Requested GL_ARB_shader_texture_lod
 Requested GL_ARB_texture_rectangle
 ERROR: node is still EOpNull!
-0:21  Function Definition: main( (global void)
-0:21    Function Parameters: 
-0:23    Sequence
-0:23      Sequence
-0:23        move second child to first child (temp 2X3 matrix of float)
-0:23          'm23' (temp 2X3 matrix of float)
-0:23          Construct mat2x3 (temp 2X3 matrix of float)
-0:23            'm' (uniform 4X2 matrix of float)
-0:27      Sequence
-0:27        move second child to first child (temp structure{global float f})
-0:27          'sv' (temp structure{global float f})
-0:27          Construct structure (temp structure{global float f})
-0:27            Convert int to float (temp float)
-0:27              'a' (temp int)
-0:28      Sequence
-0:28        move second child to first child (temp 2-element array of float)
-0:28          'ia' (temp 2-element array of float)
-0:28          Construct float (temp 2-element array of float)
-0:28            Constant:
-0:28              3.000000
-0:28            direct index (temp float)
-0:28              'i' (smooth in 4-component vector of float)
-0:28              Constant:
-0:28                1 (const int)
-0:29      Sequence
-0:29        move second child to first child (temp float)
-0:29          'f1' (temp float)
-0:29          Constant:
-0:29            1.000000
-0:30      Sequence
-0:30        move second child to first child (temp float)
-0:30          'f' (temp float)
-0:30          Convert int to float (temp float)
-0:30            'a' (temp int)
-0:31      move second child to first child (temp float)
-0:31        'f' (temp float)
-0:31        Convert int to float (temp float)
-0:31          'a' (temp int)
-0:33      Sequence
-0:33        move second child to first child (temp 3-component vector of float)
-0:33          'v3' (temp 3-component vector of float)
-0:33          Convert int to float (temp 3-component vector of float)
-0:33            'iv3' (temp 3-component vector of int)
-0:34      move second child to first child (temp float)
-0:34        'f' (temp float)
-0:34        add (temp float)
-0:34          'f' (temp float)
-0:34          Convert int to float (temp float)
-0:34            'a' (temp int)
-0:35      move second child to first child (temp float)
-0:35        'f' (temp float)
-0:35        subtract (temp float)
-0:35          Convert int to float (temp float)
-0:35            'a' (temp int)
-0:35          'f' (temp float)
-0:36      add second child into first child (temp float)
-0:36        'f' (temp float)
-0:36        Convert int to float (temp float)
-0:36          'a' (temp int)
-0:37      move second child to first child (temp float)
-0:37        'f' (temp float)
-0:37        subtract (temp float)
-0:37          Convert int to float (temp float)
-0:37            'a' (temp int)
-0:37          'f' (temp float)
-0:38      multiply second child into first child (temp 3-component vector of float)
-0:38        'v3' (temp 3-component vector of float)
-0:38        Convert int to float (temp 3-component vector of float)
-0:38          'iv3' (temp 3-component vector of int)
-0:39      move second child to first child (temp 3-component vector of float)
-0:39        'v3' (temp 3-component vector of float)
-0:39        divide (temp 3-component vector of float)
-0:39          Convert int to float (temp 3-component vector of float)
-0:39            'iv3' (temp 3-component vector of int)
-0:39          Constant:
-0:39            2.000000
-0:40      move second child to first child (temp 3-component vector of float)
-0:40        'v3' (temp 3-component vector of float)
-0:40        vector-scale (temp 3-component vector of float)
-0:40          Constant:
-0:40            3.000000
-0:40          Convert int to float (temp 3-component vector of float)
-0:40            'iv3' (temp 3-component vector of int)
-0:41      move second child to first child (temp 3-component vector of float)
-0:41        'v3' (temp 3-component vector of float)
-0:41        vector-scale (temp 3-component vector of float)
-0:41          Constant:
-0:41            2.000000
-0:41          'v3' (temp 3-component vector of float)
-0:42      move second child to first child (temp 3-component vector of float)
-0:42        'v3' (temp 3-component vector of float)
-0:42        subtract (temp 3-component vector of float)
-0:42          'v3' (temp 3-component vector of float)
-0:42          Constant:
-0:42            2.000000
-0:43      Test condition and select (temp void)
-0:43        Condition
-0:47        logical-or (temp bool)
-0:46          logical-or (temp bool)
-0:45            logical-or (temp bool)
-0:44              logical-or (temp bool)
-0:43                logical-or (temp bool)
-0:43                  Compare Less Than (temp bool)
-0:43                    'f' (temp float)
-0:43                    Convert int to float (temp float)
-0:43                      'a' (temp int)
-0:44                  Compare Less Than or Equal (temp bool)
-0:44                    Convert int to float (temp float)
-0:44                      'a' (temp int)
-0:44                    'f' (temp float)
-0:45                Compare Greater Than (temp bool)
-0:45                  'f' (temp float)
-0:45                  Convert int to float (temp float)
-0:45                    'a' (temp int)
-0:46              Compare Greater Than or Equal (temp bool)
-0:46                'f' (temp float)
-0:46                Convert int to float (temp float)
-0:46                  'a' (temp int)
-0:47            Compare Equal (temp bool)
-0:47              Convert int to float (temp float)
-0:47                'a' (temp int)
-0:47              'f' (temp float)
-0:48          Compare Not Equal (temp bool)
-0:48            'f' (temp float)
-0:48            Convert int to float (temp float)
-0:48              'a' (temp int)
-0:43        true case is null
-0:49      move second child to first child (temp float)
-0:49        'f' (temp float)
-0:49        Test condition and select (temp float)
-0:49          Condition
-0:49          'b' (temp bool)
-0:49          true case
-0:49          Convert int to float (temp float)
-0:49            'a' (temp int)
-0:49          false case
-0:49          'f' (temp float)
-0:50      move second child to first child (temp float)
-0:50        'f' (temp float)
-0:50        Test condition and select (temp float)
-0:50          Condition
-0:50          'b' (temp bool)
-0:50          true case
-0:50          'f' (temp float)
-0:50          false case
-0:50          Convert int to float (temp float)
-0:50            'a' (temp int)
-0:51      move second child to first child (temp float)
-0:51        'f' (temp float)
-0:51        Convert int to float (temp float)
-0:51          Test condition and select (temp int)
-0:51            Condition
-0:51            'b' (temp bool)
-0:51            true case
-0:51            'a' (temp int)
-0:51            false case
-0:51            'a' (temp int)
-0:52      Sequence
-0:52        move second child to first child (temp structure{global float f})
-0:52          'news' (temp structure{global float f})
-0:52          'sv' (temp structure{global float f})
-0:54      vector swizzle (temp 2-component vector of float)
-0:54        'i' (smooth in 4-component vector of float)
-0:54        Sequence
-0:54          Constant:
-0:54            0 (const int)
-0:54          Constant:
-0:54            1 (const int)
-0:55      'm' (uniform 4X2 matrix of float)
-0:56      'm' (uniform 4X2 matrix of float)
-0:58      'f' (temp float)
-0:59      move second child to first child (temp float)
-0:59        'f' (temp float)
-0:59        Convert int to float (temp float)
-0:59          'a' (temp int)
-0:60      'f' (temp float)
-0:61      'b' (temp bool)
-0:62      move second child to first child (temp bool)
-0:62        'b' (temp bool)
-0:62        'b' (temp bool)
-0:63      'f' (temp float)
-0:65      move second child to first child (temp 4-component vector of float)
-0:65        'gl_FragColor' (fragColor 4-component vector of float FragColor)
-0:65        texture (global 4-component vector of float)
-0:65          's2D' (uniform sampler2D)
-0:65          'centTexCoord' (centroid smooth in 2-component vector of float)
-0:?       Sequence
-0:79        'gl_FragColor' (fragColor 4-component vector of float FragColor)
-0:82      direct index (temp float)
-0:82        'gl_FragColor' (fragColor 4-component vector of float FragColor)
-0:82        Constant:
-0:82          0 (const int)
-0:83      direct index (temp float)
-0:83        'gl_FragColor' (fragColor 4-component vector of float FragColor)
-0:83        Constant:
-0:83          0 (const int)
-0:84      direct index (temp float)
-0:84        'centTexCoord' (centroid smooth in 2-component vector of float)
-0:84        Constant:
-0:84          0 (const int)
-0:85      move second child to first child (temp bool)
-0:85        Comma (temp bool)
-0:85          'a' (temp int)
-0:85          'b' (temp bool)
-0:85        Constant:
-0:85          true (const bool)
-0:91  Function Definition: main( (global int)
-0:91    Function Parameters: 
 0:92  Function Definition: main(i1; (global void)
 0:92    Function Parameters: 
 0:92      'a' (in int)
-0:97  Function Definition: foo(f1; (global int)
-0:97    Function Parameters: 
-0:97      'a' (out float)
-0:99    Sequence
-0:99      Branch: Return with expression
-0:99        Constant:
-0:99          3.200000
-0:100      Function Call: foo(f1; (global int)
-0:100        'a' (out float)
-0:103  Function Definition: gen(vf3; (global bool)
-0:103    Function Parameters: 
-0:103      'v' (in 3-component vector of float)
-0:105    Sequence
-0:105      Test condition and select (temp void)
-0:105        Condition
-0:105        logical-and (temp bool)
-0:105          Compare Less Than (temp bool)
-0:105            Absolute value (global float)
-0:105              direct index (temp float)
-0:105                'v' (in 3-component vector of float)
-0:105                Constant:
-0:105                  0 (const int)
-0:105            Constant:
-0:105              0.000100
-0:105          Compare Less Than (temp bool)
-0:105            Absolute value (global float)
-0:105              direct index (temp float)
-0:105                'v' (in 3-component vector of float)
-0:105                Constant:
-0:105                  1 (const int)
-0:105            Constant:
-0:105              0.000100
-0:105        true case
-0:106        Branch: Return with expression
-0:106          Constant:
-0:106            true (const bool)
-0:109  Function Definition: v1( (global void)
-0:109    Function Parameters: 
-0:113  Function Definition: v2( (global void)
-0:113    Function Parameters: 
-0:115    Sequence
-0:115      Branch: Return
-0:118  Function Definition: atest( (global void)
-0:118    Function Parameters: 
-0:120    Sequence
-0:120      Sequence
-0:120        move second child to first child (temp 4-component vector of float)
-0:120          'v' (temp 4-component vector of float)
-0:120          direct index (smooth temp 4-component vector of float TexCoord)
-0:120            'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
-0:120            Constant:
-0:120              1 (const int)
-0:121      add second child into first child (temp 4-component vector of float)
-0:121        'v' (temp 4-component vector of float)
-0:121        direct index (smooth temp 4-component vector of float TexCoord)
-0:121          'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
-0:121          Constant:
-0:121            3 (const int)
-0:139  Function Definition: foo123( (global void)
-0:139    Function Parameters: 
-0:141    Sequence
-0:141      Sequence
-0:141        move second child to first child (temp 2X2 matrix of float)
-0:141          'r2' (temp 2X2 matrix of float)
-0:141          component-wise multiply (global 2X2 matrix of float)
-0:141            'm22' (global 2X2 matrix of float)
-0:141            'm22' (global 2X2 matrix of float)
-0:142      Sequence
-0:142        move second child to first child (temp 3X3 matrix of float)
-0:142          'r3' (temp 3X3 matrix of float)
-0:142          component-wise multiply (global 3X3 matrix of float)
-0:142            'm33' (global 3X3 matrix of float)
-0:142            'm33' (global 3X3 matrix of float)
-0:143      Sequence
-0:143        move second child to first child (temp 4X4 matrix of float)
-0:143          'r4' (temp 4X4 matrix of float)
-0:143          component-wise multiply (global 4X4 matrix of float)
-0:143            'm44' (global 4X4 matrix of float)
-0:143            'm44' (global 4X4 matrix of float)
-0:145      Sequence
-0:145        move second child to first child (temp 2X3 matrix of float)
-0:145          'r23' (temp 2X3 matrix of float)
-0:145          component-wise multiply (global 2X3 matrix of float)
-0:145            'm23' (global 2X3 matrix of float)
-0:145            'm23' (global 2X3 matrix of float)
-0:146      Sequence
-0:146        move second child to first child (temp 2X4 matrix of float)
-0:146          'r24' (temp 2X4 matrix of float)
-0:146          component-wise multiply (global 2X4 matrix of float)
-0:146            'm24' (global 2X4 matrix of float)
-0:146            'm24' (global 2X4 matrix of float)
-0:147      Sequence
-0:147        move second child to first child (temp 3X2 matrix of float)
-0:147          'r32' (temp 3X2 matrix of float)
-0:147          component-wise multiply (global 3X2 matrix of float)
-0:147            'm32' (global 3X2 matrix of float)
-0:147            'm32' (global 3X2 matrix of float)
-0:148      Sequence
-0:148        move second child to first child (temp 3X4 matrix of float)
-0:148          'r34' (temp 3X4 matrix of float)
-0:148          component-wise multiply (global 3X4 matrix of float)
-0:148            'm34' (global 3X4 matrix of float)
-0:148            'm34' (global 3X4 matrix of float)
-0:149      Sequence
-0:149        move second child to first child (temp 4X2 matrix of float)
-0:149          'r42' (temp 4X2 matrix of float)
-0:149          component-wise multiply (global 4X2 matrix of float)
-0:149            'm42' (global 4X2 matrix of float)
-0:149            'm42' (global 4X2 matrix of float)
-0:150      Sequence
-0:150        move second child to first child (temp 4X3 matrix of float)
-0:150          'r43' (temp 4X3 matrix of float)
-0:150          component-wise multiply (global 4X3 matrix of float)
-0:150            'm43' (global 4X3 matrix of float)
-0:150            'm43' (global 4X3 matrix of float)
-0:156  Function Definition: matConst( (global void)
-0:156    Function Parameters: 
-0:?     Sequence
-0:162      Sequence
-0:162        move second child to first child (temp 4X4 matrix of float)
-0:162          'm4g' (temp 4X4 matrix of float)
-0:162          Construct mat4 (temp 4X4 matrix of float)
-0:162            'v2' (temp 2-component vector of float)
-0:162            'v3' (temp 3-component vector of float)
-0:162            'v3' (temp 3-component vector of float)
-0:162            'v3' (temp 3-component vector of float)
-0:162            'v3' (temp 3-component vector of float)
-0:162            'v3' (temp 3-component vector of float)
-0:163      Sequence
-0:163        move second child to first child (temp 4X4 matrix of float)
-0:163          'm4' (temp 4X4 matrix of float)
-0:163          Construct mat4 (temp 4X4 matrix of float)
-0:163            'v2' (temp 2-component vector of float)
-0:163            'v3' (temp 3-component vector of float)
-0:163            'v3' (temp 3-component vector of float)
-0:163            'v3' (temp 3-component vector of float)
-0:163            'v3' (temp 3-component vector of float)
-0:163            'v2' (temp 2-component vector of float)
-0:164      Sequence
-0:164        move second child to first child (temp 3X3 matrix of float)
-0:164          'm3' (temp 3X3 matrix of float)
-0:164          Construct mat3 (temp 3X3 matrix of float)
-0:164            'm4' (temp 4X4 matrix of float)
-0:165      Sequence
-0:165        move second child to first child (temp 3X3 matrix of float)
-0:165          'm3b1' (temp 3X3 matrix of float)
-0:165          Construct mat3 (temp 3X3 matrix of float)
-0:165            'm4' (temp 4X4 matrix of float)
-0:165            'v2' (temp 2-component vector of float)
-0:166      Sequence
-0:166        move second child to first child (temp 3X3 matrix of float)
-0:166          'm3b2' (temp 3X3 matrix of float)
-0:166          Construct mat3 (temp 3X3 matrix of float)
-0:166            'm4' (temp 4X4 matrix of float)
-0:166            'm4' (temp 4X4 matrix of float)
-0:167      Sequence
-0:167        move second child to first child (temp 3X2 matrix of float)
-0:167          'm32' (temp 3X2 matrix of float)
-0:167          Construct mat3x2 (temp 3X2 matrix of float)
-0:167            'm4' (temp 4X4 matrix of float)
-0:168      Sequence
-0:168        move second child to first child (temp 4X4 matrix of float)
-0:168          'm4c' (temp 4X4 matrix of float)
-0:168          Construct mat4 (temp 4X4 matrix of float)
-0:168            'm32' (temp 3X2 matrix of float)
-0:169      Sequence
-0:169        move second child to first child (temp 3X3 matrix of float)
-0:169          'm3s' (temp 3X3 matrix of float)
-0:169          Construct mat3 (temp 3X3 matrix of float)
-0:169            direct index (temp float)
-0:169              'v2' (temp 2-component vector of float)
-0:169              Constant:
-0:169                0 (const int)
-0:171      Sequence
-0:171        move second child to first child (temp 2-element array of 3X3 matrix of float)
-0:171          'm3a1' (temp 2-element array of 3X3 matrix of float)
-0:171          Construct mat3 (temp 2-element array of 3X3 matrix of float)
-0:171            'm3s' (temp 3X3 matrix of float)
-0:171            'm3s' (temp 3X3 matrix of float)
-0:179  Function Definition: foo2323( (global void)
-0:179    Function Parameters: 
-0:?     Sequence
-0:184      move second child to first child (temp 4-component vector of float)
-0:184        'v' (temp 4-component vector of float)
-0:184        textureLod (global 4-component vector of float)
-0:184          's2D' (uniform sampler2D)
-0:184          'v2' (temp 2-component vector of float)
-0:184          'f' (temp float)
-0:185      move second child to first child (temp 4-component vector of float)
-0:185        'v' (temp 4-component vector of float)
-0:185        textureProjLod (global 4-component vector of float)
-0:185          's3D' (uniform sampler3D)
-0:185          'v' (temp 4-component vector of float)
-0:185          'f' (temp float)
-0:186      move second child to first child (temp 4-component vector of float)
-0:186        'v' (temp 4-component vector of float)
-0:186        textureProjLod (global 4-component vector of float)
-0:186          's1D' (uniform sampler1D)
-0:186          'v' (temp 4-component vector of float)
-0:186          'f' (temp float)
-0:187      move second child to first child (temp 4-component vector of float)
-0:187        'v' (temp 4-component vector of float)
-0:187        textureProjLod (global 4-component vector of float)
-0:187          's2DS' (uniform sampler2DShadow)
-0:187          'v' (temp 4-component vector of float)
-0:187          'f' (temp float)
-0:189      move second child to first child (temp 4-component vector of float)
-0:189        'v' (temp 4-component vector of float)
-0:189        textureGrad (global 4-component vector of float)
-0:189          's1D' (uniform sampler1D)
-0:189          'f' (temp float)
-0:189          'f' (temp float)
-0:189          'f' (temp float)
-0:190      move second child to first child (temp 4-component vector of float)
-0:190        'v' (temp 4-component vector of float)
-0:190        textureProjGrad (global 4-component vector of float)
-0:190          's2D' (uniform sampler2D)
-0:190          'v' (temp 4-component vector of float)
-0:190          'v2' (temp 2-component vector of float)
-0:190          'v2' (temp 2-component vector of float)
-0:191      move second child to first child (temp 4-component vector of float)
-0:191        'v' (temp 4-component vector of float)
-0:191        textureProjGrad (global 4-component vector of float)
-0:191          's2DS' (uniform sampler2DShadow)
-0:191          'v' (temp 4-component vector of float)
-0:191          'v2' (temp 2-component vector of float)
-0:191          'v2' (temp 2-component vector of float)
-0:196  Function Definition: foo2324( (global void)
-0:196    Function Parameters: 
-0:?     Sequence
-0:201      move second child to first child (temp 4-component vector of float)
-0:201        'v' (temp 4-component vector of float)
-0:201        textureLod (global 4-component vector of float)
-0:201          's2D' (uniform sampler2D)
-0:201          'v2' (temp 2-component vector of float)
-0:201          'f' (temp float)
-0:202      move second child to first child (temp 4-component vector of float)
-0:202        'v' (temp 4-component vector of float)
-0:202        textureProjLod (global 4-component vector of float)
-0:202          's3D' (uniform sampler3D)
-0:202          'v' (temp 4-component vector of float)
-0:202          'f' (temp float)
-0:203      move second child to first child (temp 4-component vector of float)
-0:203        'v' (temp 4-component vector of float)
-0:203        textureProjLod (global 4-component vector of float)
-0:203          's1D' (uniform sampler1D)
-0:203          'v' (temp 4-component vector of float)
-0:203          'f' (temp float)
-0:204      move second child to first child (temp 4-component vector of float)
-0:204        'v' (temp 4-component vector of float)
-0:204        textureProjLod (global 4-component vector of float)
-0:204          's2DS' (uniform sampler2DShadow)
-0:204          'v' (temp 4-component vector of float)
-0:204          'f' (temp float)
-0:206      move second child to first child (temp 4-component vector of float)
-0:206        'v' (temp 4-component vector of float)
-0:206        textureGrad (global 4-component vector of float)
-0:206          's1D' (uniform sampler1D)
-0:206          'f' (temp float)
-0:206          'f' (temp float)
-0:206          'f' (temp float)
-0:207      move second child to first child (temp 4-component vector of float)
-0:207        'v' (temp 4-component vector of float)
-0:207        textureProjGrad (global 4-component vector of float)
-0:207          's2D' (uniform sampler2D)
-0:207          'v' (temp 4-component vector of float)
-0:207          'v2' (temp 2-component vector of float)
-0:207          'v2' (temp 2-component vector of float)
-0:208      move second child to first child (temp 4-component vector of float)
-0:208        'v' (temp 4-component vector of float)
-0:208        textureProjGrad (global 4-component vector of float)
-0:208          's2DS' (uniform sampler2DShadow)
-0:208          'v' (temp 4-component vector of float)
-0:208          'v2' (temp 2-component vector of float)
-0:208          'v2' (temp 2-component vector of float)
-0:209      'v' (temp 4-component vector of float)
-0:214  Function Definition: foo121111( (global void)
-0:214    Function Parameters: 
-0:?     Sequence
-0:217      Sequence
-0:217        move second child to first child (temp 4-component vector of float)
-0:217          'v' (temp 4-component vector of float)
-0:217          texture (global 4-component vector of float)
-0:217            's2DRbad' (uniform sampler2DRect)
-0:217            'v2' (temp 2-component vector of float)
-0:225  Function Definition: foo12111( (global void)
-0:225    Function Parameters: 
-0:?     Sequence
-0:231      move second child to first child (temp 4-component vector of float)
-0:231        'v' (temp 4-component vector of float)
-0:231        texture (global 4-component vector of float)
-0:231          's2DR' (uniform sampler2DRect)
-0:231          'v2' (temp 2-component vector of float)
-0:232      move second child to first child (temp 4-component vector of float)
-0:232        'v' (temp 4-component vector of float)
-0:232        textureProj (global 4-component vector of float)
-0:232          's2DR' (uniform sampler2DRect)
-0:232          'v3' (temp 3-component vector of float)
-0:233      move second child to first child (temp 4-component vector of float)
-0:233        'v' (temp 4-component vector of float)
-0:233        textureProj (global 4-component vector of float)
-0:233          's2DR' (uniform sampler2DRect)
-0:233          'v4' (temp 4-component vector of float)
-0:234      move second child to first child (temp 4-component vector of float)
-0:234        'v' (temp 4-component vector of float)
-0:234        texture (global 4-component vector of float)
-0:234          's2DRS' (uniform sampler2DRectShadow)
-0:234          'v3' (temp 3-component vector of float)
-0:235      move second child to first child (temp 4-component vector of float)
-0:235        'v' (temp 4-component vector of float)
-0:235        textureProj (global 4-component vector of float)
-0:235          's2DRS' (uniform sampler2DRectShadow)
-0:235          'v4' (temp 4-component vector of float)
-0:237      move second child to first child (temp 4-component vector of float)
-0:237        'v' (temp 4-component vector of float)
-0:237        textureProjGrad (global 4-component vector of float)
-0:237          's2DRS' (uniform sampler2DRectShadow)
-0:237          'v' (temp 4-component vector of float)
-0:237          'v2' (temp 2-component vector of float)
-0:237          'v2' (temp 2-component vector of float)
 0:?   Linker Objects
 0:?     'lowp' (global float)
 0:?     'mediump' (global float)
diff --git a/Test/baseResults/120.vert.out b/Test/baseResults/120.vert.out
index 73ced6a..94a97b5 100644
--- a/Test/baseResults/120.vert.out
+++ b/Test/baseResults/120.vert.out
@@ -420,7 +420,6 @@
 0:?     'concall' (const float)
 0:?       0.295520
 0:?     'gl_TexCoord' (smooth out 35-element array of 4-component vector of float TexCoord)
-0:?     'gl_TexCoord' (smooth out 35-element array of 4-component vector of float TexCoord)
 0:?     'c' (uniform int)
 0:?     'x' (in 2-component vector of int)
 0:?     'v2a' (in 2-component vector of float)
@@ -481,285 +480,6 @@
 0:43        'gl_PointSize' (invariant gl_PointSize float PointSize)
 0:43        Constant:
 0:43          3.800000
-0:61  Function Definition: overloadB(f1;f1; (global void)
-0:61    Function Parameters: 
-0:61      '' (in float)
-0:61      '' (const (read only) float)
-0:78  Function Definition: foo( (global void)
-0:78    Function Parameters: 
-0:?     Sequence
-0:83      Function Call: overloadB(f1;f1; (global void)
-0:83        'f' (temp float)
-0:83        'f' (temp float)
-0:84      Function Call: overloadB(f1;f1; (global void)
-0:84        'f' (temp float)
-0:84        Constant:
-0:84          2.000000
-0:85      Function Call: overloadB(f1;f1; (global void)
-0:85        Constant:
-0:85          1.000000
-0:85        Convert int to float (temp float)
-0:85          'i' (temp int)
-0:87      Constant:
-0:87        0.000000
-0:88      Function Call: overloadC(i1;i1; (global 2-component vector of float)
-0:88        Constant:
-0:88          1 (const int)
-0:88        'i' (temp int)
-0:89      Function Call: overloadC(vf2;vf2; (global 2-component vector of float)
-0:89        Constant:
-0:89          1.000000
-0:89          1.000000
-0:89        Constant:
-0:89          2.000000
-0:89          2.000000
-0:90      Constant:
-0:90        0.000000
-0:91      Function Call: overloadC(vf2;vf2; (global 2-component vector of float)
-0:91        Constant:
-0:91          1.000000
-0:91          1.000000
-0:91        Constant:
-0:91          2.000000
-0:91          2.000000
-0:93      Function Call: overloadD(i1;f1; (global 3-component vector of float)
-0:93        'i' (temp int)
-0:93        'f' (temp float)
-0:94      Function Call: overloadD(f1;i1; (global 3-component vector of float)
-0:94        'f' (temp float)
-0:94        'i' (temp int)
-0:95      Function Call: overloadD(f1;i1; (global 3-component vector of float)
-0:95        Convert int to float (temp float)
-0:95          'i' (temp int)
-0:95        'i' (temp int)
-0:98      Constant:
-0:98        0.000000
-0:100      Constant:
-0:100        0.841471
-0:101      texture (global 4-component vector of float)
-0:101        's2D' (uniform sampler2D)
-0:101        Constant:
-0:101          0.000000
-0:101          0.000000
-0:102      clamp (global 4-component vector of float)
-0:102        'attv4' (in 4-component vector of float)
-0:102        Constant:
-0:102          0.000000
-0:102        Constant:
-0:102          1.000000
-0:103      clamp (global 4-component vector of float)
-0:103        Convert int to float (temp 4-component vector of float)
-0:103          Convert float to int (temp 4-component vector of int)
-0:103            'attv4' (in 4-component vector of float)
-0:103        Constant:
-0:103          0.000000
-0:103        Constant:
-0:103          1.000000
-0:106      Constant:
-0:106        0.000000
-0:107      Constant:
-0:107        0.000000
-0:108      Constant:
-0:108        0.000000
-0:109      Function Call: overloadE(vf2; (global 3-component vector of float)
-0:109        Constant:
-0:109          3.300000
-0:109          3.300000
-0:110      Function Call: overloadE(mf22; (global 3-component vector of float)
-0:110        Constant:
-0:110          0.500000
-0:110          0.000000
-0:110          0.000000
-0:110          0.500000
-0:111      Constant:
-0:111        0.000000
-0:112      Function Call: overloadE(vf2; (global 3-component vector of float)
-0:112        Constant:
-0:112          1.000000
-0:112          1.000000
-0:115      Function Call: overloadE(f1[2]; (global 3-component vector of float)
-0:115        'b' (temp 2-element array of float)
-0:117      Constant:
-0:117        0.000000
-0:118      Function Call: overloadF(i1; (global 3-component vector of float)
-0:118        Constant:
-0:118          1 (const int)
-0:128  Function Definition: foo2( (global void)
-0:128    Function Parameters: 
-0:?     Sequence
-0:135      Comma (global void)
-0:135        Function Call: outFun(f1;vi2;i1;f1; (global void)
-0:135          Convert int to float (temp float)
-0:135            'i' (temp int)
-0:135          'tempArg' (temp 2-component vector of int)
-0:135          'i' (temp int)
-0:135          'f' (temp float)
-0:135        move second child to first child (temp 2-component vector of float)
-0:135          'v2' (temp 2-component vector of float)
-0:135          Convert int to float (temp 2-component vector of float)
-0:135            'tempArg' (temp 2-component vector of int)
-0:136      Comma (global int)
-0:136        move second child to first child (temp int)
-0:136          'tempReturn' (global int)
-0:136          Function Call: outFunRet(f1;i1;i1;vi4; (global int)
-0:136            Convert int to float (temp float)
-0:136              'i' (temp int)
-0:136            'tempArg' (temp int)
-0:136            'i' (temp int)
-0:136            'tempArg' (temp 4-component vector of int)
-0:136        move second child to first child (temp float)
-0:136          'f' (temp float)
-0:136          Convert int to float (temp float)
-0:136            'tempArg' (temp int)
-0:136        move second child to first child (temp 4-component vector of float)
-0:136          'v4' (temp 4-component vector of float)
-0:136          Convert int to float (temp 4-component vector of float)
-0:136            'tempArg' (temp 4-component vector of int)
-0:136        'tempReturn' (global int)
-0:137      Sequence
-0:137        move second child to first child (temp float)
-0:137          'ret' (temp float)
-0:137          Convert int to float (temp float)
-0:137            Comma (global int)
-0:137              move second child to first child (temp int)
-0:137                'tempReturn' (global int)
-0:137                Function Call: outFunRet(f1;i1;i1;vi4; (global int)
-0:137                  Convert int to float (temp float)
-0:137                    'i' (temp int)
-0:137                  'tempArg' (temp int)
-0:137                  'i' (temp int)
-0:137                  'tempArg' (temp 4-component vector of int)
-0:137              move second child to first child (temp float)
-0:137                'f' (temp float)
-0:137                Convert int to float (temp float)
-0:137                  'tempArg' (temp int)
-0:137              move second child to first child (temp 4-component vector of float)
-0:137                'v4' (temp 4-component vector of float)
-0:137                Convert int to float (temp 4-component vector of float)
-0:137                  'tempArg' (temp 4-component vector of int)
-0:137              'tempReturn' (global int)
-0:138      Sequence
-0:138        move second child to first child (temp 2-component vector of float)
-0:138          'ret2' (temp 2-component vector of float)
-0:138          Convert int to float (temp 2-component vector of float)
-0:138            Comma (global 2-component vector of int)
-0:138              move second child to first child (temp 2-component vector of int)
-0:138                'tempReturn' (global 2-component vector of int)
-0:138                Function Call: outFunRet(f1;vi4;i1;vi4; (global 2-component vector of int)
-0:138                  Convert int to float (temp float)
-0:138                    'i' (temp int)
-0:138                  'tempArg' (temp 4-component vector of int)
-0:138                  'i' (temp int)
-0:138                  'tempArg' (temp 4-component vector of int)
-0:138              move second child to first child (temp 4-component vector of float)
-0:138                'v4' (temp 4-component vector of float)
-0:138                Convert int to float (temp 4-component vector of float)
-0:138                  'tempArg' (temp 4-component vector of int)
-0:138              move second child to first child (temp 4-component vector of float)
-0:138                'v4' (temp 4-component vector of float)
-0:138                Convert int to float (temp 4-component vector of float)
-0:138                  'tempArg' (temp 4-component vector of int)
-0:138              'tempReturn' (global 2-component vector of int)
-0:139      Sequence
-0:139        move second child to first child (temp bool)
-0:139          'b' (temp bool)
-0:139          any (global bool)
-0:139            Compare Less Than (global 4-component vector of bool)
-0:139              'v4' (temp 4-component vector of float)
-0:139              'attv4' (in 4-component vector of float)
-0:142  Function Definition: noise( (global void)
-0:142    Function Parameters: 
-0:144    Sequence
-0:144      Sequence
-0:144        move second child to first child (temp float)
-0:144          'f1' (temp float)
-0:144          noise (global float)
-0:144            Constant:
-0:144              1.000000
-0:145      Sequence
-0:145        move second child to first child (temp 2-component vector of float)
-0:145          'f2' (temp 2-component vector of float)
-0:145          noise (global 2-component vector of float)
-0:145            Constant:
-0:145              1.000000
-0:145              1.000000
-0:146      Sequence
-0:146        move second child to first child (temp 3-component vector of float)
-0:146          'f3' (temp 3-component vector of float)
-0:146          noise (global 3-component vector of float)
-0:146            Constant:
-0:146              1.000000
-0:146              1.000000
-0:146              1.000000
-0:147      Sequence
-0:147        move second child to first child (temp 4-component vector of float)
-0:147          'f4' (temp 4-component vector of float)
-0:147          noise (global 4-component vector of float)
-0:147            Constant:
-0:147              1.000000
-0:147              1.000000
-0:147              1.000000
-0:147              1.000000
-0:162  Function Definition: foo213( (global void)
-0:162    Function Parameters: 
-0:164    Sequence
-0:164      Sequence
-0:164        move second child to first child (temp float)
-0:164          'f' (temp float)
-0:164          Constant:
-0:164            3.000000
-0:165      switch
-0:165      condition
-0:165        'c' (uniform int)
-0:165      body
-0:165        Sequence
-0:166          case:  with expression
-0:166            Constant:
-0:166              1 (const int)
-0:?           Sequence
-0:167            move second child to first child (temp float)
-0:167              'f' (temp float)
-0:167              sine (global float)
-0:167                'f' (temp float)
-0:168            Branch: Break
-0:169          case:  with expression
-0:169            Constant:
-0:169              2 (const int)
-0:?           Sequence
-0:170            move second child to first child (temp float)
-0:170              'f' (temp float)
-0:170              component-wise multiply (temp float)
-0:170                'f' (temp float)
-0:170                'f' (temp float)
-0:171          default: 
-0:?           Sequence
-0:172            move second child to first child (temp float)
-0:172              'f' (temp float)
-0:172              Constant:
-0:172                3.000000
-0:176      inclusive-or (temp int)
-0:176        left-shift (temp int)
-0:176          'i' (temp int)
-0:176          Constant:
-0:176            3 (const int)
-0:176        Constant:
-0:176          69 (const int)
-0:180      Sequence
-0:180        move second child to first child (temp float)
-0:180          't' (temp float)
-0:180          Constant:
-0:180            0.000000
-0:186      Constant:
-0:186        0.000000
-0:188      Constant:
-0:188        0.000000
-0:189      Constant:
-0:189        0.000000
-0:192      move second child to first child (temp float)
-0:192        Constant:
-0:192          0.000000
-0:192        Constant:
-0:192          0.300000
 0:?   Linker Objects
 0:?     'i' (in 4-component vector of float)
 0:?     'o' (smooth out 4-component vector of float)
@@ -772,7 +492,6 @@
 0:?     'concall' (const float)
 0:?       0.295520
 0:?     'gl_TexCoord' (smooth out 35-element array of 4-component vector of float TexCoord)
-0:?     'gl_TexCoord' (smooth out 35-element array of 4-component vector of float TexCoord)
 0:?     'c' (uniform int)
 0:?     'x' (in 2-component vector of int)
 0:?     'v2a' (in 2-component vector of float)
diff --git a/Test/baseResults/130.frag.out b/Test/baseResults/130.frag.out
index b2b4dd0..e71b3e2 100644
--- a/Test/baseResults/130.frag.out
+++ b/Test/baseResults/130.frag.out
@@ -383,8 +383,7 @@
 0:?     'fnop' (noperspective in float)
 0:?     'gl_ClipDistance' (smooth in implicitly-sized array of float ClipDistance)
 0:?     'sampC' (uniform samplerCube)
-0:?     'gl_Color' (smooth in 4-component vector of float Color)
-0:?     'gl_Color' (flat in 4-component vector of float Color)
+0:?     'gl_Color' (in 4-component vector of float Color)
 0:?     'samp2D' (uniform sampler2D)
 0:?     'samp2DS' (uniform sampler2DShadow)
 0:?     'samp2DR' (uniform sampler2DRect)
@@ -428,326 +427,6 @@
 0:18            'gl_ClipDistance' (smooth in 4-element array of float ClipDistance)
 0:18            Constant:
 0:18              3 (const int)
-0:23  Function Definition: foo( (global void)
-0:23    Function Parameters: 
-0:25    Sequence
-0:25      Sequence
-0:25        move second child to first child (temp 4-component vector of float)
-0:25          's' (temp 4-component vector of float)
-0:25          textureGather (global 4-component vector of float)
-0:25            'sampC' (uniform samplerCube)
-0:25            Constant:
-0:25              0.200000
-0:25              0.200000
-0:25              0.200000
-0:30  Function Definition: bar( (global void)
-0:30    Function Parameters: 
-0:32    Sequence
-0:32      Sequence
-0:32        move second child to first child (temp 4-component vector of float)
-0:32          's' (temp 4-component vector of float)
-0:32          textureGather (global 4-component vector of float)
-0:32            'sampC' (uniform samplerCube)
-0:32            Constant:
-0:32              0.200000
-0:32              0.200000
-0:32              0.200000
-0:43  Function Definition: bar2( (global void)
-0:43    Function Parameters: 
-0:45    Sequence
-0:45      Sequence
-0:45        move second child to first child (temp 4-component vector of float)
-0:45          's' (temp 4-component vector of float)
-0:45          textureGather (global 4-component vector of float)
-0:45            'sampC' (uniform samplerCube)
-0:45            Constant:
-0:45              0.200000
-0:45              0.200000
-0:45              0.200000
-0:49      move second child to first child (temp 3-component vector of bool)
-0:49        'b3' (temp 3-component vector of bool)
-0:49        Compare Less Than (global 3-component vector of bool)
-0:49          'uv3' (temp 3-component vector of uint)
-0:49          'uv3' (temp 3-component vector of uint)
-0:50      move second child to first child (temp 3-component vector of bool)
-0:50        'b3' (temp 3-component vector of bool)
-0:50        Equal (global 3-component vector of bool)
-0:50          'uv3' (temp 3-component vector of uint)
-0:50          'uv3' (temp 3-component vector of uint)
-0:56      direct index (temp int)
-0:56        'a1' (temp 1-element array of int)
-0:56        Constant:
-0:56          0 (const int)
-0:57      direct index (temp int)
-0:57        'a2' (temp 1-element array of int)
-0:57        Constant:
-0:57          0 (const int)
-0:60      direct index (temp int)
-0:60        'a3' (temp 4-element array of int)
-0:60        Constant:
-0:60          3 (const int)
-0:61      Compare Not Equal (temp bool)
-0:61        'b3' (temp 3-component vector of bool)
-0:61        'b3' (temp 3-component vector of bool)
-0:62      Constant:
-0:62        false (const bool)
-0:63      Constant:
-0:63        false (const bool)
-0:64      Constant:
-0:64        false (const bool)
-0:65      Constant:
-0:65        true (const bool)
-0:66      Constant:
-0:66        false (const bool)
-0:77  Function Definition: bar23( (global void)
-0:77    Function Parameters: 
-0:?     Sequence
-0:80      's' (temp 4-component vector of float)
-0:81      move second child to first child (temp 4-component vector of float)
-0:81        's' (temp 4-component vector of float)
-0:81        textureGatherOffset (global 4-component vector of float)
-0:81          'samp2DR' (uniform sampler2DRect)
-0:81          Constant:
-0:81            0.300000
-0:81            0.300000
-0:81          Constant:
-0:81            1 (const int)
-0:81            1 (const int)
-0:82      move second child to first child (temp 4-component vector of float)
-0:82        's' (temp 4-component vector of float)
-0:82        textureGatherOffset (global 4-component vector of float)
-0:82          'samp2D' (uniform sampler2D)
-0:82          Constant:
-0:82            0.300000
-0:82            0.300000
-0:82          Constant:
-0:82            1 (const int)
-0:82            1 (const int)
-0:83      move second child to first child (temp 4-component vector of float)
-0:83        's' (temp 4-component vector of float)
-0:83        textureGatherOffset (global 4-component vector of float)
-0:83          'samp2DA' (uniform sampler2DArray)
-0:83          Constant:
-0:83            0.300000
-0:83            0.300000
-0:83            0.300000
-0:83          Constant:
-0:83            1 (const int)
-0:83            1 (const int)
-0:84      move second child to first child (temp 4-component vector of float)
-0:84        's' (temp 4-component vector of float)
-0:84        textureGatherOffset (global 4-component vector of float)
-0:84          'samp2DS' (uniform sampler2DShadow)
-0:84          Constant:
-0:84            0.300000
-0:84            0.300000
-0:84          Constant:
-0:84            1.300000
-0:84          Constant:
-0:84            1 (const int)
-0:84            1 (const int)
-0:85      move second child to first child (temp 4-component vector of float)
-0:85        's' (temp 4-component vector of float)
-0:85        textureGatherOffset (global 4-component vector of float)
-0:85          'samp2D' (uniform sampler2D)
-0:85          Constant:
-0:85            0.300000
-0:85            0.300000
-0:85          Constant:
-0:85            1 (const int)
-0:85            1 (const int)
-0:85          Constant:
-0:85            2 (const int)
-0:90  Function Definition: bar234( (global void)
-0:90    Function Parameters: 
-0:?     Sequence
-0:93      move second child to first child (temp 4-component vector of float)
-0:93        's' (temp 4-component vector of float)
-0:93        textureGatherOffset (global 4-component vector of float)
-0:93          'samp2D' (uniform sampler2D)
-0:93          Constant:
-0:93            0.300000
-0:93            0.300000
-0:93          Constant:
-0:93            1 (const int)
-0:93            1 (const int)
-0:94      move second child to first child (temp 4-component vector of float)
-0:94        's' (temp 4-component vector of float)
-0:94        textureGatherOffset (global 4-component vector of float)
-0:94          'samp2DA' (uniform sampler2DArray)
-0:94          Constant:
-0:94            0.300000
-0:94            0.300000
-0:94            0.300000
-0:94          Constant:
-0:94            1 (const int)
-0:94            1 (const int)
-0:95      move second child to first child (temp 4-component vector of float)
-0:95        's' (temp 4-component vector of float)
-0:95        textureGatherOffset (global 4-component vector of float)
-0:95          'samp2DR' (uniform sampler2DRect)
-0:95          Constant:
-0:95            0.300000
-0:95            0.300000
-0:95          Constant:
-0:95            1 (const int)
-0:95            1 (const int)
-0:96      move second child to first child (temp 4-component vector of float)
-0:96        's' (temp 4-component vector of float)
-0:96        textureGatherOffset (global 4-component vector of float)
-0:96          'samp2DS' (uniform sampler2DShadow)
-0:96          Constant:
-0:96            0.300000
-0:96            0.300000
-0:96          Constant:
-0:96            1.300000
-0:96          Constant:
-0:96            1 (const int)
-0:96            1 (const int)
-0:97      move second child to first child (temp 4-component vector of float)
-0:97        's' (temp 4-component vector of float)
-0:97        textureGatherOffset (global 4-component vector of float)
-0:97          'samp2D' (uniform sampler2D)
-0:97          Constant:
-0:97            0.300000
-0:97            0.300000
-0:97          Constant:
-0:97            1 (const int)
-0:97            1 (const int)
-0:97          Constant:
-0:97            2 (const int)
-0:107  Function Definition: bar235( (global void)
-0:107    Function Parameters: 
-0:109    Sequence
-0:109      Sequence
-0:109        move second child to first child (temp 3-component vector of int)
-0:109          'a' (temp 3-component vector of int)
-0:109          textureSize (global 3-component vector of int)
-0:109            'Sca' (uniform samplerCubeArray)
-0:109            Constant:
-0:109              3 (const int)
-0:110      Sequence
-0:110        move second child to first child (temp 4-component vector of float)
-0:110          'b' (temp 4-component vector of float)
-0:110          texture (global 4-component vector of float)
-0:110            'Sca' (uniform samplerCubeArray)
-0:110            'i' (smooth in 4-component vector of float)
-0:111      Sequence
-0:111        move second child to first child (temp 4-component vector of int)
-0:111          'c' (temp 4-component vector of int)
-0:111          texture (global 4-component vector of int)
-0:111            'Isca' (uniform isamplerCubeArray)
-0:111            'i' (smooth in 4-component vector of float)
-0:111            Constant:
-0:111              0.700000
-0:112      Sequence
-0:112        move second child to first child (temp 4-component vector of uint)
-0:112          'd' (temp 4-component vector of uint)
-0:112          texture (global 4-component vector of uint)
-0:112            'Usca' (uniform usamplerCubeArray)
-0:112            'i' (smooth in 4-component vector of float)
-0:114      move second child to first child (temp 4-component vector of float)
-0:114        'b' (temp 4-component vector of float)
-0:114        textureLod (global 4-component vector of float)
-0:114          'Sca' (uniform samplerCubeArray)
-0:114          'i' (smooth in 4-component vector of float)
-0:114          Constant:
-0:114            1.700000
-0:115      move second child to first child (temp 3-component vector of int)
-0:115        'a' (temp 3-component vector of int)
-0:115        textureSize (global 3-component vector of int)
-0:115          'Scas' (uniform samplerCubeArrayShadow)
-0:115          direct index (temp int)
-0:115            'a' (temp 3-component vector of int)
-0:115            Constant:
-0:115              0 (const int)
-0:116      Sequence
-0:116        move second child to first child (temp float)
-0:116          'f' (temp float)
-0:116          texture (global float)
-0:116            'Scas' (uniform samplerCubeArrayShadow)
-0:116            'i' (smooth in 4-component vector of float)
-0:116            direct index (temp float)
-0:116              'b' (temp 4-component vector of float)
-0:116              Constant:
-0:116                1 (const int)
-0:117      move second child to first child (temp 4-component vector of int)
-0:117        'c' (temp 4-component vector of int)
-0:117        textureGrad (global 4-component vector of int)
-0:117          'Isca' (uniform isamplerCubeArray)
-0:117          'i' (smooth in 4-component vector of float)
-0:117          Constant:
-0:117            0.100000
-0:117            0.100000
-0:117            0.100000
-0:117          Constant:
-0:117            0.200000
-0:117            0.200000
-0:117            0.200000
-0:129  Function Definition: bar23444( (global void)
-0:129    Function Parameters: 
-0:?     Sequence
-0:132      Sequence
-0:132        move second child to first child (temp float)
-0:132          'a1' (temp float)
-0:132          direct index (temp float)
-0:132            direct index (temp 3-component vector of float)
-0:132              'm43' (temp 4X3 matrix of float)
-0:132              Constant:
-0:132                3 (const int)
-0:132            Constant:
-0:132              1 (const int)
-0:134      Sequence
-0:134        move second child to first child (temp int)
-0:134          'a2' (temp int)
-0:134          Constant:
-0:134            4 (const int)
-0:135      add second child into first child (temp int)
-0:135        'a2' (temp int)
-0:135        Constant:
-0:135          3 (const int)
-0:136      add second child into first child (temp int)
-0:136        'a2' (temp int)
-0:136        Constant:
-0:136          3 (const int)
-0:137      Sequence
-0:137        move second child to first child (temp float)
-0:137          'b' (const (read only) float)
-0:137          component-wise multiply (temp float)
-0:137            Constant:
-0:137              2.000000
-0:137            'a1' (temp float)
-0:138      move second child to first child (temp float)
-0:138        direct index (temp float)
-0:138          'a' (global 3-component vector of float)
-0:138          Constant:
-0:138            0 (const int)
-0:138        Constant:
-0:138          -1.000000
-0:140      Constant:
-0:140        0.000000
-0:141      Constant:
-0:141        0.000000
-0:143      Constant:
-0:143        1 (const int)
-0:162  Function Definition: qux2( (global void)
-0:162    Function Parameters: 
-0:?     Sequence
-0:165      imageAtomicCompSwap (global int)
-0:165        'iimg2D' (layout(r32i ) uniform iimage2D)
-0:165        Construct ivec2 (temp 2-component vector of int)
-0:165          'i' (temp int)
-0:165          'i' (temp int)
-0:165        'i' (temp int)
-0:165        'i' (temp int)
-0:166      Sequence
-0:166        move second child to first child (temp 4-component vector of int)
-0:166          'pos' (temp 4-component vector of int)
-0:166          imageLoad (global 4-component vector of int)
-0:166            'iimg2D' (layout(r32i ) uniform iimage2D)
-0:166            Construct ivec2 (temp 2-component vector of int)
-0:166              'i' (temp int)
-0:166              'i' (temp int)
 0:?   Linker Objects
 0:?     'a' (global 3-component vector of float)
 0:?     'b' (global float)
@@ -759,8 +438,7 @@
 0:?     'fnop' (noperspective in float)
 0:?     'gl_ClipDistance' (smooth in 4-element array of float ClipDistance)
 0:?     'sampC' (uniform samplerCube)
-0:?     'gl_Color' (smooth in 4-component vector of float Color)
-0:?     'gl_Color' (flat in 4-component vector of float Color)
+0:?     'gl_Color' (in 4-component vector of float Color)
 0:?     'samp2D' (uniform sampler2D)
 0:?     'samp2DS' (uniform sampler2DShadow)
 0:?     'samp2DR' (uniform sampler2DRect)
diff --git a/Test/baseResults/130.vert.out b/Test/baseResults/130.vert.out
index 7cfeb19..1b3a0e1 100644
--- a/Test/baseResults/130.vert.out
+++ b/Test/baseResults/130.vert.out
@@ -269,23 +269,6 @@
 0:46            1 (const int)
 0:46        Constant:
 0:46          0.300000
-0:57  Function Definition: foo88( (global void)
-0:57    Function Parameters: 
-0:?     Sequence
-0:61      'id' (temp int)
-0:63      'gl_ClipVertex' (gl_ClipVertex 4-component vector of float ClipVertex)
-0:64      'gl_Color' (in 4-component vector of float Color)
-0:65      direct index (temp structure{global 4-component vector of float ambient, global 4-component vector of float diffuse, global 4-component vector of float specular, global 4-component vector of float position, global 4-component vector of float halfVector, global 3-component vector of float spotDirection, global float spotExponent, global float spotCutoff, global float spotCosCutoff, global float constantAttenuation, global float linearAttenuation, global float quadraticAttenuation})
-0:65        'gl_LightSource' (uniform 32-element array of structure{global 4-component vector of float ambient, global 4-component vector of float diffuse, global 4-component vector of float specular, global 4-component vector of float position, global 4-component vector of float halfVector, global 3-component vector of float spotDirection, global float spotExponent, global float spotCutoff, global float spotCosCutoff, global float constantAttenuation, global float linearAttenuation, global float quadraticAttenuation})
-0:65        Constant:
-0:65          0 (const int)
-0:66      far: direct index for structure (global float)
-0:66        'gl_DepthRange' (uniform structure{global float near, global float far, global float diff})
-0:66        Constant:
-0:66          1 (const int)
-0:67      'gl_TexCoord' (smooth out 1-element array of 4-component vector of float TexCoord)
-0:68      'gl_FogFragCoord' (smooth out float FogFragCoord)
-0:69      'gl_FrontColor' (smooth out 4-component vector of float FrontColor)
 0:?   Linker Objects
 0:?     'c' (uniform int)
 0:?     'us2D' (uniform usampler2D)
diff --git a/Test/baseResults/140.frag.out b/Test/baseResults/140.frag.out
index fbeee83..224cd30 100644
--- a/Test/baseResults/140.frag.out
+++ b/Test/baseResults/140.frag.out
@@ -104,7 +104,6 @@
 0:?     'i' (smooth in 4-component vector of float)
 0:?     'o' (out 4-component vector of float)
 0:?     'gl_ClipDistance' (smooth in 5-element array of float ClipDistance)
-0:?     'gl_ClipDistance' (smooth in 5-element array of float ClipDistance)
 0:?     's' (smooth in structure{global float f})
 0:?     'patch' (global float)
 0:?     'vl' (layout(location=3 ) smooth in 4-component vector of float)
@@ -137,51 +136,6 @@
 0:22      'patch' (global float)
 0:22      Constant:
 0:22        3.100000
-0:38  Function Definition: foo( (global void)
-0:38    Function Parameters: 
-0:40    Sequence
-0:40      Sequence
-0:40        move second child to first child (temp 2-component vector of float)
-0:40          'r1' (temp 2-component vector of float)
-0:40          modf (global 2-component vector of float)
-0:40            vector swizzle (temp 2-component vector of float)
-0:40              'v' (smooth in 4-component vector of float)
-0:40              Sequence
-0:40                Constant:
-0:40                  0 (const int)
-0:40                Constant:
-0:40                  1 (const int)
-0:40            vector swizzle (temp 2-component vector of float)
-0:40              'v' (smooth in 4-component vector of float)
-0:40              Sequence
-0:40                Constant:
-0:40                  2 (const int)
-0:40                Constant:
-0:40                  3 (const int)
-0:41      Sequence
-0:41        move second child to first child (temp 2-component vector of float)
-0:41          'r2' (temp 2-component vector of float)
-0:41          modf (global 2-component vector of float)
-0:41            vector swizzle (temp 2-component vector of float)
-0:41              'o' (out 4-component vector of float)
-0:41              Sequence
-0:41                Constant:
-0:41                  0 (const int)
-0:41                Constant:
-0:41                  1 (const int)
-0:41            vector swizzle (temp 2-component vector of float)
-0:41              'o' (out 4-component vector of float)
-0:41              Sequence
-0:41                Constant:
-0:41                  2 (const int)
-0:41                Constant:
-0:41                  3 (const int)
-0:42      move second child to first child (temp float)
-0:42        direct index (temp float)
-0:42          'o' (out 4-component vector of float)
-0:42          Constant:
-0:42            2 (const int)
-0:42        Function Call: fooi( (global float)
 0:47  Sequence
 0:47    move second child to first child (temp float)
 0:47      'i1' (global float)
@@ -199,19 +153,11 @@
 0:48      'i2' (global float)
 0:48      Constant:
 0:48        102.000000
-0:50  Function Definition: fooi( (global float)
-0:50    Function Parameters: 
-0:52    Sequence
-0:52      Branch: Return with expression
-0:52        add (temp float)
-0:52          'i1' (global float)
-0:52          'i2' (global float)
 0:?   Linker Objects
 0:?     'v' (smooth in 4-component vector of float)
 0:?     'i' (smooth in 4-component vector of float)
 0:?     'o' (out 4-component vector of float)
 0:?     'gl_ClipDistance' (smooth in 5-element array of float ClipDistance)
-0:?     'gl_ClipDistance' (smooth in 5-element array of float ClipDistance)
 0:?     's' (smooth in structure{global float f})
 0:?     'patch' (global float)
 0:?     'vl' (layout(location=3 ) smooth in 4-component vector of float)
diff --git a/Test/baseResults/140.vert.out b/Test/baseResults/140.vert.out
index 634458c..e7f88e3 100644
--- a/Test/baseResults/140.vert.out
+++ b/Test/baseResults/140.vert.out
@@ -124,10 +124,7 @@
 0:?     'locBad' (layout(location=9 ) in 4-component vector of float)
 0:?     'loc' (layout(location=9 ) in 4-component vector of float)
 0:?     'gl_PointSize' (gl_PointSize float PointSize)
-0:?     'gl_PointSize' (gl_PointSize float PointSize)
 0:?     'gl_ClipVertex' (gl_ClipVertex 4-component vector of float ClipVertex)
-0:?     'gl_ClipVertex' (gl_ClipVertex 4-component vector of float ClipVertex)
-0:?     'gl_FogFragCoord' (smooth out float FogFragCoord)
 0:?     'gl_FogFragCoord' (smooth out float FogFragCoord)
 0:?     's2dr' (uniform sampler2DRect)
 0:?     's2drs' (uniform sampler2DRectShadow)
@@ -181,71 +178,6 @@
 0:18      'gl_TexCoord' (smooth out 1-element array of 4-component vector of float TexCoord)
 0:19      'gl_FogFragCoord' (smooth out float FogFragCoord)
 0:20      'gl_FrontColor' (smooth out 4-component vector of float FrontColor)
-0:48  Function Definition: foo( (global void)
-0:48    Function Parameters: 
-0:50    Sequence
-0:50      Sequence
-0:50        move second child to first child (temp 4-component vector of float)
-0:50          'v' (temp 4-component vector of float)
-0:50          textureFetch (global 4-component vector of float)
-0:50            's2dr' (uniform sampler2DRect)
-0:50            'itloc2' (in 2-component vector of int)
-0:51      add second child into first child (temp 4-component vector of float)
-0:51        'v' (temp 4-component vector of float)
-0:51        Constant:
-0:51          0.000000
-0:52      add second child into first child (temp 4-component vector of float)
-0:52        'v' (temp 4-component vector of float)
-0:52        texture (global 4-component vector of float)
-0:52          's2dr' (uniform sampler2DRect)
-0:52          'tloc2' (in 2-component vector of float)
-0:53      add second child into first child (temp 4-component vector of float)
-0:53        'v' (temp 4-component vector of float)
-0:53        Constant:
-0:53          0.000000
-0:54      add second child into first child (temp 4-component vector of float)
-0:54        'v' (temp 4-component vector of float)
-0:54        texture (global float)
-0:54          's2drs' (uniform sampler2DRectShadow)
-0:54          'tloc3' (in 3-component vector of float)
-0:55      add second child into first child (temp 4-component vector of float)
-0:55        'v' (temp 4-component vector of float)
-0:55        textureProj (global 4-component vector of float)
-0:55          's2dr' (uniform sampler2DRect)
-0:55          'tloc3' (in 3-component vector of float)
-0:56      add second child into first child (temp 4-component vector of float)
-0:56        'v' (temp 4-component vector of float)
-0:56        textureProj (global 4-component vector of float)
-0:56          's2dr' (uniform sampler2DRect)
-0:56          'tloc4' (in 4-component vector of float)
-0:57      add second child into first child (temp 4-component vector of float)
-0:57        'v' (temp 4-component vector of float)
-0:57        textureProjGradOffset (global 4-component vector of float)
-0:57          's2dr' (uniform sampler2DRect)
-0:57          'tloc4' (in 4-component vector of float)
-0:57          Constant:
-0:57            0.000000
-0:57            0.000000
-0:57          Constant:
-0:57            0.000000
-0:57            0.000000
-0:57          Constant:
-0:57            1 (const int)
-0:57            2 (const int)
-0:58      add second child into first child (temp 4-component vector of float)
-0:58        'v' (temp 4-component vector of float)
-0:58        textureProjGradOffset (global float)
-0:58          's2drs' (uniform sampler2DRectShadow)
-0:58          'tloc4' (in 4-component vector of float)
-0:58          Constant:
-0:58            0.000000
-0:58            0.000000
-0:58          Constant:
-0:58            0.000000
-0:58            0.000000
-0:58          Constant:
-0:58            1 (const int)
-0:58            2 (const int)
 0:?   Linker Objects
 0:?     'sbuf' (uniform isamplerBuffer)
 0:?     'anon@0' (layout(column_major std140 ) uniform block{layout(column_major std140 offset=0 ) uniform int anonMem})
@@ -254,10 +186,7 @@
 0:?     'locBad' (layout(location=9 ) in 4-component vector of float)
 0:?     'loc' (layout(location=9 ) in 4-component vector of float)
 0:?     'gl_PointSize' (gl_PointSize float PointSize)
-0:?     'gl_PointSize' (gl_PointSize float PointSize)
 0:?     'gl_ClipVertex' (gl_ClipVertex 4-component vector of float ClipVertex)
-0:?     'gl_ClipVertex' (gl_ClipVertex 4-component vector of float ClipVertex)
-0:?     'gl_FogFragCoord' (smooth out float FogFragCoord)
 0:?     'gl_FogFragCoord' (smooth out float FogFragCoord)
 0:?     's2dr' (uniform sampler2DRect)
 0:?     's2drs' (uniform sampler2DRectShadow)
diff --git a/Test/baseResults/150.frag.out b/Test/baseResults/150.frag.out
index 082a827..143de3b 100644
--- a/Test/baseResults/150.frag.out
+++ b/Test/baseResults/150.frag.out
@@ -108,7 +108,6 @@
 0:49        'gl_PrimitiveID' (flat in int PrimitiveID)
 0:?   Linker Objects
 0:?     'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
-0:?     'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
 0:?     'foo' (smooth in 4-component vector of float)
 0:?     's' (smooth in structure{global float f})
 0:?     'patch' (global float)
@@ -142,93 +141,8 @@
 0:18      'patch' (global float)
 0:18      Constant:
 0:18        3.100000
-0:31  Function Definition: barWxyz( (global void)
-0:31    Function Parameters: 
-0:33    Sequence
-0:33      Sequence
-0:33        move second child to first child (temp 2-component vector of int)
-0:33          't11' (temp 2-component vector of int)
-0:33          textureSize (global 2-component vector of int)
-0:33            'sms' (uniform sampler2DMS)
-0:34      Sequence
-0:34        move second child to first child (temp 2-component vector of int)
-0:34          't12' (temp 2-component vector of int)
-0:34          textureSize (global 2-component vector of int)
-0:34            'isms' (uniform isampler2DMS)
-0:35      Sequence
-0:35        move second child to first child (temp 2-component vector of int)
-0:35          't13' (temp 2-component vector of int)
-0:35          textureSize (global 2-component vector of int)
-0:35            'usms' (uniform usampler2DMS)
-0:36      Sequence
-0:36        move second child to first child (temp 3-component vector of int)
-0:36          't21' (temp 3-component vector of int)
-0:36          textureSize (global 3-component vector of int)
-0:36            'smsa' (uniform sampler2DMSArray)
-0:37      Sequence
-0:37        move second child to first child (temp 3-component vector of int)
-0:37          't22' (temp 3-component vector of int)
-0:37          textureSize (global 3-component vector of int)
-0:37            'ismsa' (uniform isampler2DMSArray)
-0:38      Sequence
-0:38        move second child to first child (temp 3-component vector of int)
-0:38          't23' (temp 3-component vector of int)
-0:38          textureSize (global 3-component vector of int)
-0:38            'usmsa' (uniform usampler2DMSArray)
-0:39      Sequence
-0:39        move second child to first child (temp 4-component vector of float)
-0:39          't31' (temp 4-component vector of float)
-0:39          textureFetch (global 4-component vector of float)
-0:39            'sms' (uniform sampler2DMS)
-0:39            'p2' (flat in 2-component vector of int)
-0:39            'samp' (flat in int)
-0:40      Sequence
-0:40        move second child to first child (temp 4-component vector of int)
-0:40          't32' (temp 4-component vector of int)
-0:40          textureFetch (global 4-component vector of int)
-0:40            'isms' (uniform isampler2DMS)
-0:40            'p2' (flat in 2-component vector of int)
-0:40            'samp' (flat in int)
-0:41      Sequence
-0:41        move second child to first child (temp 4-component vector of uint)
-0:41          't33' (temp 4-component vector of uint)
-0:41          textureFetch (global 4-component vector of uint)
-0:41            'usms' (uniform usampler2DMS)
-0:41            'p2' (flat in 2-component vector of int)
-0:41            Constant:
-0:41              3 (const int)
-0:42      Sequence
-0:42        move second child to first child (temp 4-component vector of float)
-0:42          't41' (temp 4-component vector of float)
-0:42          textureFetch (global 4-component vector of float)
-0:42            'smsa' (uniform sampler2DMSArray)
-0:42            'p3' (flat in 3-component vector of int)
-0:42            'samp' (flat in int)
-0:43      Sequence
-0:43        move second child to first child (temp 4-component vector of int)
-0:43          't42' (temp 4-component vector of int)
-0:43          textureFetch (global 4-component vector of int)
-0:43            'ismsa' (uniform isampler2DMSArray)
-0:43            Constant:
-0:43              2 (const int)
-0:43              2 (const int)
-0:43              2 (const int)
-0:43            'samp' (flat in int)
-0:44      Sequence
-0:44        move second child to first child (temp 4-component vector of uint)
-0:44          't43' (temp 4-component vector of uint)
-0:44          textureFetch (global 4-component vector of uint)
-0:44            'usmsa' (uniform usampler2DMSArray)
-0:44            'p3' (flat in 3-component vector of int)
-0:44            'samp' (flat in int)
-0:47  Function Definition: primitiveID( (global int)
-0:47    Function Parameters: 
-0:49    Sequence
-0:49      Branch: Return with expression
-0:49        'gl_PrimitiveID' (flat in int PrimitiveID)
 0:?   Linker Objects
 0:?     'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
-0:?     'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
 0:?     'foo' (smooth in 4-component vector of float)
 0:?     's' (smooth in structure{global float f})
 0:?     'patch' (global float)
diff --git a/Test/baseResults/150.geom.out b/Test/baseResults/150.geom.out
index 48b7925..dc5a41a 100644
--- a/Test/baseResults/150.geom.out
+++ b/Test/baseResults/150.geom.out
@@ -255,39 +255,11 @@
 0:37        'gl_Layer' (layout(stream=0 ) out int Layer)
 0:37        Constant:
 0:37          2 (const int)
-0:67  Function Definition: foo(i1; (global void)
-0:67    Function Parameters: 
-0:67      'a' (in int)
-0:69    Sequence
-0:69      move second child to first child (temp 4-component vector of float)
-0:69        a: direct index for structure (layout(stream=6 ) out 4-component vector of float)
-0:69          'ouuaa6' (layout(stream=6 ) out block{layout(stream=6 ) out 4-component vector of float a})
-0:69          Constant:
-0:69            0 (const int)
-0:69        Constant:
-0:69          1.000000
-0:69          1.000000
-0:69          1.000000
-0:69          1.000000
 0:107  Sequence
 0:107    move second child to first child (temp float)
 0:107      'summ' (global float)
 0:107      Constant:
 0:107        11332.000000
-0:127  Function Definition: fooe1( (global void)
-0:127    Function Parameters: 
-0:129    Sequence
-0:129      move second child to first child (temp int)
-0:129        'gl_ViewportIndex' (layout(stream=0 ) out int ViewportIndex)
-0:129        Constant:
-0:129          15 (const int)
-0:134  Function Definition: fooe2( (global void)
-0:134    Function Parameters: 
-0:136    Sequence
-0:136      move second child to first child (temp int)
-0:136        'gl_ViewportIndex' (layout(stream=0 ) out int ViewportIndex)
-0:136        Constant:
-0:136          15 (const int)
 0:?   Linker Objects
 0:?     'fromV' (in 4-element array of block{in 3-component vector of float color})
 0:?     'toF' (layout(stream=0 ) out block{layout(stream=0 ) out 3-component vector of float color})
diff --git a/Test/baseResults/150.tesc.out b/Test/baseResults/150.tesc.out
index 1736bf0..21fade7 100644
--- a/Test/baseResults/150.tesc.out
+++ b/Test/baseResults/150.tesc.out
@@ -910,8 +910,10 @@
 
 Linked tessellation control stage:
 
+ERROR: Linking tessellation control stage: can't handle multiple entry points per stage
 ERROR: Linking tessellation control stage: Multiple function bodies in multiple compilation units for the same signature in the same stage:
     main(
+ERROR: Linking tessellation control stage: can't handle multiple entry points per stage
 ERROR: Linking tessellation control stage: Contradictory layout vertices values
 ERROR: Linking tessellation control stage: Multiple function bodies in multiple compilation units for the same signature in the same stage:
     main(
@@ -921,6 +923,7 @@
     gl_out: "out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance}" versus "out implicitly-sized array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance}"
 ERROR: Linking tessellation control stage: Types must match:
     outa: "global 4-element array of int" versus "global 1-element array of int"
+ERROR: Linking tessellation control stage: can't handle multiple entry points per stage
 ERROR: Linking tessellation control stage: Multiple function bodies in multiple compilation units for the same signature in the same stage:
     main(
 ERROR: Linking tessellation control stage: Multiple function bodies in multiple compilation units for the same signature in the same stage:
@@ -934,8 +937,10 @@
 
 Linked tessellation evaluation stage:
 
+ERROR: Linking tessellation evaluation stage: can't handle multiple entry points per stage
 ERROR: Linking tessellation evaluation stage: Multiple function bodies in multiple compilation units for the same signature in the same stage:
     main(
+ERROR: Linking tessellation evaluation stage: can't handle multiple entry points per stage
 ERROR: Linking tessellation evaluation stage: Contradictory input layout primitives
 ERROR: Linking tessellation evaluation stage: Contradictory input vertex spacing
 ERROR: Linking tessellation evaluation stage: Contradictory triangle ordering
@@ -1184,35 +1189,6 @@
 0:56        Barrier (global void)
 0:59      Branch: Return
 0:61      Barrier (global void)
-0:67  Function Definition: foo( (global void)
-0:67    Function Parameters: 
-0:69    Sequence
-0:69      gl_PointSize: direct index for structure (out float PointSize)
-0:69        direct index (temp block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
-0:69          'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
-0:69          Constant:
-0:69            4 (const int)
-0:69        Constant:
-0:69          1 (const int)
-0:71      Barrier (global void)
-0:91  Function Definition: foop( (global void)
-0:91    Function Parameters: 
-0:?     Sequence
-0:95      multiply second child into first child (temp 3-component vector of float)
-0:95        'pv3' (noContraction temp 3-component vector of float)
-0:95        'pv3' (noContraction temp 3-component vector of float)
-0:96      move second child to first child (temp 3-component vector of float)
-0:96        'pv3' (noContraction temp 3-component vector of float)
-0:96        fma (global 3-component vector of float)
-0:96          'pv3' (noContraction temp 3-component vector of float)
-0:96          'pv3' (noContraction temp 3-component vector of float)
-0:96          'pv3' (noContraction temp 3-component vector of float)
-0:97      move second child to first child (temp double)
-0:97        'd' (noContraction temp double)
-0:97        fma (global double)
-0:97          'd' (noContraction temp double)
-0:97          'd' (noContraction temp double)
-0:97          'd' (noContraction temp double)
 0:8  Function Definition: main( (global void)
 0:8    Function Parameters: 
 0:15  Function Definition: main( (global void)
@@ -1274,41 +1250,6 @@
 0:26      indirect index (temp block{out 4-component vector of float Position gl_Position})
 0:26        'gl_out' (out 3-element array of block{out 4-component vector of float Position gl_Position})
 0:26        'gl_InvocationID' (in int InvocationID)
-0:34  Function Definition: foo( (global void)
-0:34    Function Parameters: 
-0:36    Sequence
-0:36      Test condition and select (temp void)
-0:36        Condition
-0:36        logical-or (temp bool)
-0:36          Compare Not Equal (temp bool)
-0:36            Constant:
-0:36              -0.625000
-0:36              -0.500000
-0:36              -0.375000
-0:36              -0.250000
-0:36              -0.375000
-0:36              -0.250000
-0:36              -0.125000
-0:36              0.000000
-0:36            direct index (layout(location=0 ) temp 2X4 matrix of double)
-0:36              'vs_tcs_first' (layout(location=0 ) in 32-element array of 2X4 matrix of double)
-0:36              Constant:
-0:36                0 (const int)
-0:37          Compare Not Equal (temp bool)
-0:37            Constant:
-0:37              0.375000
-0:37              0.500000
-0:37              0.625000
-0:37              0.750000
-0:37              0.625000
-0:37              0.750000
-0:37              0.875000
-0:37              -0.625000
-0:37            direct index (layout(location=12 ) temp 2X4 matrix of double)
-0:37              'vs_tcs_last' (layout(location=12 ) in 32-element array of 2X4 matrix of double)
-0:37              Constant:
-0:37                0 (const int)
-0:36        true case is null
 0:?   Linker Objects
 0:?     'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
 0:?     'outa' (global 4-element array of int)
diff --git a/Test/baseResults/300.frag.out b/Test/baseResults/300.frag.out
index 6ec58aa..cca6abd 100644
--- a/Test/baseResults/300.frag.out
+++ b/Test/baseResults/300.frag.out
@@ -592,131 +592,6 @@
 0:96          'c4D' (smooth temp lowp 4-component vector of float)
 0:97      arc hyp. tangent (global lowp 3-component vector of float)
 0:97        'c3D' (smooth in lowp 3-component vector of float)
-0:108  Function Definition: foo( (global void)
-0:108    Function Parameters: 
-0:110    Sequence
-0:110      move second child to first child (temp lowp 4-component vector of float)
-0:110        direct index (temp lowp 4-component vector of float)
-0:110          'colors' (out 4-element array of lowp 4-component vector of float)
-0:110          Constant:
-0:110            2 (const int)
-0:110        'c4D' (smooth temp lowp 4-component vector of float)
-0:111      move second child to first child (temp lowp 4-component vector of float)
-0:111        indirect index (temp lowp 4-component vector of float)
-0:111          'colors' (out 4-element array of lowp 4-component vector of float)
-0:111          'ic1D' (flat in mediump int)
-0:111        'c4D' (smooth temp lowp 4-component vector of float)
-0:117  Function Definition: foo13(struct-s-i1-s211; (global void)
-0:117    Function Parameters: 
-0:117      'inSt2' (in structure{global mediump int i, global lowp sampler2D s})
-0:119    Sequence
-0:119      Test condition and select (temp void)
-0:119        Condition
-0:119        Compare Equal (temp bool)
-0:119          'st1' (uniform structure{global mediump int i, global lowp sampler2D s})
-0:119          'st2' (uniform structure{global mediump int i, global lowp sampler2D s})
-0:119        true case is null
-0:120      Test condition and select (temp void)
-0:120        Condition
-0:120        Compare Not Equal (temp bool)
-0:120          'st1' (uniform structure{global mediump int i, global lowp sampler2D s})
-0:120          'st2' (uniform structure{global mediump int i, global lowp sampler2D s})
-0:120        true case is null
-0:121      Constant:
-0:121        false (const bool)
-0:122      move second child to first child (temp structure{global mediump int i, global lowp sampler2D s})
-0:122        'inSt2' (in structure{global mediump int i, global lowp sampler2D s})
-0:122        'st1' (uniform structure{global mediump int i, global lowp sampler2D s})
-0:123      Compare Equal (temp bool)
-0:123        'inSt2' (in structure{global mediump int i, global lowp sampler2D s})
-0:123        'st1' (uniform structure{global mediump int i, global lowp sampler2D s})
-0:126  Function Definition: foo23( (global void)
-0:126    Function Parameters: 
-0:128    Sequence
-0:128      textureOffset (global lowp float)
-0:128        's2DShadow' (uniform lowp sampler2DShadow)
-0:128        'c3D' (smooth in lowp 3-component vector of float)
-0:128        Constant:
-0:128          -8 (const int)
-0:128          7 (const int)
-0:128        'c1D' (smooth in lowp float)
-0:129      textureOffset (global lowp float)
-0:129        's2DShadow' (uniform lowp sampler2DShadow)
-0:129        'c3D' (smooth in lowp 3-component vector of float)
-0:129        Constant:
-0:129          -9 (const int)
-0:129          8 (const int)
-0:129        'c1D' (smooth in lowp float)
-0:132  Function Definition: foo324( (global void)
-0:132    Function Parameters: 
-0:134    Sequence
-0:134      Sequence
-0:134        move second child to first child (temp lowp float)
-0:134          'p' (temp lowp float)
-0:134          Constant:
-0:134            210.712306
-0:135      add second child into first child (temp lowp float)
-0:135        'p' (temp lowp float)
-0:135        Constant:
-0:135          0.389418
-0:136      add second child into first child (temp lowp float)
-0:136        'p' (temp lowp float)
-0:136        Constant:
-0:136          5.000000
-0:137      add second child into first child (temp lowp float)
-0:137        'p' (temp lowp float)
-0:137        Constant:
-0:137          13.000000
-0:138      Sequence
-0:138        move second child to first child (temp lowp 3-component vector of float)
-0:138          'c3' (temp lowp 3-component vector of float)
-0:138          Constant:
-0:138            -15.000000
-0:138            -2.000000
-0:138            39.000000
-0:139      add second child into first child (temp lowp 3-component vector of float)
-0:139        'c3' (temp lowp 3-component vector of float)
-0:139        Constant:
-0:139          -1.000000
-0:139          -2.000000
-0:139          -3.000000
-0:140      add second child into first child (temp lowp 3-component vector of float)
-0:140        'c3' (temp lowp 3-component vector of float)
-0:140        Constant:
-0:140          1.000000
-0:140          2.000000
-0:140          3.000000
-0:141      Sequence
-0:141        move second child to first child (temp lowp 2-component vector of float)
-0:141          'c2' (temp lowp 2-component vector of float)
-0:141          Constant:
-0:141            1.000000
-0:141            -3.000000
-0:142      add second child into first child (temp lowp 2-component vector of float)
-0:142        'c2' (temp lowp 2-component vector of float)
-0:142        Constant:
-0:142          1.000000
-0:142          -3.000000
-0:143      add second child into first child (temp lowp 2-component vector of float)
-0:143        'c2' (temp lowp 2-component vector of float)
-0:143        Constant:
-0:143          3.000000
-0:143          -8.544004
-0:144      add second child into first child (temp lowp 2-component vector of float)
-0:144        'c2' (temp lowp 2-component vector of float)
-0:144        Constant:
-0:144          0.000000
-0:144          0.000000
-0:145      Sequence
-0:145        move second child to first child (temp lowp 3X2 matrix of float)
-0:145          'm32' (temp lowp 3X2 matrix of float)
-0:145          Constant:
-0:145            10.000000
-0:145            15.000000
-0:145            14.000000
-0:145            21.000000
-0:145            22.000000
-0:145            33.000000
 0:?   Linker Objects
 0:?     's2D' (uniform lowp sampler2D)
 0:?     's3D' (uniform lowp sampler3D)
diff --git a/Test/baseResults/300.vert.out b/Test/baseResults/300.vert.out
index ecfa3d5..5f060cb 100644
--- a/Test/baseResults/300.vert.out
+++ b/Test/baseResults/300.vert.out
@@ -308,9 +308,9 @@
 0:?     'badsize2' (global implicitly-sized array of highp float)
 0:?     'ubInst' (layout(column_major shared ) uniform implicitly-sized array of block{layout(column_major shared ) uniform implicitly-sized array of highp int a})
 0:?     'okayA' (global 2-element array of highp float)
-0:?     'newV' (smooth out highp 3-component vector of float)
-0:?     'invIn' (in highp 4-component vector of float)
-0:?     's2' (smooth out structure{global highp 3-component vector of float c, global highp float f})
+0:?     'newV' (invariant smooth out highp 3-component vector of float)
+0:?     'invIn' (invariant in highp 4-component vector of float)
+0:?     's2' (invariant smooth out structure{global highp 3-component vector of float c, global highp float f})
 0:?     's3' (invariant smooth out structure{global highp 3-component vector of float c, global highp float f})
 0:?     'a' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform highp float f})
 0:?     'anon@0' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform bool b23})
@@ -447,132 +447,6 @@
 0:68      Constant:
 0:68        3.000000
 0:68        4.000000
-0:71  Function Definition: newVFun( (global void)
-0:71    Function Parameters: 
-0:73    Sequence
-0:73      move second child to first child (temp highp 3-component vector of float)
-0:73        'newV' (smooth out highp 3-component vector of float)
-0:73        'v3' (in highp 3-component vector of float)
-0:118  Function Definition: foo23( (global void)
-0:118    Function Parameters: 
-0:120    Sequence
-0:120      Sequence
-0:120        move second child to first child (temp highp 2-component vector of int)
-0:120          'x1' (temp highp 2-component vector of int)
-0:120          textureSize (global highp 2-component vector of int, operation at lowp)
-0:120            's2D' (uniform lowp sampler2D)
-0:120            Constant:
-0:120              2 (const int)
-0:121      Constant:
-0:121        0.000000
-0:122      Sequence
-0:122        move second child to first child (temp highp 3-component vector of int)
-0:122          'x3' (temp highp 3-component vector of int)
-0:122          textureSize (global highp 3-component vector of int, operation at lowp)
-0:122            's2DAS' (uniform lowp sampler2DArrayShadow)
-0:122            Constant:
-0:122              -1 (const int)
-0:123      Constant:
-0:123        0.000000
-0:124      Sequence
-0:124        move second child to first child (temp highp 4-component vector of float)
-0:124          'x4' (temp highp 4-component vector of float)
-0:124          texture (global lowp 4-component vector of float, operation at highp)
-0:124            's2D' (uniform lowp sampler2D)
-0:124            'c2D' (in highp 2-component vector of float)
-0:125      Constant:
-0:125        0.000000
-0:126      Sequence
-0:126        move second child to first child (temp highp 4-component vector of float)
-0:126          'x5' (temp highp 4-component vector of float)
-0:126          textureProjOffset (global lowp 4-component vector of float)
-0:126            's3D' (uniform lowp sampler3D)
-0:126            Constant:
-0:126              0.200000
-0:126              0.200000
-0:126              0.200000
-0:126              0.200000
-0:126            Constant:
-0:126              1 (const int)
-0:126              1 (const int)
-0:126              1 (const int)
-0:127      Constant:
-0:127        0.000000
-0:128      Sequence
-0:128        move second child to first child (temp highp float)
-0:128          'x6' (temp highp float)
-0:128          textureProjGradOffset (global lowp float, operation at highp)
-0:128            's2DS' (uniform lowp sampler2DShadow)
-0:128            'invIn' (invariant in highp 4-component vector of float)
-0:128            Constant:
-0:128              4.200000
-0:128              4.200000
-0:128            Constant:
-0:128              5.300000
-0:128              5.300000
-0:128            Constant:
-0:128              1 (const int)
-0:128              1 (const int)
-0:137  Function Definition: foo2349( (global void)
-0:137    Function Parameters: 
-0:139    Sequence
-0:139      Sequence
-0:139        move second child to first child (temp 3-element array of highp float)
-0:139          'x' (temp 3-element array of highp float)
-0:139          Constant:
-0:139            1.000000
-0:139            2.000000
-0:139            3.000000
-0:140      Sequence
-0:140        move second child to first child (temp 3-element array of highp float)
-0:140          'y' (temp 3-element array of highp float)
-0:140          'x' (temp 3-element array of highp float)
-0:141      Sequence
-0:141        move second child to first child (temp 3-element array of highp float)
-0:141          'z' (temp 3-element array of highp float)
-0:141          'x' (temp 3-element array of highp float)
-0:143      move second child to first child (temp 3-element array of highp float)
-0:143        'w' (temp 3-element array of highp float)
-0:143        'y' (temp 3-element array of highp float)
-0:155  Function Definition: gggf(f1; (global highp int)
-0:155    Function Parameters: 
-0:155      'f' (in highp float)
-0:155    Sequence
-0:155      Branch: Return with expression
-0:155        Constant:
-0:155          2 (const int)
-0:158  Function Definition: agggf(f1; (global highp int)
-0:158    Function Parameters: 
-0:158      'f' (in highp float)
-0:158    Sequence
-0:158      Branch: Return with expression
-0:158        Constant:
-0:158          2 (const int)
-0:178  Function Definition: fooDeeparray( (global void)
-0:178    Function Parameters: 
-0:181    Sequence
-0:181      Sequence
-0:180        move second child to first child (temp 3-element array of highp float)
-0:180          'x' (temp 3-element array of highp float)
-0:180          Constant:
-0:180            1.000000
-0:180            2.000000
-0:180            3.000000
-0:181        move second child to first child (temp 4-element array of highp float)
-0:181          'y' (temp 4-element array of highp float)
-0:181          Constant:
-0:181            1.000000
-0:181            2.000000
-0:181            3.000000
-0:181            4.000000
-0:183      move second child to first child (temp 3-element array of highp float)
-0:183        'xp' (temp 3-element array of highp float)
-0:183        'x' (temp 3-element array of highp float)
-0:184      move second child to first child (temp 4-element array of highp float)
-0:184        'yp' (temp 4-element array of highp float)
-0:184        'y' (temp 4-element array of highp float)
-0:185      'xp' (temp 3-element array of highp float)
-0:186      'yp' (temp 4-element array of highp float)
 0:?   Linker Objects
 0:?     'm43' (uniform highp 4X3 matrix of float)
 0:?     'm33' (uniform highp 3X3 matrix of float)
@@ -592,9 +466,9 @@
 0:?     'badsize2' (global 1-element array of highp float)
 0:?     'ubInst' (layout(column_major shared ) uniform 1-element array of block{layout(column_major shared ) uniform 1-element array of highp int a})
 0:?     'okayA' (global 2-element array of highp float)
-0:?     'newV' (smooth out highp 3-component vector of float)
-0:?     'invIn' (in highp 4-component vector of float)
-0:?     's2' (smooth out structure{global highp 3-component vector of float c, global highp float f})
+0:?     'newV' (invariant smooth out highp 3-component vector of float)
+0:?     'invIn' (invariant in highp 4-component vector of float)
+0:?     's2' (invariant smooth out structure{global highp 3-component vector of float c, global highp float f})
 0:?     's3' (invariant smooth out structure{global highp 3-component vector of float c, global highp float f})
 0:?     'a' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform highp float f})
 0:?     'anon@0' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform bool b23})
diff --git a/Test/baseResults/300scope.vert.out b/Test/baseResults/300scope.vert.out
index 2a9a945..e340cf6 100644
--- a/Test/baseResults/300scope.vert.out
+++ b/Test/baseResults/300scope.vert.out
@@ -131,6 +131,8 @@
 
 Linked vertex stage:
 
+ERROR: Linking vertex stage: No function definition (body) found: 
+    g(
 
 Shader version: 300
 ERROR: node is still EOpNull!
@@ -151,16 +153,6 @@
 0:8                1.000000
 0:11      Branch: Return with expression
 0:11        'a' (in highp int)
-0:25  Function Definition: cos(f1; (global highp float)
-0:25    Function Parameters: 
-0:25      'x' (in highp float)
-0:27    Sequence
-0:27      Branch: Return
-0:29  Function Definition: radians(b1; (global bool)
-0:29    Function Parameters: 
-0:29      'x' (in bool)
-0:31    Sequence
-0:31      Branch: Return
 0:36  Function Definition: main( (global void)
 0:36    Function Parameters: 
 0:?     Sequence
diff --git a/Test/baseResults/310.comp.out b/Test/baseResults/310.comp.out
index 9a5e4e8..a5be10e 100644
--- a/Test/baseResults/310.comp.out
+++ b/Test/baseResults/310.comp.out
@@ -536,340 +536,6 @@
 0:36              Constant:
 0:36                1 (const uint)
 0:36            'gl_LocalInvocationIndex' (in highp uint LocalInvocationIndex)
-0:59  Function Definition: foo( (global void)
-0:59    Function Parameters: 
-0:61    Sequence
-0:61      move second child to first child (temp highp float)
-0:61        direct index (layout(column_major shared ) temp highp float)
-0:61          values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
-0:61            'ro' (layout(column_major shared ) readonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
-0:61            Constant:
-0:61              1 (const int)
-0:61          Constant:
-0:61            2 (const int)
-0:61        Constant:
-0:61          4.700000
-0:62      array length (temp int)
-0:62        values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
-0:62          'ro' (layout(column_major shared ) readonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
-0:62          Constant:
-0:62            1 (const int)
-0:63      Pre-Increment (temp highp 4-component vector of float)
-0:63        's' (shared highp 4-component vector of float)
-0:84  Function Definition: qux( (global void)
-0:84    Function Parameters: 
-0:86    Sequence
-0:86      Sequence
-0:86        move second child to first child (temp highp int)
-0:86          'i' (temp highp int)
-0:86          Constant:
-0:86            4 (const int)
-0:87      imageAtomicCompSwap (global highp int)
-0:87        'iimg2D' (layout(r32i ) uniform highp iimage2D)
-0:87        Construct ivec2 (temp highp 2-component vector of int)
-0:87          'i' (temp highp int)
-0:87          'i' (temp highp int)
-0:87        'i' (temp highp int)
-0:87        'i' (temp highp int)
-0:88      imageAtomicAdd (global highp uint)
-0:88        'uimg2D' (layout(r32ui ) uniform mediump uimage2D)
-0:88        Construct ivec2 (temp highp 2-component vector of int)
-0:88          'i' (temp highp int)
-0:88          'i' (temp highp int)
-0:88        Convert int to uint (temp highp uint)
-0:88          'i' (temp highp int)
-0:89      imageAtomicMin (global highp int)
-0:89        'iimg2Drgba' (layout(rgba32i ) readonly uniform highp iimage2D)
-0:89        Construct ivec2 (temp highp 2-component vector of int)
-0:89          'i' (temp highp int)
-0:89          'i' (temp highp int)
-0:89        'i' (temp highp int)
-0:90      Constant:
-0:90        0.000000
-0:91      Sequence
-0:91        move second child to first child (temp highp 4-component vector of int)
-0:91          'pos' (temp highp 4-component vector of int)
-0:91          imageLoad (global highp 4-component vector of int)
-0:91            'iimg2D' (layout(r32i ) uniform highp iimage2D)
-0:91            Construct ivec2 (temp highp 2-component vector of int)
-0:91              'i' (temp highp int)
-0:91              'i' (temp highp int)
-0:92      imageStore (global highp void)
-0:92        'ii2da' (writeonly uniform highp iimage2DArray)
-0:92        Construct ivec3 (temp 3-component vector of int)
-0:92          'i' (temp highp int)
-0:92          'i' (temp highp int)
-0:92          'i' (temp highp int)
-0:92        Constant:
-0:92          0 (const int)
-0:92          0 (const int)
-0:92          0 (const int)
-0:92          0 (const int)
-0:93      imageLoad (global mediump 4-component vector of float)
-0:93        'img2Drgba' (layout(rgba32f ) readonly uniform mediump image2D)
-0:93        Construct ivec2 (temp mediump 2-component vector of int)
-0:93          'i' (temp highp int)
-0:93          'i' (temp highp int)
-0:94      imageLoad (global highp 4-component vector of int)
-0:94        'ii2da' (writeonly uniform highp iimage2DArray)
-0:94        Construct ivec3 (temp highp 3-component vector of int)
-0:94          'i' (temp highp int)
-0:94          'i' (temp highp int)
-0:94          'i' (temp highp int)
-0:100  Function Definition: passr(iI21; (global void)
-0:100    Function Parameters: 
-0:100      'image' (coherent readonly in highp iimage2D)
-0:107  Function Definition: passrc( (global void)
-0:107    Function Parameters: 
-0:109    Sequence
-0:109      Function Call: passr(iI21; (global void)
-0:109        'qualim1' (layout(r32i ) coherent readonly uniform highp iimage2D)
-0:110      Function Call: passr(iI21; (global void)
-0:110        'qualim2' (layout(r32i ) coherent restrict readonly uniform highp iimage2D)
-0:111      Function Call: passr(iI21; (global void)
-0:111        'iimg2D' (layout(r32i ) uniform highp iimage2D)
-0:123  Function Definition: func(au1; (global highp uint)
-0:123    Function Parameters: 
-0:123      'c' (in highp atomic_uint)
-0:125    Sequence
-0:125      Branch: Return with expression
-0:125        AtomicCounterIncrement (global highp uint)
-0:125          'c' (in highp atomic_uint)
-0:128  Function Definition: func2(au1; (global highp uint)
-0:128    Function Parameters: 
-0:128      'c' (out highp atomic_uint)
-0:130    Sequence
-0:130      Branch: Return with expression
-0:130        'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
-0:131      Branch: Return with expression
-0:131        AtomicCounter (global highp uint)
-0:131          'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
-0:134  Function Definition: mainAC( (global void)
-0:134    Function Parameters: 
-0:?     Sequence
-0:137      Sequence
-0:137        move second child to first child (temp highp uint)
-0:137          'val' (temp highp uint)
-0:137          AtomicCounter (global highp uint)
-0:137            'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
-0:138      AtomicCounterDecrement (global highp uint)
-0:138        'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
-0:146  Function Definition: opac( (global void)
-0:146    Function Parameters: 
-0:?     Sequence
-0:149      indirect index (temp highp int)
-0:149        'a' (temp 3-element array of highp int)
-0:149        'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
-0:150      direct index (layout(binding=2 offset=4 ) temp highp atomic_uint)
-0:150        'countArr' (layout(binding=2 offset=4 ) uniform 4-element array of highp atomic_uint)
-0:150        Constant:
-0:150          2 (const int)
-0:151      indirect index (layout(binding=2 offset=4 ) temp highp atomic_uint)
-0:151        'countArr' (layout(binding=2 offset=4 ) uniform 4-element array of highp atomic_uint)
-0:151        'i' (uniform highp int)
-0:157  Function Definition: atoms( (global void)
-0:157    Function Parameters: 
-0:159    Sequence
-0:159      Sequence
-0:159        move second child to first child (temp highp int)
-0:159          'origi' (temp highp int)
-0:159          AtomicAdd (global highp int)
-0:159            'atomi' (shared highp int)
-0:159            Constant:
-0:159              3 (const int)
-0:160      Sequence
-0:160        move second child to first child (temp highp uint)
-0:160          'origu' (temp highp uint)
-0:160          AtomicAnd (global highp uint)
-0:160            'atomu' (shared highp uint)
-0:160            Constant:
-0:160              7 (const uint)
-0:161      move second child to first child (temp highp int)
-0:161        'origi' (temp highp int)
-0:161        AtomicExchange (global highp int)
-0:161          'atomi' (shared highp int)
-0:161          Constant:
-0:161            4 (const int)
-0:162      move second child to first child (temp highp uint)
-0:162        'origu' (temp highp uint)
-0:162        AtomicCompSwap (global highp uint)
-0:162          'atomu' (shared highp uint)
-0:162          Constant:
-0:162            10 (const uint)
-0:162          Constant:
-0:162            8 (const uint)
-0:191  Function Definition: foowo( (global void)
-0:191    Function Parameters: 
-0:?     Sequence
-0:194      move second child to first child (temp highp float)
-0:194        'g' (temp highp float)
-0:194        direct index (layout(column_major shared ) temp highp float)
-0:194          values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
-0:194            'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
-0:194            Constant:
-0:194              1 (const int)
-0:194          Constant:
-0:194            2 (const int)
-0:195      Sequence
-0:195        move second child to first child (temp highp float)
-0:195          'f' (temp highp float)
-0:195          direct index (layout(column_major shared ) temp highp float)
-0:195            values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
-0:195              'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
-0:195              Constant:
-0:195                1 (const int)
-0:195            Constant:
-0:195              2 (const int)
-0:196      Pre-Increment (temp highp float)
-0:196        direct index (layout(column_major shared ) temp highp float)
-0:196          values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
-0:196            'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
-0:196            Constant:
-0:196              1 (const int)
-0:196          Constant:
-0:196            2 (const int)
-0:197      Post-Decrement (temp highp float)
-0:197        direct index (layout(column_major shared ) temp highp float)
-0:197          values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
-0:197            'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
-0:197            Constant:
-0:197              1 (const int)
-0:197          Constant:
-0:197            2 (const int)
-0:198      add (temp highp float)
-0:198        'f' (temp highp float)
-0:198        direct index (layout(column_major shared ) temp highp float)
-0:198          values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
-0:198            'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
-0:198            Constant:
-0:198              1 (const int)
-0:198          Constant:
-0:198            2 (const int)
-0:199      subtract (temp highp float)
-0:199        direct index (layout(column_major shared ) temp highp float)
-0:199          values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
-0:199            'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
-0:199            Constant:
-0:199              1 (const int)
-0:199          Constant:
-0:199            2 (const int)
-0:199        'f' (temp highp float)
-0:201      Test condition and select (temp highp float)
-0:201        Condition
-0:201        'b' (temp bool)
-0:201        true case
-0:201        'f' (temp highp float)
-0:201        false case
-0:201        direct index (layout(column_major shared ) temp highp float)
-0:201          values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
-0:201            'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
-0:201            Constant:
-0:201              1 (const int)
-0:201          Constant:
-0:201            2 (const int)
-0:202      Test condition and select (temp highp float)
-0:202        Condition
-0:202        'b' (temp bool)
-0:202        true case
-0:202        direct index (layout(column_major shared ) temp highp float)
-0:202          values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
-0:202            'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
-0:202            Constant:
-0:202              1 (const int)
-0:202          Constant:
-0:202            2 (const int)
-0:202        false case
-0:202        'f' (temp highp float)
-0:203      Test condition and select (temp void)
-0:203        Condition
-0:203        Compare Equal (temp bool)
-0:203          'f' (temp highp float)
-0:203          direct index (layout(column_major shared ) temp highp float)
-0:203            values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
-0:203              'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
-0:203              Constant:
-0:203                1 (const int)
-0:203            Constant:
-0:203              2 (const int)
-0:203        true case
-0:204        Pre-Increment (temp highp float)
-0:204          'f' (temp highp float)
-0:205      Test condition and select (temp void)
-0:205        Condition
-0:205        Compare Greater Than or Equal (temp bool)
-0:205          'f' (temp highp float)
-0:205          direct index (layout(column_major shared ) temp highp float)
-0:205            values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
-0:205              'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
-0:205              Constant:
-0:205                1 (const int)
-0:205            Constant:
-0:205              2 (const int)
-0:205        true case
-0:206        Pre-Increment (temp highp float)
-0:206          'f' (temp highp float)
-0:207      move second child to first child (temp highp float)
-0:207        'f' (temp highp float)
-0:207        direct index (temp highp float)
-0:207          Construct vec3 (temp highp 3-component vector of float)
-0:207            direct index (layout(column_major shared ) temp highp float)
-0:207              values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
-0:207                'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
-0:207                Constant:
-0:207                  1 (const int)
-0:207              Constant:
-0:207                2 (const int)
-0:207          Constant:
-0:207            0 (const int)
-0:208      Bitwise not (temp highp int)
-0:208        value: direct index for structure (layout(column_major shared ) buffer highp int)
-0:208          'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
-0:208          Constant:
-0:208            0 (const int)
-0:209      move second child to first child (temp highp float)
-0:209        direct index (layout(column_major shared ) temp highp float)
-0:209          values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
-0:209            'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
-0:209            Constant:
-0:209              1 (const int)
-0:209          Constant:
-0:209            2 (const int)
-0:209        Constant:
-0:209          3.400000
-0:218  Function Definition: foomultio( (global void)
-0:218    Function Parameters: 
-0:?     Sequence
-0:221      move second child to first child (temp highp float)
-0:221        'g' (temp highp float)
-0:221        direct index (layout(column_major shared ) temp highp float)
-0:221          values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
-0:221            'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
-0:221            Constant:
-0:221              1 (const int)
-0:221          Constant:
-0:221            2 (const int)
-0:222      Bitwise not (temp highp int)
-0:222        value: direct index for structure (layout(column_major shared ) buffer highp int)
-0:222          'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
-0:222          Constant:
-0:222            0 (const int)
-0:223      move second child to first child (temp highp float)
-0:223        direct index (layout(column_major shared ) temp highp float)
-0:223          values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
-0:223            'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
-0:223            Constant:
-0:223              1 (const int)
-0:223          Constant:
-0:223            2 (const int)
-0:223        Constant:
-0:223          3.400000
-0:224      move second child to first child (temp highp int)
-0:224        value: direct index for structure (layout(column_major shared ) buffer highp int)
-0:224          'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
-0:224          Constant:
-0:224            0 (const int)
-0:224        Constant:
-0:224          2 (const int)
 0:?   Linker Objects
 0:?     'gl_WorkGroupSize' (const highp 3-component vector of uint WorkGroupSize)
 0:?       2 (const uint)
diff --git a/Test/baseResults/310.frag.out b/Test/baseResults/310.frag.out
index 6cfd3f4..34cae95 100644
--- a/Test/baseResults/310.frag.out
+++ b/Test/baseResults/310.frag.out
@@ -963,7 +963,6 @@
 0:?     'aliased' (layout(location=13 ) smooth in mediump 4-component vector of float)
 0:?     'arrayedInst' (in 4-element array of block{in mediump float f})
 0:?     'gl_FragDepth' (gl_FragDepth highp float FragDepth)
-0:?     'gl_FragDepth' (gl_FragDepth highp float FragDepth)
 0:?     'inf' (smooth in mediump 2-component vector of float)
 0:?     'ing' (smooth in mediump 2-component vector of float)
 0:?     'offsets' (uniform 4-element array of mediump 2-component vector of int)
@@ -1126,677 +1125,6 @@
 0:34            0.100000
 0:34          Construct ivec2 (temp highp 2-component vector of int)
 0:34            'i' (uniform mediump int)
-0:38  Function Definition: foo23( (global void)
-0:38    Function Parameters: 
-0:?     Sequence
-0:42      textureProjGradOffset (global highp 4-component vector of uint)
-0:42        'usamp2d' (uniform highp usampler2D)
-0:42        'outp' (out mediump 4-component vector of float)
-0:42        Constant:
-0:42          0.000000
-0:42          0.000000
-0:42        Constant:
-0:42          0.000000
-0:42          0.000000
-0:42        Convert float to int (temp highp 2-component vector of int)
-0:42          'c2D' (smooth in mediump 2-component vector of float)
-0:43      textureProjGradOffset (global highp 4-component vector of uint)
-0:43        'usamp2d' (uniform highp usampler2D)
-0:43        'outp' (out mediump 4-component vector of float)
-0:43        Constant:
-0:43          0.000000
-0:43          0.000000
-0:43        Constant:
-0:43          0.000000
-0:43          0.000000
-0:43        Constant:
-0:43          3 (const int)
-0:43          4 (const int)
-0:44      textureProjGradOffset (global highp 4-component vector of uint)
-0:44        'usamp2d' (uniform highp usampler2D)
-0:44        'outp' (out mediump 4-component vector of float)
-0:44        Constant:
-0:44          0.000000
-0:44          0.000000
-0:44        Constant:
-0:44          0.000000
-0:44          0.000000
-0:44        Constant:
-0:44          15 (const int)
-0:44          16 (const int)
-0:45      textureProjGradOffset (global highp 4-component vector of uint)
-0:45        'usamp2d' (uniform highp usampler2D)
-0:45        'outp' (out mediump 4-component vector of float)
-0:45        Constant:
-0:45          0.000000
-0:45          0.000000
-0:45        Constant:
-0:45          0.000000
-0:45          0.000000
-0:45        Constant:
-0:45          -10 (const int)
-0:45          20 (const int)
-0:47      Test condition and select (temp void)
-0:47        Condition
-0:47        'gl_HelperInvocation' (in bool HelperInvocation)
-0:47        true case
-0:48        Pre-Increment (temp mediump 4-component vector of float)
-0:48          'outp' (out mediump 4-component vector of float)
-0:50      Sequence
-0:50        move second child to first child (temp mediump int)
-0:50          'sum' (temp mediump int)
-0:50          Constant:
-0:50            32 (const int)
-0:58      move second child to first child (temp bool)
-0:58        'b1' (temp bool)
-0:58        mix (global bool)
-0:58          'b2' (temp bool)
-0:58          'b3' (temp bool)
-0:58          'b' (temp bool)
-0:59      Sequence
-0:59        move second child to first child (temp mediump 3-component vector of uint)
-0:59          'um3' (temp mediump 3-component vector of uint)
-0:59          mix (global mediump 3-component vector of uint)
-0:59            Construct uvec3 (temp mediump 3-component vector of uint)
-0:59              Convert int to uint (temp mediump uint)
-0:59                'i' (uniform mediump int)
-0:59            Construct uvec3 (temp mediump 3-component vector of uint)
-0:59              Convert int to uint (temp mediump uint)
-0:59                'i' (uniform mediump int)
-0:59            Construct bvec3 (temp 3-component vector of bool)
-0:59              'b' (temp bool)
-0:60      Sequence
-0:60        move second child to first child (temp mediump 4-component vector of int)
-0:60          'im4' (temp mediump 4-component vector of int)
-0:60          mix (global mediump 4-component vector of int)
-0:60            Construct ivec4 (temp mediump 4-component vector of int)
-0:60              'i' (uniform mediump int)
-0:60            Construct ivec4 (temp mediump 4-component vector of int)
-0:60              'i' (uniform mediump int)
-0:60            Construct bvec4 (temp 4-component vector of bool)
-0:60              'b' (temp bool)
-0:98  Function Definition: foots( (global void)
-0:98    Function Parameters: 
-0:100    Sequence
-0:100      Sequence
-0:100        move second child to first child (temp highp 2-component vector of int)
-0:100          'v2' (temp highp 2-component vector of int)
-0:100          textureSize (global highp 2-component vector of int)
-0:100            's1' (layout(binding=3 ) uniform highp sampler2D)
-0:100            Constant:
-0:100              2 (const int)
-0:101      Sequence
-0:101        move second child to first child (temp highp 3-component vector of int)
-0:101          'v3' (temp highp 3-component vector of int)
-0:101          textureSize (global highp 3-component vector of int)
-0:101            'isamp2DA' (uniform highp isampler2DArray)
-0:101            Constant:
-0:101              3 (const int)
-0:102      move second child to first child (temp highp 2-component vector of int)
-0:102        'v2' (temp highp 2-component vector of int)
-0:102        textureSize (global highp 2-component vector of int, operation at mediump)
-0:102          's2dms' (uniform mediump sampler2DMS)
-0:103      move second child to first child (temp highp 2-component vector of int)
-0:103        'v2' (temp highp 2-component vector of int)
-0:103        imageQuerySize (global highp 2-component vector of int)
-0:103          'i2D' (layout(binding=2 ) writeonly uniform highp image2D)
-0:104      move second child to first child (temp highp 3-component vector of int)
-0:104        'v3' (temp highp 3-component vector of int)
-0:104        imageQuerySize (global highp 3-component vector of int, operation at mediump)
-0:104          'i3D' (layout(binding=4 ) readonly uniform mediump image3D)
-0:105      move second child to first child (temp highp 2-component vector of int)
-0:105        'v2' (temp highp 2-component vector of int)
-0:105        imageQuerySize (global highp 2-component vector of int, operation at mediump)
-0:105          'iCube' (layout(binding=5 ) uniform mediump imageCube)
-0:106      move second child to first child (temp highp 3-component vector of int)
-0:106        'v3' (temp highp 3-component vector of int)
-0:106        imageQuerySize (global highp 3-component vector of int, operation at mediump)
-0:106          'i2DA' (layout(binding=6 ) uniform mediump image2DArray)
-0:107      move second child to first child (temp highp 2-component vector of int)
-0:107        'v2' (temp highp 2-component vector of int)
-0:107        imageQuerySize (global highp 2-component vector of int, operation at mediump)
-0:107          'i2Dqualified' (layout(binding=6 ) coherent volatile restrict uniform mediump image2D)
-0:165  Function Definition: fooIO( (global void)
-0:165    Function Parameters: 
-0:167    Sequence
-0:167      Sequence
-0:167        move second child to first child (temp mediump 4-component vector of float)
-0:167          'v' (temp mediump 4-component vector of float)
-0:167          add (temp mediump 4-component vector of float)
-0:167            v: direct index for structure (in mediump 4-component vector of float)
-0:167              'inbinst' (in block{in mediump int a, in mediump 4-component vector of float v, in structure{global mediump int b} s})
-0:167              Constant:
-0:167                1 (const int)
-0:167            vAnon: direct index for structure (layout(location=13 ) centroid in mediump 4-component vector of float)
-0:167              'anon@0' (in block{layout(location=12 ) in mediump int aAnon, layout(location=13 ) centroid in mediump 4-component vector of float vAnon})
-0:167              Constant:
-0:167                1 (const uint)
-0:168      vector scale second child into first child (temp mediump 4-component vector of float)
-0:168        'v' (temp mediump 4-component vector of float)
-0:168        f: direct index for structure (in mediump float)
-0:168          direct index (temp block{in mediump float f})
-0:168            'arrayedInst' (in 4-element array of block{in mediump float f})
-0:168            Constant:
-0:168              2 (const int)
-0:168          Constant:
-0:168            0 (const int)
-0:169      vector scale second child into first child (temp mediump 4-component vector of float)
-0:169        'v' (temp mediump 4-component vector of float)
-0:169        f: direct index for structure (in mediump float)
-0:169          indirect index (temp block{in mediump float f})
-0:169            'arrayedInst' (in 4-element array of block{in mediump float f})
-0:169            'i' (uniform mediump int)
-0:169          Constant:
-0:169            0 (const int)
-0:179  Function Definition: foo_IO( (global void)
-0:179    Function Parameters: 
-0:181    Sequence
-0:181      move second child to first child (temp highp float)
-0:181        'gl_FragDepth' (gl_FragDepth highp float FragDepth)
-0:181        Constant:
-0:181          0.200000
-0:182      'gl_Layer' (flat in highp int Layer)
-0:183      'gl_PrimitiveID' (flat in highp int PrimitiveID)
-0:184      Sequence
-0:184        move second child to first child (temp bool)
-0:184          'f' (temp bool)
-0:184          'gl_FrontFacing' (gl_FrontFacing bool Face)
-0:191  Function Definition: foo_GS( (global void)
-0:191    Function Parameters: 
-0:193    Sequence
-0:193      Sequence
-0:193        move second child to first child (temp highp int)
-0:193          'l' (temp highp int)
-0:193          'gl_Layer' (flat in highp int Layer)
-0:194      Sequence
-0:194        move second child to first child (temp highp int)
-0:194          'p' (temp highp int)
-0:194          'gl_PrimitiveID' (flat in highp int PrimitiveID)
-0:207  Function Definition: pfooBad( (global void)
-0:207    Function Parameters: 
-0:?     Sequence
-0:210      move second child to first child (temp mediump 2-component vector of float)
-0:210        'h' (noContraction temp mediump 2-component vector of float)
-0:210        fma (global mediump 2-component vector of float)
-0:210          'inf' (smooth in mediump 2-component vector of float)
-0:210          'ing' (smooth in mediump 2-component vector of float)
-0:210          'h' (noContraction temp mediump 2-component vector of float)
-0:211      textureGatherOffset (global highp 4-component vector of float)
-0:211        direct index (temp highp sampler2D)
-0:211          'sArray' (uniform 4-element array of highp sampler2D)
-0:211          Constant:
-0:211            0 (const int)
-0:211        Constant:
-0:211          0.100000
-0:211          0.100000
-0:211        Convert float to int (temp highp 2-component vector of int)
-0:211          'inf' (smooth in mediump 2-component vector of float)
-0:212      textureGatherOffsets (global highp 4-component vector of float)
-0:212        direct index (temp highp sampler2D)
-0:212          'sArray' (uniform 4-element array of highp sampler2D)
-0:212          Constant:
-0:212            0 (const int)
-0:212        Constant:
-0:212          0.100000
-0:212          0.100000
-0:212        Constant:
-0:212          0 (const int)
-0:212          0 (const int)
-0:212          0 (const int)
-0:212          0 (const int)
-0:212          0 (const int)
-0:212          0 (const int)
-0:212          0 (const int)
-0:212          0 (const int)
-0:217  Function Definition: pfoo( (global void)
-0:217    Function Parameters: 
-0:?     Sequence
-0:220      move second child to first child (temp mediump 2-component vector of float)
-0:220        'h' (noContraction temp mediump 2-component vector of float)
-0:220        fma (global mediump 2-component vector of float)
-0:220          'inf' (smooth in mediump 2-component vector of float)
-0:220          'ing' (smooth in mediump 2-component vector of float)
-0:220          'h' (noContraction temp mediump 2-component vector of float)
-0:221      textureGatherOffset (global highp 4-component vector of float)
-0:221        direct index (temp highp sampler2D)
-0:221          'sArray' (uniform 4-element array of highp sampler2D)
-0:221          Constant:
-0:221            0 (const int)
-0:221        Constant:
-0:221          0.100000
-0:221          0.100000
-0:221        Convert float to int (temp highp 2-component vector of int)
-0:221          'inf' (smooth in mediump 2-component vector of float)
-0:222      textureGatherOffsets (global highp 4-component vector of float)
-0:222        direct index (temp highp sampler2D)
-0:222          'sArray' (uniform 4-element array of highp sampler2D)
-0:222          Constant:
-0:222            0 (const int)
-0:222        Constant:
-0:222          0.100000
-0:222          0.100000
-0:222        Constant:
-0:222          0 (const int)
-0:222          0 (const int)
-0:222          0 (const int)
-0:222          0 (const int)
-0:222          0 (const int)
-0:222          0 (const int)
-0:222          0 (const int)
-0:222          0 (const int)
-0:223      textureGatherOffsets (global highp 4-component vector of float)
-0:223        direct index (temp highp sampler2D)
-0:223          'sArray' (uniform 4-element array of highp sampler2D)
-0:223          Constant:
-0:223            0 (const int)
-0:223        Constant:
-0:223          0.100000
-0:223          0.100000
-0:223        'offsets' (uniform 4-element array of mediump 2-component vector of int)
-0:248  Function Definition: CAT( (global void)
-0:248    Function Parameters: 
-0:250    Sequence
-0:250      Sequence
-0:250        move second child to first child (temp highp 4-component vector of float)
-0:250          'b4' (temp highp 4-component vector of float)
-0:250          texture (global highp 4-component vector of float)
-0:250            'CA4' (uniform highp samplerCubeArray)
-0:250            Constant:
-0:250              0.500000
-0:250              0.500000
-0:250              0.500000
-0:250              0.500000
-0:250            Constant:
-0:250              0.240000
-0:251      Sequence
-0:251        move second child to first child (temp highp 4-component vector of int)
-0:251          'b6' (temp highp 4-component vector of int)
-0:251          texture (global highp 4-component vector of int)
-0:251            'CA6' (uniform highp isamplerCubeArray)
-0:251            Constant:
-0:251              0.500000
-0:251              0.500000
-0:251              0.500000
-0:251              0.500000
-0:251            Constant:
-0:251              0.260000
-0:252      Sequence
-0:252        move second child to first child (temp highp 4-component vector of uint)
-0:252          'b7' (temp highp 4-component vector of uint)
-0:252          texture (global highp 4-component vector of uint)
-0:252            'CA7' (uniform highp usamplerCubeArray)
-0:252            Constant:
-0:252              0.500000
-0:252              0.500000
-0:252              0.500000
-0:252              0.500000
-0:252            Constant:
-0:252              0.270000
-0:255  Function Definition: badSample( (global void)
-0:255    Function Parameters: 
-0:257    Sequence
-0:257      Sequence
-0:257        move second child to first child (temp lowp int)
-0:257          'a1' (temp lowp int)
-0:257          'gl_SampleID' (flat in lowp int SampleId)
-0:258      Sequence
-0:258        move second child to first child (temp mediump 2-component vector of float)
-0:258          'a2' (temp mediump 2-component vector of float)
-0:258          'gl_SamplePosition' (smooth in mediump 2-component vector of float SamplePosition)
-0:259      Sequence
-0:259        move second child to first child (temp highp int)
-0:259          'a3' (temp highp int)
-0:259          direct index (flat temp highp int SampleMaskIn)
-0:259            'gl_SampleMaskIn' (flat in 1-element array of highp int SampleMaskIn)
-0:259            Constant:
-0:259              0 (const int)
-0:260      move second child to first child (temp highp int)
-0:260        direct index (temp highp int SampleMaskIn)
-0:260          'gl_SampleMask' (out 1-element array of highp int SampleMaskIn)
-0:260          Constant:
-0:260            0 (const int)
-0:260        'a3' (temp highp int)
-0:261      Sequence
-0:261        move second child to first child (temp mediump int)
-0:261          'n' (temp mediump int)
-0:261          'gl_NumSamples' (uniform lowp int)
-0:268  Function Definition: goodSample( (global void)
-0:268    Function Parameters: 
-0:270    Sequence
-0:270      Sequence
-0:270        move second child to first child (temp lowp int)
-0:270          'a1' (temp lowp int)
-0:270          'gl_SampleID' (flat in lowp int SampleId)
-0:271      Sequence
-0:271        move second child to first child (temp mediump 2-component vector of float)
-0:271          'a2' (temp mediump 2-component vector of float)
-0:271          'gl_SamplePosition' (smooth in mediump 2-component vector of float SamplePosition)
-0:272      Sequence
-0:272        move second child to first child (temp highp int)
-0:272          'a3' (temp highp int)
-0:272          direct index (flat temp highp int SampleMaskIn)
-0:272            'gl_SampleMaskIn' (flat in 1-element array of highp int SampleMaskIn)
-0:272            Constant:
-0:272              0 (const int)
-0:273      move second child to first child (temp highp int)
-0:273        direct index (temp highp int SampleMaskIn)
-0:273          'gl_SampleMask' (out 1-element array of highp int SampleMaskIn)
-0:273          Constant:
-0:273            0 (const int)
-0:273        'a3' (temp highp int)
-0:274      Sequence
-0:274        move second child to first child (temp mediump int)
-0:274          'n1' (temp mediump int)
-0:274          Constant:
-0:274            4 (const int)
-0:275      Sequence
-0:275        move second child to first child (temp mediump int)
-0:275          'n2' (temp mediump int)
-0:275          'gl_NumSamples' (uniform lowp int)
-0:283  Function Definition: badImageAtom( (global void)
-0:283    Function Parameters: 
-0:?     Sequence
-0:289      imageAtomicAdd (global highp int)
-0:289        'im2Di' (layout(r32i ) uniform highp iimage2D)
-0:289        'P' (uniform mediump 2-component vector of int)
-0:289        'dati' (temp mediump int)
-0:290      imageAtomicAdd (global highp uint)
-0:290        'im2Du' (layout(r32ui ) uniform highp uimage2D)
-0:290        'P' (uniform mediump 2-component vector of int)
-0:290        'datu' (temp mediump uint)
-0:291      imageAtomicMin (global highp int)
-0:291        'im2Di' (layout(r32i ) uniform highp iimage2D)
-0:291        'P' (uniform mediump 2-component vector of int)
-0:291        'dati' (temp mediump int)
-0:292      imageAtomicMin (global highp uint)
-0:292        'im2Du' (layout(r32ui ) uniform highp uimage2D)
-0:292        'P' (uniform mediump 2-component vector of int)
-0:292        'datu' (temp mediump uint)
-0:293      imageAtomicMax (global highp int)
-0:293        'im2Di' (layout(r32i ) uniform highp iimage2D)
-0:293        'P' (uniform mediump 2-component vector of int)
-0:293        'dati' (temp mediump int)
-0:294      imageAtomicMax (global highp uint)
-0:294        'im2Du' (layout(r32ui ) uniform highp uimage2D)
-0:294        'P' (uniform mediump 2-component vector of int)
-0:294        'datu' (temp mediump uint)
-0:295      imageAtomicAnd (global highp int)
-0:295        'im2Di' (layout(r32i ) uniform highp iimage2D)
-0:295        'P' (uniform mediump 2-component vector of int)
-0:295        'dati' (temp mediump int)
-0:296      imageAtomicAnd (global highp uint)
-0:296        'im2Du' (layout(r32ui ) uniform highp uimage2D)
-0:296        'P' (uniform mediump 2-component vector of int)
-0:296        'datu' (temp mediump uint)
-0:297      imageAtomicOr (global highp int)
-0:297        'im2Di' (layout(r32i ) uniform highp iimage2D)
-0:297        'P' (uniform mediump 2-component vector of int)
-0:297        'dati' (temp mediump int)
-0:298      imageAtomicOr (global highp uint)
-0:298        'im2Du' (layout(r32ui ) uniform highp uimage2D)
-0:298        'P' (uniform mediump 2-component vector of int)
-0:298        'datu' (temp mediump uint)
-0:299      imageAtomicXor (global highp int)
-0:299        'im2Di' (layout(r32i ) uniform highp iimage2D)
-0:299        'P' (uniform mediump 2-component vector of int)
-0:299        'dati' (temp mediump int)
-0:300      imageAtomicXor (global highp uint)
-0:300        'im2Du' (layout(r32ui ) uniform highp uimage2D)
-0:300        'P' (uniform mediump 2-component vector of int)
-0:300        'datu' (temp mediump uint)
-0:301      imageAtomicExchange (global highp int)
-0:301        'im2Di' (layout(r32i ) uniform highp iimage2D)
-0:301        'P' (uniform mediump 2-component vector of int)
-0:301        'dati' (temp mediump int)
-0:302      imageAtomicExchange (global highp uint)
-0:302        'im2Du' (layout(r32ui ) uniform highp uimage2D)
-0:302        'P' (uniform mediump 2-component vector of int)
-0:302        'datu' (temp mediump uint)
-0:303      imageAtomicExchange (global highp float)
-0:303        'im2Df' (layout(r32f ) uniform highp image2D)
-0:303        'P' (uniform mediump 2-component vector of int)
-0:303        'datf' (temp mediump float)
-0:304      imageAtomicCompSwap (global highp int)
-0:304        'im2Di' (layout(r32i ) uniform highp iimage2D)
-0:304        'P' (uniform mediump 2-component vector of int)
-0:304        Constant:
-0:304          3 (const int)
-0:304        'dati' (temp mediump int)
-0:305      imageAtomicCompSwap (global highp uint)
-0:305        'im2Du' (layout(r32ui ) uniform highp uimage2D)
-0:305        'P' (uniform mediump 2-component vector of int)
-0:305        Constant:
-0:305          5 (const uint)
-0:305        'datu' (temp mediump uint)
-0:316  Function Definition: goodImageAtom( (global void)
-0:316    Function Parameters: 
-0:?     Sequence
-0:322      imageAtomicAdd (global highp int)
-0:322        'im2Di' (layout(r32i ) uniform highp iimage2D)
-0:322        'P' (uniform mediump 2-component vector of int)
-0:322        'dati' (temp mediump int)
-0:323      imageAtomicAdd (global highp uint)
-0:323        'im2Du' (layout(r32ui ) uniform highp uimage2D)
-0:323        'P' (uniform mediump 2-component vector of int)
-0:323        'datu' (temp mediump uint)
-0:324      imageAtomicMin (global highp int)
-0:324        'im2Di' (layout(r32i ) uniform highp iimage2D)
-0:324        'P' (uniform mediump 2-component vector of int)
-0:324        'dati' (temp mediump int)
-0:325      imageAtomicMin (global highp uint)
-0:325        'im2Du' (layout(r32ui ) uniform highp uimage2D)
-0:325        'P' (uniform mediump 2-component vector of int)
-0:325        'datu' (temp mediump uint)
-0:326      imageAtomicMax (global highp int)
-0:326        'im2Di' (layout(r32i ) uniform highp iimage2D)
-0:326        'P' (uniform mediump 2-component vector of int)
-0:326        'dati' (temp mediump int)
-0:327      imageAtomicMax (global highp uint)
-0:327        'im2Du' (layout(r32ui ) uniform highp uimage2D)
-0:327        'P' (uniform mediump 2-component vector of int)
-0:327        'datu' (temp mediump uint)
-0:328      imageAtomicAnd (global highp int)
-0:328        'im2Di' (layout(r32i ) uniform highp iimage2D)
-0:328        'P' (uniform mediump 2-component vector of int)
-0:328        'dati' (temp mediump int)
-0:329      imageAtomicAnd (global highp uint)
-0:329        'im2Du' (layout(r32ui ) uniform highp uimage2D)
-0:329        'P' (uniform mediump 2-component vector of int)
-0:329        'datu' (temp mediump uint)
-0:330      imageAtomicOr (global highp int)
-0:330        'im2Di' (layout(r32i ) uniform highp iimage2D)
-0:330        'P' (uniform mediump 2-component vector of int)
-0:330        'dati' (temp mediump int)
-0:331      imageAtomicOr (global highp uint)
-0:331        'im2Du' (layout(r32ui ) uniform highp uimage2D)
-0:331        'P' (uniform mediump 2-component vector of int)
-0:331        'datu' (temp mediump uint)
-0:332      imageAtomicXor (global highp int)
-0:332        'im2Di' (layout(r32i ) uniform highp iimage2D)
-0:332        'P' (uniform mediump 2-component vector of int)
-0:332        'dati' (temp mediump int)
-0:333      imageAtomicXor (global highp uint)
-0:333        'im2Du' (layout(r32ui ) uniform highp uimage2D)
-0:333        'P' (uniform mediump 2-component vector of int)
-0:333        'datu' (temp mediump uint)
-0:334      imageAtomicExchange (global highp int)
-0:334        'im2Di' (layout(r32i ) uniform highp iimage2D)
-0:334        'P' (uniform mediump 2-component vector of int)
-0:334        'dati' (temp mediump int)
-0:335      imageAtomicExchange (global highp uint)
-0:335        'im2Du' (layout(r32ui ) uniform highp uimage2D)
-0:335        'P' (uniform mediump 2-component vector of int)
-0:335        'datu' (temp mediump uint)
-0:336      imageAtomicExchange (global highp float)
-0:336        'im2Df' (layout(r32f ) uniform highp image2D)
-0:336        'P' (uniform mediump 2-component vector of int)
-0:336        'datf' (temp mediump float)
-0:337      imageAtomicCompSwap (global highp int)
-0:337        'im2Di' (layout(r32i ) uniform highp iimage2D)
-0:337        'P' (uniform mediump 2-component vector of int)
-0:337        Constant:
-0:337          3 (const int)
-0:337        'dati' (temp mediump int)
-0:338      imageAtomicCompSwap (global highp uint)
-0:338        'im2Du' (layout(r32ui ) uniform highp uimage2D)
-0:338        'P' (uniform mediump 2-component vector of int)
-0:338        Constant:
-0:338          5 (const uint)
-0:338        'datu' (temp mediump uint)
-0:340      imageAtomicMax (global highp int)
-0:340        'badIm2Di' (layout(rgba16i ) uniform highp iimage2D)
-0:340        'P' (uniform mediump 2-component vector of int)
-0:340        'dati' (temp mediump int)
-0:341      imageAtomicMax (global highp uint)
-0:341        'badIm2Du' (layout(rgba8ui ) uniform highp uimage2D)
-0:341        'P' (uniform mediump 2-component vector of int)
-0:341        'datu' (temp mediump uint)
-0:342      imageAtomicExchange (global highp float)
-0:342        'badIm2Df' (layout(rgba32f ) uniform highp image2D)
-0:342        'P' (uniform mediump 2-component vector of int)
-0:342        'datf' (temp mediump float)
-0:353  Function Definition: badInterp( (global void)
-0:353    Function Parameters: 
-0:355    Sequence
-0:355      interpolateAtCentroid (global mediump 2-component vector of float)
-0:355        'colorfc' (centroid flat in mediump 2-component vector of float)
-0:356      interpolateAtSample (global mediump 2-component vector of float)
-0:356        'colorfc' (centroid flat in mediump 2-component vector of float)
-0:356        Constant:
-0:356          1 (const int)
-0:357      interpolateAtOffset (global mediump 2-component vector of float)
-0:357        'colorfc' (centroid flat in mediump 2-component vector of float)
-0:357        Constant:
-0:357          0.200000
-0:357          0.200000
-0:369  Function Definition: interp( (global void)
-0:369    Function Parameters: 
-0:?     Sequence
-0:376      move second child to first child (temp mediump 2-component vector of float)
-0:376        'res2' (temp mediump 2-component vector of float)
-0:376        interpolateAtCentroid (global mediump 2-component vector of float)
-0:376          'colorfc' (centroid flat in mediump 2-component vector of float)
-0:377      move second child to first child (temp mediump 4-component vector of float)
-0:377        'res4' (temp mediump 4-component vector of float)
-0:377        interpolateAtCentroid (global mediump 4-component vector of float)
-0:377          'colorSampIn' (smooth sample in mediump 4-component vector of float)
-0:378      move second child to first child (temp mediump 4-component vector of float)
-0:378        'res4' (temp mediump 4-component vector of float)
-0:378        interpolateAtCentroid (global mediump 4-component vector of float)
-0:378          'colorfsi' (flat sample in mediump 4-component vector of float)
-0:379      move second child to first child (temp mediump float)
-0:379        'res' (temp mediump float)
-0:379        interpolateAtCentroid (global mediump float)
-0:379          'scalarIn' (smooth in mediump float)
-0:380      'res3' (temp mediump 3-component vector of float)
-0:381      move second child to first child (temp mediump 3-component vector of float)
-0:381        'res3' (temp mediump 3-component vector of float)
-0:381        interpolateAtCentroid (global mediump 3-component vector of float)
-0:381          direct index (smooth sample temp mediump 3-component vector of float)
-0:381            'sampInArray' (smooth sample in 4-element array of mediump 3-component vector of float)
-0:381            Constant:
-0:381              2 (const int)
-0:382      move second child to first child (temp mediump 2-component vector of float)
-0:382        'res2' (temp mediump 2-component vector of float)
-0:382        interpolateAtCentroid (global mediump 2-component vector of float)
-0:382          vector swizzle (temp mediump 2-component vector of float)
-0:382            direct index (smooth sample temp mediump 3-component vector of float)
-0:382              'sampInArray' (smooth sample in 4-element array of mediump 3-component vector of float)
-0:382              Constant:
-0:382                2 (const int)
-0:382            Sequence
-0:382              Constant:
-0:382                0 (const int)
-0:382              Constant:
-0:382                1 (const int)
-0:384      'res3' (temp mediump 3-component vector of float)
-0:385      move second child to first child (temp mediump 3-component vector of float)
-0:385        'res3' (temp mediump 3-component vector of float)
-0:385        interpolateAtSample (global mediump 3-component vector of float)
-0:385          indirect index (smooth sample temp mediump 3-component vector of float)
-0:385            'sampInArray' (smooth sample in 4-element array of mediump 3-component vector of float)
-0:385            'i' (uniform mediump int)
-0:385          Constant:
-0:385            0 (const int)
-0:386      move second child to first child (temp mediump 2-component vector of float)
-0:386        'res2' (temp mediump 2-component vector of float)
-0:386        interpolateAtSample (global mediump 2-component vector of float)
-0:386          vector swizzle (temp mediump 2-component vector of float)
-0:386            direct index (smooth sample temp mediump 3-component vector of float)
-0:386              'sampInArray' (smooth sample in 4-element array of mediump 3-component vector of float)
-0:386              Constant:
-0:386                2 (const int)
-0:386            Sequence
-0:386              Constant:
-0:386                0 (const int)
-0:386              Constant:
-0:386                1 (const int)
-0:386          Constant:
-0:386            2 (const int)
-0:387      move second child to first child (temp mediump float)
-0:387        'res' (temp mediump float)
-0:387        interpolateAtSample (global mediump float)
-0:387          'scalarIn' (smooth in mediump float)
-0:387          Constant:
-0:387            1 (const int)
-0:389      'res3' (temp mediump 3-component vector of float)
-0:390      move second child to first child (temp mediump 3-component vector of float)
-0:390        'res3' (temp mediump 3-component vector of float)
-0:390        interpolateAtOffset (global mediump 3-component vector of float)
-0:390          direct index (smooth sample temp mediump 3-component vector of float)
-0:390            'sampInArray' (smooth sample in 4-element array of mediump 3-component vector of float)
-0:390            Constant:
-0:390              2 (const int)
-0:390          Constant:
-0:390            0.200000
-0:390            0.200000
-0:391      move second child to first child (temp mediump 2-component vector of float)
-0:391        'res2' (temp mediump 2-component vector of float)
-0:391        interpolateAtOffset (global mediump 2-component vector of float)
-0:391          vector swizzle (temp mediump 2-component vector of float)
-0:391            direct index (smooth sample temp mediump 3-component vector of float)
-0:391              'sampInArray' (smooth sample in 4-element array of mediump 3-component vector of float)
-0:391              Constant:
-0:391                2 (const int)
-0:391            Sequence
-0:391              Constant:
-0:391                0 (const int)
-0:391              Constant:
-0:391                1 (const int)
-0:391          Constant:
-0:391            0.200000
-0:391            0.200000
-0:392      move second child to first child (temp mediump float)
-0:392        'res' (temp mediump float)
-0:392        interpolateAtOffset (global mediump float)
-0:392          add (temp mediump float)
-0:392            'scalarIn' (smooth in mediump float)
-0:392            'scalarIn' (smooth in mediump float)
-0:392          Constant:
-0:392            0.200000
-0:392            0.200000
-0:393      move second child to first child (temp mediump float)
-0:393        'res' (temp mediump float)
-0:393        interpolateAtOffset (global mediump float)
-0:393          'scalarIn' (smooth in mediump float)
-0:393          Constant:
-0:393            0.200000
-0:393            0.200000
-0:396      move second child to first child (temp mediump float)
-0:396        'res' (temp mediump float)
-0:396        interpolateAtCentroid (global mediump float)
-0:396          'f' (temp mediump float)
-0:397      move second child to first child (temp mediump 4-component vector of float)
-0:397        'res4' (temp mediump 4-component vector of float)
-0:397        interpolateAtSample (global mediump 4-component vector of float)
-0:397          'outp' (out mediump 4-component vector of float)
-0:397          Constant:
-0:397            0 (const int)
-0:427  Function Definition: blendFoo( (temp void)
-0:427    Function Parameters: 
-0:428  Function Definition: blendFoo(vf3; (global void)
-0:428    Function Parameters: 
-0:428      'v' (in mediump 3-component vector of float)
 0:?   Linker Objects
 0:?     'gl_FragCoord' (smooth in mediump 4-component vector of float)
 0:?     'v3' (layout(location=2 ) smooth in mediump 3-component vector of float)
@@ -1844,7 +1172,6 @@
 0:?     'aliased' (layout(location=13 ) smooth in mediump 4-component vector of float)
 0:?     'arrayedInst' (in 4-element array of block{in mediump float f})
 0:?     'gl_FragDepth' (gl_FragDepth highp float FragDepth)
-0:?     'gl_FragDepth' (gl_FragDepth highp float FragDepth)
 0:?     'inf' (smooth in mediump 2-component vector of float)
 0:?     'ing' (smooth in mediump 2-component vector of float)
 0:?     'offsets' (uniform 4-element array of mediump 2-component vector of int)
diff --git a/Test/baseResults/310.geom.out b/Test/baseResults/310.geom.out
index 888c142..def6b7a 100644
--- a/Test/baseResults/310.geom.out
+++ b/Test/baseResults/310.geom.out
@@ -250,74 +250,6 @@
 0:52        'gl_Layer' (layout(stream=0 ) out highp int Layer)
 0:52        Constant:
 0:52          2 (const int)
-0:63  Function Definition: foo(i1; (global void)
-0:63    Function Parameters: 
-0:63      'a' (in highp int)
-0:65    Sequence
-0:65      move second child to first child (temp mediump 4-component vector of float)
-0:65        a: direct index for structure (layout(stream=0 ) out mediump 4-component vector of float)
-0:65          'ouuaa6' (layout(stream=0 ) out block{layout(stream=0 ) out mediump 4-component vector of float a})
-0:65          Constant:
-0:65            0 (const int)
-0:65        Constant:
-0:65          1.000000
-0:65          1.000000
-0:65          1.000000
-0:65          1.000000
-0:114  Function Definition: fooe1( (global void)
-0:114    Function Parameters: 
-0:116    Sequence
-0:116      'gl_ViewportIndex' (temp float)
-0:117      'gl_MaxViewports' (temp float)
-0:118      Constant:
-0:118        4 (const int)
-0:119      Sequence
-0:119        move second child to first child (temp highp int)
-0:119          'inv' (temp highp int)
-0:119          'gl_InvocationID' (in highp int InvocationID)
-0:134  Function Definition: notHere( (global void)
-0:134    Function Parameters: 
-0:136    Sequence
-0:136      'gl_MaxGeometryVaryingComponents' (temp float)
-0:137      'gl_VerticesIn' (temp float)
-0:140  Function Definition: pointSize1( (global void)
-0:140    Function Parameters: 
-0:142    Sequence
-0:142      Sequence
-0:142        move second child to first child (temp highp float)
-0:142          'ps' (temp highp float)
-0:142          gl_PointSize: direct index for structure (in highp float PointSize)
-0:142            direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
-0:142              'gl_in' (in 4-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
-0:142              Constant:
-0:142                3 (const int)
-0:142            Constant:
-0:142              1 (const int)
-0:143      move second child to first child (temp highp float)
-0:143        gl_PointSize: direct index for structure (layout(stream=0 ) gl_PointSize highp float PointSize)
-0:143          'anon@1' (layout(stream=0 ) out block{layout(stream=0 ) gl_Position highp 4-component vector of float Position gl_Position, layout(stream=0 ) gl_PointSize highp float PointSize gl_PointSize})
-0:143          Constant:
-0:143            1 (const uint)
-0:143        'ps' (temp highp float)
-0:148  Function Definition: pointSize2( (global void)
-0:148    Function Parameters: 
-0:150    Sequence
-0:150      Sequence
-0:150        move second child to first child (temp highp float)
-0:150          'ps' (temp highp float)
-0:150          gl_PointSize: direct index for structure (in highp float PointSize)
-0:150            direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
-0:150              'gl_in' (in 4-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
-0:150              Constant:
-0:150                3 (const int)
-0:150            Constant:
-0:150              1 (const int)
-0:151      move second child to first child (temp highp float)
-0:151        gl_PointSize: direct index for structure (layout(stream=0 ) gl_PointSize highp float PointSize)
-0:151          'anon@1' (layout(stream=0 ) out block{layout(stream=0 ) gl_Position highp 4-component vector of float Position gl_Position, layout(stream=0 ) gl_PointSize highp float PointSize gl_PointSize})
-0:151          Constant:
-0:151            1 (const uint)
-0:151        'ps' (temp highp float)
 0:?   Linker Objects
 0:?     'fromV' (in 4-element array of block{in mediump 3-component vector of float color})
 0:?     'nonBlockUnsized' (in 4-element array of mediump 4-component vector of float)
diff --git a/Test/baseResults/310.tesc.out b/Test/baseResults/310.tesc.out
index 24e3d20..ab27198 100644
--- a/Test/baseResults/310.tesc.out
+++ b/Test/baseResults/310.tesc.out
@@ -514,172 +514,6 @@
 0:58        Barrier (global void)
 0:61      Branch: Return
 0:63      Barrier (global void)
-0:69  Function Definition: foo( (global void)
-0:69    Function Parameters: 
-0:71    Sequence
-0:71      gl_Position: direct index for structure (out highp 4-component vector of float Position)
-0:71        direct index (temp block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
-0:71          'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
-0:71          Constant:
-0:71            4 (const int)
-0:71        Constant:
-0:71          0 (const int)
-0:73      Barrier (global void)
-0:92  Function Definition: foop( (global void)
-0:92    Function Parameters: 
-0:?     Sequence
-0:95      move second child to first child (temp highp float)
-0:95        'd' (noContraction temp highp float)
-0:95        fma (global highp float)
-0:95          'd' (noContraction temp highp float)
-0:95          'd' (noContraction temp highp float)
-0:95          'd' (noContraction temp highp float)
-0:112  Function Definition: pointSize2( (global void)
-0:112    Function Parameters: 
-0:114    Sequence
-0:114      Sequence
-0:114        move second child to first child (temp highp float)
-0:114          'ps' (temp highp float)
-0:114          gl_PointSize: direct index for structure (in highp float PointSize)
-0:114            direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
-0:114              'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
-0:114              Constant:
-0:114                1 (const int)
-0:114            Constant:
-0:114              1 (const int)
-0:115      move second child to first child (temp highp float)
-0:115        gl_PointSize: direct index for structure (out highp float PointSize)
-0:115          indirect index (temp block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
-0:115            'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
-0:115            'gl_InvocationID' (in highp int InvocationID)
-0:115          Constant:
-0:115            1 (const int)
-0:115        'ps' (temp highp float)
-0:122  Function Definition: goodfoop( (global void)
-0:122    Function Parameters: 
-0:?     Sequence
-0:126      multiply second child into first child (temp highp 3-component vector of float)
-0:126        'pv3' (noContraction temp highp 3-component vector of float)
-0:126        'pv3' (noContraction temp highp 3-component vector of float)
-0:127      move second child to first child (temp highp 3-component vector of float)
-0:127        'pv3' (noContraction temp highp 3-component vector of float)
-0:127        fma (global highp 3-component vector of float)
-0:127          'pv3' (noContraction temp highp 3-component vector of float)
-0:127          'pv3' (noContraction temp highp 3-component vector of float)
-0:127          'pv3' (noContraction temp highp 3-component vector of float)
-0:128      move second child to first child (temp highp float)
-0:128        'd' (noContraction temp highp float)
-0:128        fma (global highp float)
-0:128          'd' (noContraction temp highp float)
-0:128          'd' (noContraction temp highp float)
-0:128          'd' (noContraction temp highp float)
-0:131  Function Definition: bbBad( (global void)
-0:131    Function Parameters: 
-0:133    Sequence
-0:133      'gl_BoundingBoxOES' (patch out 2-element array of highp 4-component vector of float BoundingBox)
-0:138  Function Definition: bb( (global void)
-0:138    Function Parameters: 
-0:140    Sequence
-0:140      move second child to first child (temp highp 4-component vector of float)
-0:140        direct index (patch temp highp 4-component vector of float BoundingBox)
-0:140          'gl_BoundingBoxOES' (patch out 2-element array of highp 4-component vector of float BoundingBox)
-0:140          Constant:
-0:140            0 (const int)
-0:140        Constant:
-0:140          0.000000
-0:140          0.000000
-0:140          0.000000
-0:140          0.000000
-0:141      move second child to first child (temp highp 4-component vector of float)
-0:141        direct index (patch temp highp 4-component vector of float BoundingBox)
-0:141          'gl_BoundingBoxOES' (patch out 2-element array of highp 4-component vector of float BoundingBox)
-0:141          Constant:
-0:141            1 (const int)
-0:141        Constant:
-0:141          1.000000
-0:141          1.000000
-0:141          1.000000
-0:141          1.000000
-0:142      move second child to first child (temp highp 4-component vector of float)
-0:142        direct index (patch temp highp 4-component vector of float BoundingBox)
-0:142          'gl_BoundingBoxOES' (patch out 2-element array of highp 4-component vector of float BoundingBox)
-0:142          Constant:
-0:142            2 (const int)
-0:142        Constant:
-0:142          2.000000
-0:142          2.000000
-0:142          2.000000
-0:142          2.000000
-0:153  Function Definition: outputtingOutparam(i1; (global void)
-0:153    Function Parameters: 
-0:153      'a' (out highp int)
-0:155    Sequence
-0:155      move second child to first child (temp highp int)
-0:155        'a' (out highp int)
-0:155        Constant:
-0:155          2 (const int)
-0:158  Function Definition: outputting( (global void)
-0:158    Function Parameters: 
-0:160    Sequence
-0:160      move second child to first child (temp highp int)
-0:160        indirect index (temp highp int)
-0:160          'outa' (out 4-element array of highp int)
-0:160          'gl_InvocationID' (in highp int InvocationID)
-0:160        Constant:
-0:160          2 (const int)
-0:161      move second child to first child (temp highp int)
-0:161        direct index (temp highp int)
-0:161          'outa' (out 4-element array of highp int)
-0:161          Constant:
-0:161            1 (const int)
-0:161        Constant:
-0:161          2 (const int)
-0:162      move second child to first child (temp highp 4-component vector of float)
-0:162        gl_Position: direct index for structure (out highp 4-component vector of float Position)
-0:162          direct index (temp block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
-0:162            'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
-0:162            Constant:
-0:162              0 (const int)
-0:162          Constant:
-0:162            0 (const int)
-0:162        Constant:
-0:162          1.000000
-0:162          1.000000
-0:162          1.000000
-0:162          1.000000
-0:163      direct index (temp highp int)
-0:163        'outa' (out 4-element array of highp int)
-0:163        Constant:
-0:163          1 (const int)
-0:164      direct index (temp block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
-0:164        'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
-0:164        Constant:
-0:164          0 (const int)
-0:165      Function Call: outputtingOutparam(i1; (global void)
-0:165        direct index (temp highp int)
-0:165          'outa' (out 4-element array of highp int)
-0:165          Constant:
-0:165            0 (const int)
-0:166      Function Call: outputtingOutparam(i1; (global void)
-0:166        indirect index (temp highp int)
-0:166          'outa' (out 4-element array of highp int)
-0:166          'gl_InvocationID' (in highp int InvocationID)
-0:167      move second child to first child (temp highp float)
-0:167        f: direct index for structure (out highp float)
-0:167          direct index (patch temp block{out highp float f})
-0:167            'patchIName' (patch out 4-element array of block{out highp float f})
-0:167            Constant:
-0:167              1 (const int)
-0:167          Constant:
-0:167            0 (const int)
-0:167        Constant:
-0:167          3.140000
-0:168      move second child to first child (temp highp int)
-0:168        indirect index (temp highp int)
-0:168          'outa' (out 4-element array of highp int)
-0:168          'gl_InvocationID' (in highp int InvocationID)
-0:168        Constant:
-0:168          2 (const int)
 0:?   Linker Objects
 0:?     'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
 0:?     'outa' (out 4-element array of highp int)
diff --git a/Test/baseResults/310.tese.out b/Test/baseResults/310.tese.out
index aacfedb..62894ec 100644
--- a/Test/baseResults/310.tese.out
+++ b/Test/baseResults/310.tese.out
@@ -274,19 +274,6 @@
 0:48        Constant:
 0:48          0.000000
 0:48        'cd' (temp highp float)
-0:117  Function Definition: pointSize2( (global void)
-0:117    Function Parameters: 
-0:?     Sequence
-0:120      move second child to first child (temp highp float)
-0:120        gl_PointSize: direct index for structure (gl_PointSize highp float PointSize)
-0:120          'anon@1' (out block{gl_Position highp 4-component vector of float Position gl_Position, gl_PointSize highp float PointSize gl_PointSize})
-0:120          Constant:
-0:120            1 (const uint)
-0:120        'ps' (temp highp float)
-0:125  Function Definition: bbbad( (global void)
-0:125    Function Parameters: 
-0:127    Sequence
-0:127      'gl_BoundingBoxOES' (temp float)
 0:?   Linker Objects
 0:?     'patchIn' (patch in highp 4-component vector of float)
 0:?     'patchOut' (patch out highp 4-component vector of float)
diff --git a/Test/baseResults/310.vert.out b/Test/baseResults/310.vert.out
index 84a50e8..d0dfedf 100644
--- a/Test/baseResults/310.vert.out
+++ b/Test/baseResults/310.vert.out
@@ -1158,693 +1158,6 @@
 0:48        'v4' (temp mediump 4-component vector of float)
 0:48        UnpackSnorm4x8 (global mediump 4-component vector of float, operation at highp)
 0:48          'u1' (temp highp uint)
-0:60  Function Definition: foo( (global void)
-0:60    Function Parameters: 
-0:?     Sequence
-0:63      move second child to first child (temp highp 2-component vector of int)
-0:63        'v2' (temp highp 2-component vector of int)
-0:63        textureSize (global highp 2-component vector of int)
-0:63          's2dms' (uniform highp sampler2DMS)
-0:64      move second child to first child (temp highp 2-component vector of int)
-0:64        'v2' (temp highp 2-component vector of int)
-0:64        textureSize (global highp 2-component vector of int)
-0:64          'us2dms' (uniform highp usampler2DMS)
-0:65      Sequence
-0:65        move second child to first child (temp highp 4-component vector of float)
-0:65          'v4' (temp highp 4-component vector of float)
-0:65          textureFetch (global highp 4-component vector of float)
-0:65            's2dms' (uniform highp sampler2DMS)
-0:65            'v2' (temp highp 2-component vector of int)
-0:65            Constant:
-0:65              2 (const int)
-0:66      Sequence
-0:66        move second child to first child (temp highp 4-component vector of int)
-0:66          'iv4' (temp highp 4-component vector of int)
-0:66          textureFetch (global highp 4-component vector of int)
-0:66            'is2dms' (uniform highp isampler2DMS)
-0:66            'v2' (temp highp 2-component vector of int)
-0:66            Constant:
-0:66              2 (const int)
-0:67      Constant:
-0:67        0.000000
-0:69      frexp (global highp float)
-0:69        'f' (temp highp float)
-0:69        'ini' (in highp int)
-0:114  Function Definition: foo_IO( (global void)
-0:114    Function Parameters: 
-0:116    Sequence
-0:116      Sequence
-0:116        move second child to first child (temp highp int)
-0:116          'sum' (temp highp int)
-0:116          add (temp highp int)
-0:116            'gl_VertexID' (gl_VertexId highp int VertexId)
-0:117            'gl_InstanceID' (gl_InstanceId highp int InstanceId)
-0:118      move second child to first child (temp highp 4-component vector of float)
-0:118        gl_Position: direct index for structure (gl_Position highp 4-component vector of float Position)
-0:118          'anon@1' (out block{gl_Position highp 4-component vector of float Position gl_Position, })
-0:118          Constant:
-0:118            0 (const uint)
-0:118        Constant:
-0:118          1.000000
-0:118          1.000000
-0:118          1.000000
-0:118          1.000000
-0:119      gl_PointSize: direct index for structure (gl_PointSize highp void PointSize)
-0:119        'anon@1' (out block{gl_Position highp 4-component vector of float Position gl_Position, })
-0:119        Constant:
-0:119          1 (const uint)
-0:153  Function Definition: pfooBad( (global void)
-0:153    Function Parameters: 
-0:?     Sequence
-0:156      move second child to first child (temp highp 2-component vector of float)
-0:156        'h' (noContraction temp highp 2-component vector of float)
-0:156        fma (global highp 2-component vector of float)
-0:156          'inf' (in highp 2-component vector of float)
-0:156          'ing' (in highp 2-component vector of float)
-0:156          'h' (noContraction temp highp 2-component vector of float)
-0:157      indirect index (temp lowp sampler2D)
-0:157        'sArray' (uniform 4-element array of lowp sampler2D)
-0:157        add (temp highp int)
-0:157          'sIndex' (uniform highp int)
-0:157          Constant:
-0:157            1 (const int)
-0:158      indirect index (layout(binding=0 offset=0 ) temp highp atomic_uint)
-0:158        'auArray' (layout(binding=0 offset=0 ) uniform 2-element array of highp atomic_uint)
-0:158        add (temp highp int)
-0:158          'sIndex' (uniform highp int)
-0:158          Constant:
-0:158            1 (const int)
-0:159      direct index (layout(column_major shared ) temp block{layout(column_major shared ) uniform highp int i})
-0:159        'ubInst' (layout(column_major shared ) uniform 4-element array of block{layout(column_major shared ) uniform highp int i})
-0:159        Constant:
-0:159          1 (const int)
-0:160      direct index (layout(column_major shared ) temp block{layout(column_major shared ) buffer highp int i})
-0:160        'bbInst' (layout(column_major shared ) buffer 4-element array of block{layout(column_major shared ) buffer highp int i})
-0:160        Constant:
-0:160          2 (const int)
-0:161      indirect index (layout(column_major shared ) temp block{layout(column_major shared ) uniform highp int i})
-0:161        'ubInst' (layout(column_major shared ) uniform 4-element array of block{layout(column_major shared ) uniform highp int i})
-0:161        add (temp highp int)
-0:161          'sIndex' (uniform highp int)
-0:161          Constant:
-0:161            1 (const int)
-0:162      indirect index (layout(column_major shared ) temp block{layout(column_major shared ) buffer highp int i})
-0:162        'bbInst' (layout(column_major shared ) buffer 4-element array of block{layout(column_major shared ) buffer highp int i})
-0:162        'sIndex' (uniform highp int)
-0:163      direct index (writeonly temp highp image2D)
-0:163        'iArray' (writeonly uniform 5-element array of highp image2D)
-0:163        Constant:
-0:163          2 (const int)
-0:164      indirect index (writeonly temp highp image2D)
-0:164        'iArray' (writeonly uniform 5-element array of highp image2D)
-0:164        component-wise multiply (temp highp int)
-0:164          'sIndex' (uniform highp int)
-0:164          Constant:
-0:164            2 (const int)
-0:165      textureGatherOffset (global lowp 4-component vector of float)
-0:165        direct index (temp lowp sampler2D)
-0:165          'sArray' (uniform 4-element array of lowp sampler2D)
-0:165          Constant:
-0:165            0 (const int)
-0:165        Constant:
-0:165          0.100000
-0:165          0.100000
-0:165        Convert float to int (temp lowp 2-component vector of int)
-0:165          'inf' (in highp 2-component vector of float)
-0:166      textureGatherOffsets (global lowp 4-component vector of float, operation at highp)
-0:166        direct index (temp lowp sampler2D)
-0:166          'sArray' (uniform 4-element array of lowp sampler2D)
-0:166          Constant:
-0:166            0 (const int)
-0:166        Constant:
-0:166          0.100000
-0:166          0.100000
-0:166        Constant:
-0:166          0 (const int)
-0:166          0 (const int)
-0:166          0 (const int)
-0:166          0 (const int)
-0:166          0 (const int)
-0:166          0 (const int)
-0:166          0 (const int)
-0:166          0 (const int)
-0:171  Function Definition: pfoo( (global void)
-0:171    Function Parameters: 
-0:?     Sequence
-0:174      move second child to first child (temp highp 2-component vector of float)
-0:174        'h' (noContraction temp highp 2-component vector of float)
-0:174        fma (global highp 2-component vector of float)
-0:174          'inf' (in highp 2-component vector of float)
-0:174          'ing' (in highp 2-component vector of float)
-0:174          'h' (noContraction temp highp 2-component vector of float)
-0:175      indirect index (temp lowp sampler2D)
-0:175        'sArray' (uniform 4-element array of lowp sampler2D)
-0:175        add (temp highp int)
-0:175          'sIndex' (uniform highp int)
-0:175          Constant:
-0:175            1 (const int)
-0:176      indirect index (layout(column_major shared ) temp block{layout(column_major shared ) uniform highp int i})
-0:176        'ubInst' (layout(column_major shared ) uniform 4-element array of block{layout(column_major shared ) uniform highp int i})
-0:176        add (temp highp int)
-0:176          'sIndex' (uniform highp int)
-0:176          Constant:
-0:176            1 (const int)
-0:177      indirect index (layout(column_major shared ) temp block{layout(column_major shared ) buffer highp int i})
-0:177        'bbInst' (layout(column_major shared ) buffer 4-element array of block{layout(column_major shared ) buffer highp int i})
-0:177        subtract (temp highp int)
-0:177          'sIndex' (uniform highp int)
-0:177          Constant:
-0:177            2 (const int)
-0:178      direct index (writeonly temp highp image2D)
-0:178        'iArray' (writeonly uniform 5-element array of highp image2D)
-0:178        Constant:
-0:178          2 (const int)
-0:179      indirect index (writeonly temp highp image2D)
-0:179        'iArray' (writeonly uniform 5-element array of highp image2D)
-0:179        subtract (temp highp int)
-0:179          'sIndex' (uniform highp int)
-0:179          Constant:
-0:179            2 (const int)
-0:180      textureGatherOffset (global lowp 4-component vector of float)
-0:180        direct index (temp lowp sampler2D)
-0:180          'sArray' (uniform 4-element array of lowp sampler2D)
-0:180          Constant:
-0:180            0 (const int)
-0:180        Constant:
-0:180          0.100000
-0:180          0.100000
-0:180        Convert float to int (temp lowp 2-component vector of int)
-0:180          'inf' (in highp 2-component vector of float)
-0:181      textureGatherOffsets (global lowp 4-component vector of float, operation at highp)
-0:181        direct index (temp lowp sampler2D)
-0:181          'sArray' (uniform 4-element array of lowp sampler2D)
-0:181          Constant:
-0:181            0 (const int)
-0:181        Constant:
-0:181          0.100000
-0:181          0.100000
-0:181        Constant:
-0:181          0 (const int)
-0:181          0 (const int)
-0:181          0 (const int)
-0:181          0 (const int)
-0:181          0 (const int)
-0:181          0 (const int)
-0:181          0 (const int)
-0:181          0 (const int)
-0:182      textureGatherOffsets (global lowp 4-component vector of float, operation at highp)
-0:182        direct index (temp lowp sampler2D)
-0:182          'sArray' (uniform 4-element array of lowp sampler2D)
-0:182          Constant:
-0:182            0 (const int)
-0:182        Constant:
-0:182          0.100000
-0:182          0.100000
-0:182        'offsets' (uniform 4-element array of highp 2-component vector of int)
-0:220  Function Definition: bufferT( (global void)
-0:220    Function Parameters: 
-0:222    Sequence
-0:222      Sequence
-0:222        move second child to first child (temp highp int)
-0:222          's1' (temp highp int)
-0:222          textureSize (global highp int)
-0:222            'bufSamp1' (uniform highp samplerBuffer)
-0:223      Sequence
-0:223        move second child to first child (temp highp int)
-0:223          's2' (temp highp int)
-0:223          textureSize (global highp int)
-0:223            'bufSamp2' (uniform highp isamplerBuffer)
-0:224      Sequence
-0:224        move second child to first child (temp highp int)
-0:224          's3' (temp highp int)
-0:224          textureSize (global highp int)
-0:224            'bufSamp3' (uniform highp usamplerBuffer)
-0:226      Sequence
-0:226        move second child to first child (temp highp int)
-0:226          's4' (temp highp int)
-0:226          imageQuerySize (global highp int)
-0:226            'bufSamp4' (writeonly uniform highp imageBuffer)
-0:227      Sequence
-0:227        move second child to first child (temp highp int)
-0:227          's5' (temp highp int)
-0:227          imageQuerySize (global highp int)
-0:227            'bufSamp5' (writeonly uniform highp iimageBuffer)
-0:228      Sequence
-0:228        move second child to first child (temp highp int)
-0:228          's6' (temp highp int)
-0:228          imageQuerySize (global highp int)
-0:228            'bufSamp6' (writeonly uniform highp uimageBuffer)
-0:230      Sequence
-0:230        move second child to first child (temp highp 4-component vector of float)
-0:230          'f1' (temp highp 4-component vector of float)
-0:230          textureFetch (global highp 4-component vector of float)
-0:230            'bufSamp1' (uniform highp samplerBuffer)
-0:230            's1' (temp highp int)
-0:231      Sequence
-0:231        move second child to first child (temp highp 4-component vector of int)
-0:231          'f2' (temp highp 4-component vector of int)
-0:231          textureFetch (global highp 4-component vector of int)
-0:231            'bufSamp2' (uniform highp isamplerBuffer)
-0:231            's2' (temp highp int)
-0:232      Sequence
-0:232        move second child to first child (temp highp 4-component vector of uint)
-0:232          'f3' (temp highp 4-component vector of uint)
-0:232          textureFetch (global highp 4-component vector of uint)
-0:232            'bufSamp3' (uniform highp usamplerBuffer)
-0:232            's3' (temp highp int)
-0:279  Function Definition: CAT( (global void)
-0:279    Function Parameters: 
-0:281    Sequence
-0:281      Sequence
-0:281        move second child to first child (temp highp 3-component vector of int)
-0:281          's4' (temp highp 3-component vector of int)
-0:281          textureSize (global highp 3-component vector of int)
-0:281            'CA4' (uniform highp samplerCubeArray)
-0:281            Constant:
-0:281              1 (const int)
-0:282      Sequence
-0:282        move second child to first child (temp highp 3-component vector of int)
-0:282          's5' (temp highp 3-component vector of int)
-0:282          textureSize (global highp 3-component vector of int)
-0:282            'CA5' (uniform highp samplerCubeArrayShadow)
-0:282            Constant:
-0:282              1 (const int)
-0:283      Sequence
-0:283        move second child to first child (temp highp 3-component vector of int)
-0:283          's6' (temp highp 3-component vector of int)
-0:283          textureSize (global highp 3-component vector of int)
-0:283            'CA6' (uniform highp isamplerCubeArray)
-0:283            Constant:
-0:283              1 (const int)
-0:284      Sequence
-0:284        move second child to first child (temp highp 3-component vector of int)
-0:284          's7' (temp highp 3-component vector of int)
-0:284          textureSize (global highp 3-component vector of int)
-0:284            'CA7' (uniform highp usamplerCubeArray)
-0:284            Constant:
-0:284              1 (const int)
-0:286      Sequence
-0:286        move second child to first child (temp highp 4-component vector of float)
-0:286          't4' (temp highp 4-component vector of float)
-0:286          texture (global highp 4-component vector of float)
-0:286            'CA4' (uniform highp samplerCubeArray)
-0:286            Constant:
-0:286              0.500000
-0:286              0.500000
-0:286              0.500000
-0:286              0.500000
-0:287      Sequence
-0:287        move second child to first child (temp highp float)
-0:287          't5' (temp highp float)
-0:287          texture (global highp float)
-0:287            'CA5' (uniform highp samplerCubeArrayShadow)
-0:287            Constant:
-0:287              0.500000
-0:287              0.500000
-0:287              0.500000
-0:287              0.500000
-0:287            Constant:
-0:287              3.000000
-0:288      Sequence
-0:288        move second child to first child (temp highp 4-component vector of int)
-0:288          't6' (temp highp 4-component vector of int)
-0:288          texture (global highp 4-component vector of int)
-0:288            'CA6' (uniform highp isamplerCubeArray)
-0:288            Constant:
-0:288              0.500000
-0:288              0.500000
-0:288              0.500000
-0:288              0.500000
-0:289      Sequence
-0:289        move second child to first child (temp highp 4-component vector of uint)
-0:289          't7' (temp highp 4-component vector of uint)
-0:289          texture (global highp 4-component vector of uint)
-0:289            'CA7' (uniform highp usamplerCubeArray)
-0:289            Constant:
-0:289              0.500000
-0:289              0.500000
-0:289              0.500000
-0:289              0.500000
-0:291      Sequence
-0:291        move second child to first child (temp highp 4-component vector of float)
-0:291          'L4' (temp highp 4-component vector of float)
-0:291          textureLod (global highp 4-component vector of float)
-0:291            'CA4' (uniform highp samplerCubeArray)
-0:291            Constant:
-0:291              0.500000
-0:291              0.500000
-0:291              0.500000
-0:291              0.500000
-0:291            Constant:
-0:291              0.240000
-0:292      Sequence
-0:292        move second child to first child (temp highp 4-component vector of int)
-0:292          'L6' (temp highp 4-component vector of int)
-0:292          textureLod (global highp 4-component vector of int)
-0:292            'CA6' (uniform highp isamplerCubeArray)
-0:292            Constant:
-0:292              0.500000
-0:292              0.500000
-0:292              0.500000
-0:292              0.500000
-0:292            Constant:
-0:292              0.260000
-0:293      Sequence
-0:293        move second child to first child (temp highp 4-component vector of uint)
-0:293          'L7' (temp highp 4-component vector of uint)
-0:293          textureLod (global highp 4-component vector of uint)
-0:293            'CA7' (uniform highp usamplerCubeArray)
-0:293            Constant:
-0:293              0.500000
-0:293              0.500000
-0:293              0.500000
-0:293              0.500000
-0:293            Constant:
-0:293              0.270000
-0:295      Sequence
-0:295        move second child to first child (temp highp 4-component vector of float)
-0:295          'g4' (temp highp 4-component vector of float)
-0:295          textureGrad (global highp 4-component vector of float)
-0:295            'CA4' (uniform highp samplerCubeArray)
-0:295            Constant:
-0:295              0.500000
-0:295              0.500000
-0:295              0.500000
-0:295              0.500000
-0:295            Constant:
-0:295              0.100000
-0:295              0.100000
-0:295              0.100000
-0:295            Constant:
-0:295              0.200000
-0:295              0.200000
-0:295              0.200000
-0:296      Sequence
-0:296        move second child to first child (temp highp 4-component vector of int)
-0:296          'g6' (temp highp 4-component vector of int)
-0:296          textureGrad (global highp 4-component vector of int)
-0:296            'CA6' (uniform highp isamplerCubeArray)
-0:296            Constant:
-0:296              0.500000
-0:296              0.500000
-0:296              0.500000
-0:296              0.500000
-0:296            Constant:
-0:296              0.100000
-0:296              0.100000
-0:296              0.100000
-0:296            Constant:
-0:296              0.200000
-0:296              0.200000
-0:296              0.200000
-0:297      Sequence
-0:297        move second child to first child (temp highp 4-component vector of uint)
-0:297          'g7' (temp highp 4-component vector of uint)
-0:297          textureGrad (global highp 4-component vector of uint)
-0:297            'CA7' (uniform highp usamplerCubeArray)
-0:297            Constant:
-0:297              0.500000
-0:297              0.500000
-0:297              0.500000
-0:297              0.500000
-0:297            Constant:
-0:297              0.100000
-0:297              0.100000
-0:297              0.100000
-0:297            Constant:
-0:297              0.200000
-0:297              0.200000
-0:297              0.200000
-0:299      Sequence
-0:299        move second child to first child (temp highp 4-component vector of float)
-0:299          'gath4' (temp highp 4-component vector of float)
-0:299          textureGather (global highp 4-component vector of float)
-0:299            'CA4' (uniform highp samplerCubeArray)
-0:299            Constant:
-0:299              0.500000
-0:299              0.500000
-0:299              0.500000
-0:299              0.500000
-0:300      Sequence
-0:300        move second child to first child (temp highp 4-component vector of float)
-0:300          'gathC4' (temp highp 4-component vector of float)
-0:300          textureGather (global highp 4-component vector of float)
-0:300            'CA4' (uniform highp samplerCubeArray)
-0:300            Constant:
-0:300              0.500000
-0:300              0.500000
-0:300              0.500000
-0:300              0.500000
-0:300            Constant:
-0:300              2 (const int)
-0:301      Sequence
-0:301        move second child to first child (temp highp 4-component vector of int)
-0:301          'gath6' (temp highp 4-component vector of int)
-0:301          textureGather (global highp 4-component vector of int)
-0:301            'CA6' (uniform highp isamplerCubeArray)
-0:301            Constant:
-0:301              0.500000
-0:301              0.500000
-0:301              0.500000
-0:301              0.500000
-0:302      Sequence
-0:302        move second child to first child (temp highp 4-component vector of int)
-0:302          'gathC6' (temp highp 4-component vector of int)
-0:302          textureGather (global highp 4-component vector of int)
-0:302            'CA6' (uniform highp isamplerCubeArray)
-0:302            Constant:
-0:302              0.500000
-0:302              0.500000
-0:302              0.500000
-0:302              0.500000
-0:302            Constant:
-0:302              1 (const int)
-0:303      Sequence
-0:303        move second child to first child (temp highp 4-component vector of uint)
-0:303          'gath7' (temp highp 4-component vector of uint)
-0:303          textureGather (global highp 4-component vector of uint)
-0:303            'CA7' (uniform highp usamplerCubeArray)
-0:303            Constant:
-0:303              0.500000
-0:303              0.500000
-0:303              0.500000
-0:303              0.500000
-0:304      Sequence
-0:304        move second child to first child (temp highp 4-component vector of uint)
-0:304          'gathC7' (temp highp 4-component vector of uint)
-0:304          textureGather (global highp 4-component vector of uint)
-0:304            'CA7' (uniform highp usamplerCubeArray)
-0:304            Constant:
-0:304              0.500000
-0:304              0.500000
-0:304              0.500000
-0:304              0.500000
-0:304            Constant:
-0:304              0 (const int)
-0:306      Sequence
-0:306        move second child to first child (temp highp 4-component vector of float)
-0:306          'gath5' (temp highp 4-component vector of float)
-0:306          textureGather (global highp 4-component vector of float)
-0:306            'CA5' (uniform highp samplerCubeArrayShadow)
-0:306            Constant:
-0:306              0.500000
-0:306              0.500000
-0:306              0.500000
-0:306              0.500000
-0:306            Constant:
-0:306              2.500000
-0:308      Sequence
-0:308        move second child to first child (temp highp 3-component vector of int)
-0:308          's1' (temp highp 3-component vector of int)
-0:308          imageQuerySize (global highp 3-component vector of int)
-0:308            'CA1' (writeonly uniform highp imageCubeArray)
-0:309      Sequence
-0:309        move second child to first child (temp highp 3-component vector of int)
-0:309          's2' (temp highp 3-component vector of int)
-0:309          imageQuerySize (global highp 3-component vector of int)
-0:309            'CA2' (writeonly uniform highp iimageCubeArray)
-0:310      Sequence
-0:310        move second child to first child (temp highp 3-component vector of int)
-0:310          's3' (temp highp 3-component vector of int)
-0:310          imageQuerySize (global highp 3-component vector of int)
-0:310            'CA3' (writeonly uniform highp uimageCubeArray)
-0:312      imageStore (global highp void)
-0:312        'CA1' (writeonly uniform highp imageCubeArray)
-0:312        's3' (temp highp 3-component vector of int)
-0:312        Constant:
-0:312          1.000000
-0:312          1.000000
-0:312          1.000000
-0:312          1.000000
-0:313      imageStore (global highp void)
-0:313        'CA2' (writeonly uniform highp iimageCubeArray)
-0:313        's3' (temp highp 3-component vector of int)
-0:313        Constant:
-0:313          1 (const int)
-0:313          1 (const int)
-0:313          1 (const int)
-0:313          1 (const int)
-0:314      imageStore (global highp void)
-0:314        'CA3' (writeonly uniform highp uimageCubeArray)
-0:314        's3' (temp highp 3-component vector of int)
-0:314        Constant:
-0:314          1 (const uint)
-0:314          1 (const uint)
-0:314          1 (const uint)
-0:314          1 (const uint)
-0:316      Sequence
-0:316        move second child to first child (temp highp 4-component vector of float)
-0:316          'cl1' (temp highp 4-component vector of float)
-0:316          imageLoad (global highp 4-component vector of float)
-0:316            'rCA1' (layout(rgba16f ) readonly uniform highp imageCubeArray)
-0:316            's3' (temp highp 3-component vector of int)
-0:317      Sequence
-0:317        move second child to first child (temp highp 4-component vector of int)
-0:317          'cl2' (temp highp 4-component vector of int)
-0:317          imageLoad (global highp 4-component vector of int)
-0:317            'rCA2' (layout(rgba32i ) readonly uniform highp iimageCubeArray)
-0:317            's3' (temp highp 3-component vector of int)
-0:318      Sequence
-0:318        move second child to first child (temp highp 4-component vector of uint)
-0:318          'cl3' (temp highp 4-component vector of uint)
-0:318          imageLoad (global highp 4-component vector of uint)
-0:318            'rCA3' (layout(r32ui ) readonly uniform highp uimageCubeArray)
-0:318            's3' (temp highp 3-component vector of int)
-0:343  Function Definition: MSA( (global void)
-0:343    Function Parameters: 
-0:345    Sequence
-0:345      Sequence
-0:345        move second child to first child (temp highp 4-component vector of float)
-0:345          'tf' (temp highp 4-component vector of float)
-0:345          textureFetch (global highp 4-component vector of float)
-0:345            'samp2DMSA' (uniform highp sampler2DMSArray)
-0:345            Constant:
-0:345              5 (const int)
-0:345              5 (const int)
-0:345              5 (const int)
-0:345            Constant:
-0:345              2 (const int)
-0:346      Sequence
-0:346        move second child to first child (temp highp 4-component vector of int)
-0:346          'tfi' (temp highp 4-component vector of int)
-0:346          textureFetch (global highp 4-component vector of int)
-0:346            'samp2DMSAi' (uniform highp isampler2DMSArray)
-0:346            Constant:
-0:346              5 (const int)
-0:346              5 (const int)
-0:346              5 (const int)
-0:346            Constant:
-0:346              2 (const int)
-0:347      Sequence
-0:347        move second child to first child (temp highp 4-component vector of uint)
-0:347          'tfu' (temp highp 4-component vector of uint)
-0:347          textureFetch (global highp 4-component vector of uint)
-0:347            'samp2DMSAu' (uniform highp usampler2DMSArray)
-0:347            Constant:
-0:347              5 (const int)
-0:347              5 (const int)
-0:347              5 (const int)
-0:347            Constant:
-0:347              2 (const int)
-0:349      Sequence
-0:349        move second child to first child (temp highp 3-component vector of int)
-0:349          'tfs' (temp highp 3-component vector of int)
-0:349          textureSize (global highp 3-component vector of int)
-0:349            'samp2DMSA' (uniform highp sampler2DMSArray)
-0:350      Sequence
-0:350        move second child to first child (temp highp 3-component vector of int)
-0:350          'tfsi' (temp highp 3-component vector of int)
-0:350          textureSize (global highp 3-component vector of int)
-0:350            'samp2DMSAi' (uniform highp isampler2DMSArray)
-0:352      Sequence
-0:352        move second child to first child (temp highp 3-component vector of int)
-0:352          'tfsu' (temp highp 3-component vector of int)
-0:352          textureSize (global highp 3-component vector of int)
-0:352            'samp2DMSAu' (uniform highp usampler2DMSArray)
-0:364  Function Definition: goodImageAtom( (global void)
-0:364    Function Parameters: 
-0:?     Sequence
-0:370      imageAtomicAdd (global highp int)
-0:370        'im2Di' (layout(r32i ) uniform highp iimage2D)
-0:370        'P' (uniform highp 2-component vector of int)
-0:370        'dati' (temp highp int)
-0:371      imageAtomicAdd (global highp uint)
-0:371        'im2Du' (layout(r32ui ) uniform highp uimage2D)
-0:371        'P' (uniform highp 2-component vector of int)
-0:371        'datu' (temp highp uint)
-0:372      imageAtomicMin (global highp int)
-0:372        'im2Di' (layout(r32i ) uniform highp iimage2D)
-0:372        'P' (uniform highp 2-component vector of int)
-0:372        'dati' (temp highp int)
-0:373      imageAtomicMin (global highp uint)
-0:373        'im2Du' (layout(r32ui ) uniform highp uimage2D)
-0:373        'P' (uniform highp 2-component vector of int)
-0:373        'datu' (temp highp uint)
-0:374      imageAtomicMax (global highp int)
-0:374        'im2Di' (layout(r32i ) uniform highp iimage2D)
-0:374        'P' (uniform highp 2-component vector of int)
-0:374        'dati' (temp highp int)
-0:375      imageAtomicMax (global highp uint)
-0:375        'im2Du' (layout(r32ui ) uniform highp uimage2D)
-0:375        'P' (uniform highp 2-component vector of int)
-0:375        'datu' (temp highp uint)
-0:376      imageAtomicAnd (global highp int)
-0:376        'im2Di' (layout(r32i ) uniform highp iimage2D)
-0:376        'P' (uniform highp 2-component vector of int)
-0:376        'dati' (temp highp int)
-0:377      imageAtomicAnd (global highp uint)
-0:377        'im2Du' (layout(r32ui ) uniform highp uimage2D)
-0:377        'P' (uniform highp 2-component vector of int)
-0:377        'datu' (temp highp uint)
-0:378      imageAtomicOr (global highp int)
-0:378        'im2Di' (layout(r32i ) uniform highp iimage2D)
-0:378        'P' (uniform highp 2-component vector of int)
-0:378        'dati' (temp highp int)
-0:379      imageAtomicOr (global highp uint)
-0:379        'im2Du' (layout(r32ui ) uniform highp uimage2D)
-0:379        'P' (uniform highp 2-component vector of int)
-0:379        'datu' (temp highp uint)
-0:380      imageAtomicXor (global highp int)
-0:380        'im2Di' (layout(r32i ) uniform highp iimage2D)
-0:380        'P' (uniform highp 2-component vector of int)
-0:380        'dati' (temp highp int)
-0:381      imageAtomicXor (global highp uint)
-0:381        'im2Du' (layout(r32ui ) uniform highp uimage2D)
-0:381        'P' (uniform highp 2-component vector of int)
-0:381        'datu' (temp highp uint)
-0:382      imageAtomicExchange (global highp int)
-0:382        'im2Di' (layout(r32i ) uniform highp iimage2D)
-0:382        'P' (uniform highp 2-component vector of int)
-0:382        'dati' (temp highp int)
-0:383      imageAtomicExchange (global highp uint)
-0:383        'im2Du' (layout(r32ui ) uniform highp uimage2D)
-0:383        'P' (uniform highp 2-component vector of int)
-0:383        'datu' (temp highp uint)
-0:384      imageAtomicExchange (global highp float)
-0:384        'im2Df' (layout(r32f ) uniform highp image2D)
-0:384        'P' (uniform highp 2-component vector of int)
-0:384        'datf' (temp highp float)
-0:385      imageAtomicCompSwap (global highp int)
-0:385        'im2Di' (layout(r32i ) uniform highp iimage2D)
-0:385        'P' (uniform highp 2-component vector of int)
-0:385        Constant:
-0:385          3 (const int)
-0:385        'dati' (temp highp int)
-0:386      imageAtomicCompSwap (global highp uint)
-0:386        'im2Du' (layout(r32ui ) uniform highp uimage2D)
-0:386        'P' (uniform highp 2-component vector of int)
-0:386        Constant:
-0:386          5 (const uint)
-0:386        'datu' (temp highp uint)
-0:398  Function Definition: badInterp( (global void)
-0:398    Function Parameters: 
-0:400    Sequence
-0:400      Constant:
-0:400        0.000000
-0:401      Constant:
-0:401        0.000000
-0:402      Constant:
-0:402        0.000000
 0:?   Linker Objects
 0:?     's' (shared highp 4-component vector of float)
 0:?     'v' (buffer highp 4-component vector of float)
diff --git a/Test/baseResults/310AofA.vert.out b/Test/baseResults/310AofA.vert.out
index 83f105c..6b69e71 100644
--- a/Test/baseResults/310AofA.vert.out
+++ b/Test/baseResults/310AofA.vert.out
@@ -5,7 +5,7 @@
 ERROR: 0:28: '[]' : only outermost dimension of an array of arrays can be implicitly sized 
 ERROR: 0:40: '' : array size required 
 ERROR: 0:48: 'constructor' : constructing non-array constituent from array argument 
-ERROR: 0:49: 'constructior' : array constructor argument not correct type to construct array element 
+ERROR: 0:49: 'constructor' : array constructor argument not correct type to construct array element 
 ERROR: 0:62: '[' :  array index out of range '4'
 ERROR: 0:78: 'assign' :  cannot convert from 'global 4-element array of 7-element array of highp float' to 'global 5-element array of 7-element array of highp float'
 ERROR: 0:79: 'assign' :  cannot convert from 'global 4-element array of 7-element array of highp float' to 'global implicitly-sized array of 7-element array of highp float'
@@ -359,277 +359,6 @@
 0:13          1 (const uint)
 0:13          2 (const uint)
 0:13        'd' (temp 3-element array of 2-element array of highp int)
-0:44  Function Definition: foo(f1[5][7]; (global 4-element array of 7-element array of highp float)
-0:44    Function Parameters: 
-0:44      'a' (in 5-element array of 7-element array of highp float)
-0:?     Sequence
-0:47      move second child to first child (temp 7-element array of highp float)
-0:47        'r' (temp 7-element array of highp float)
-0:47        direct index (temp 7-element array of highp float)
-0:47          'a' (in 5-element array of 7-element array of highp float)
-0:47          Constant:
-0:47            2 (const int)
-0:48      Constant:
-0:48        0.000000
-0:49      Constant:
-0:49        0.000000
-0:50      Branch: Return with expression
-0:50        Construct float (temp 4-element array of 7-element array of float)
-0:50          direct index (temp 7-element array of highp float)
-0:50            'a' (in 5-element array of 7-element array of highp float)
-0:50            Constant:
-0:50              0 (const int)
-0:50          direct index (temp 7-element array of highp float)
-0:50            'a' (in 5-element array of 7-element array of highp float)
-0:50            Constant:
-0:50              1 (const int)
-0:50          'r' (temp 7-element array of highp float)
-0:50          direct index (temp 7-element array of highp float)
-0:50            'a' (in 5-element array of 7-element array of highp float)
-0:50            Constant:
-0:50              3 (const int)
-0:51      Branch: Return with expression
-0:51        Construct float (temp 4-element array of 7-element array of float)
-0:51          direct index (temp 7-element array of highp float)
-0:51            'a' (in 5-element array of 7-element array of highp float)
-0:51            Constant:
-0:51              0 (const int)
-0:51          direct index (temp 7-element array of highp float)
-0:51            'a' (in 5-element array of 7-element array of highp float)
-0:51            Constant:
-0:51              1 (const int)
-0:51          'r' (temp 7-element array of highp float)
-0:51          direct index (temp 7-element array of highp float)
-0:51            'a' (in 5-element array of 7-element array of highp float)
-0:51            Constant:
-0:51              3 (const int)
-0:52      Branch: Return with expression
-0:52        Construct float (temp 4-element array of 7-element array of float)
-0:52          direct index (temp 7-element array of highp float)
-0:52            'a' (in 5-element array of 7-element array of highp float)
-0:52            Constant:
-0:52              0 (const int)
-0:52          direct index (temp 7-element array of highp float)
-0:52            'a' (in 5-element array of 7-element array of highp float)
-0:52            Constant:
-0:52              1 (const int)
-0:52          direct index (temp 7-element array of highp float)
-0:52            'a' (in 5-element array of 7-element array of highp float)
-0:52            Constant:
-0:52              2 (const int)
-0:52          direct index (temp 7-element array of highp float)
-0:52            'a' (in 5-element array of 7-element array of highp float)
-0:52            Constant:
-0:52              3 (const int)
-0:55  Function Definition: bar(f1[5][7]; (global void)
-0:55    Function Parameters: 
-0:55      '' (in 5-element array of 7-element array of highp float)
-0:57  Function Definition: foo2( (global void)
-0:57    Function Parameters: 
-0:?     Sequence
-0:?       Sequence
-0:62        move second child to first child (temp highp float)
-0:62          direct index (temp highp float)
-0:62            direct index (temp 2-element array of highp float)
-0:62              direct index (temp 4-element array of 2-element array of highp float)
-0:62                'gu' (temp 3-element array of 4-element array of 2-element array of highp float)
-0:62                Constant:
-0:62                  2 (const int)
-0:62              Constant:
-0:62                4 (const int)
-0:62            Constant:
-0:62              1 (const int)
-0:62          Constant:
-0:62            4.000000
-0:64      Sequence
-0:64        move second child to first child (temp 3-element array of 2-element array of highp 4-component vector of float)
-0:64          'ca4' (temp 3-element array of 2-element array of highp 4-component vector of float)
-0:66          Constant:
-0:66            0.000000
-0:66            0.000000
-0:66            0.000000
-0:66            0.000000
-0:66            1.000000
-0:66            1.000000
-0:66            1.000000
-0:66            1.000000
-0:66            0.000000
-0:66            0.000000
-0:66            0.000000
-0:66            0.000000
-0:66            1.000000
-0:66            1.000000
-0:66            1.000000
-0:66            1.000000
-0:66            0.000000
-0:66            0.000000
-0:66            0.000000
-0:66            0.000000
-0:66            1.000000
-0:66            1.000000
-0:66            1.000000
-0:66            1.000000
-0:67      Sequence
-0:67        move second child to first child (temp 3-element array of 2-element array of highp 4-component vector of float)
-0:67          'caim' (temp 3-element array of 2-element array of highp 4-component vector of float)
-0:69          Constant:
-0:69            4.000000
-0:69            4.000000
-0:69            4.000000
-0:69            4.000000
-0:69            2.000000
-0:69            2.000000
-0:69            2.000000
-0:69            2.000000
-0:69            4.000000
-0:69            4.000000
-0:69            4.000000
-0:69            4.000000
-0:69            2.000000
-0:69            2.000000
-0:69            2.000000
-0:69            2.000000
-0:69            4.000000
-0:69            4.000000
-0:69            4.000000
-0:69            4.000000
-0:69            2.000000
-0:69            2.000000
-0:69            2.000000
-0:69            2.000000
-0:70      Sequence
-0:70        move second child to first child (temp 3-element array of 2-element array of highp 4-component vector of float)
-0:70          'caim2' (temp 3-element array of 2-element array of highp 4-component vector of float)
-0:72          Constant:
-0:72            4.000000
-0:72            4.000000
-0:72            4.000000
-0:72            4.000000
-0:72            2.000000
-0:72            2.000000
-0:72            2.000000
-0:72            2.000000
-0:72            4.000000
-0:72            4.000000
-0:72            4.000000
-0:72            4.000000
-0:72            2.000000
-0:72            2.000000
-0:72            2.000000
-0:72            2.000000
-0:72            4.000000
-0:72            4.000000
-0:72            4.000000
-0:72            4.000000
-0:72            2.000000
-0:72            2.000000
-0:72            2.000000
-0:72            2.000000
-0:73      Sequence
-0:73        move second child to first child (temp 3-element array of 2-element array of highp 4-component vector of float)
-0:73          'caim3' (temp 3-element array of 2-element array of highp 4-component vector of float)
-0:75          Constant:
-0:75            4.000000
-0:75            4.000000
-0:75            4.000000
-0:75            4.000000
-0:75            2.000000
-0:75            2.000000
-0:75            2.000000
-0:75            2.000000
-0:75            4.000000
-0:75            4.000000
-0:75            4.000000
-0:75            4.000000
-0:75            2.000000
-0:75            2.000000
-0:75            2.000000
-0:75            2.000000
-0:75            4.000000
-0:75            4.000000
-0:75            4.000000
-0:75            4.000000
-0:75            2.000000
-0:75            2.000000
-0:75            2.000000
-0:75            2.000000
-0:77      move second child to first child (temp 4-element array of 7-element array of highp float)
-0:77        'g4' (global 4-element array of 7-element array of highp float)
-0:77        Function Call: foo(f1[5][7]; (global 4-element array of 7-element array of highp float)
-0:77          'g5' (global 5-element array of 7-element array of highp float)
-0:78      'g5' (global 5-element array of 7-element array of highp float)
-0:79      'gu' (global 1-element array of 7-element array of highp float)
-0:81      Constant:
-0:81        0.000000
-0:82      Function Call: bar(f1[5][7]; (global void)
-0:82        'g5' (global 5-element array of 7-element array of highp float)
-0:84      Test condition and select (temp void)
-0:84        Condition
-0:84        Compare Equal (temp bool)
-0:84          Function Call: foo(f1[5][7]; (global 4-element array of 7-element array of highp float)
-0:84            'g5' (global 5-element array of 7-element array of highp float)
-0:84          'g4' (global 4-element array of 7-element array of highp float)
-0:84        true case is null
-0:86      Test condition and select (temp void)
-0:86        Condition
-0:86        Constant:
-0:86          false (const bool)
-0:86        true case is null
-0:90      move second child to first child (temp highp float)
-0:90        direct index (temp highp float)
-0:90          direct index (temp 7-element array of highp float)
-0:90            'u' (temp 5-element array of 7-element array of highp float)
-0:90            Constant:
-0:90              5 (const int)
-0:90          Constant:
-0:90            2 (const int)
-0:90        Constant:
-0:90          5.000000
-0:91      Function Call: foo(f1[5][7]; (global 4-element array of 7-element array of highp float)
-0:91        'u' (temp 5-element array of 7-element array of highp float)
-0:94      direct index (layout(column_major shared ) temp highp 4-component vector of float)
-0:94        v: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float)
-0:94          direct index (layout(column_major shared ) temp block{layout(column_major shared ) buffer implicitly-sized array of highp float u, layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float v})
-0:94            'name' (layout(column_major shared ) buffer 3-element array of block{layout(column_major shared ) buffer implicitly-sized array of highp float u, layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float v})
-0:94            Constant:
-0:94              1 (const int)
-0:94          Constant:
-0:94            1 (const int)
-0:94        Constant:
-0:94          -1 (const int)
-0:95      move second child to first child (temp highp 4-component vector of float)
-0:95        direct index (layout(column_major shared ) temp highp 4-component vector of float)
-0:95          v: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float)
-0:95            direct index (layout(column_major shared ) temp block{layout(column_major shared ) buffer implicitly-sized array of highp float u, layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float v})
-0:95              'name' (layout(column_major shared ) buffer 3-element array of block{layout(column_major shared ) buffer implicitly-sized array of highp float u, layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float v})
-0:95              Constant:
-0:95                1 (const int)
-0:95            Constant:
-0:95              1 (const int)
-0:95          Constant:
-0:95            1 (const int)
-0:95        Constant:
-0:95          4.300000
-0:95          4.300000
-0:95          4.300000
-0:95          4.300000
-0:96      v: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float)
-0:96        direct index (layout(column_major shared ) temp block{layout(column_major shared ) buffer implicitly-sized array of highp float u, layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float v})
-0:96          'name' (layout(column_major shared ) buffer 3-element array of block{layout(column_major shared ) buffer implicitly-sized array of highp float u, layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float v})
-0:96          Constant:
-0:96            1 (const int)
-0:96        Constant:
-0:96          1 (const int)
-0:98      Constant:
-0:98        7 (const int)
-0:99      array length (temp int)
-0:99        v: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of 7-element array of highp 4-component vector of float)
-0:99          direct index (layout(column_major shared ) temp block{layout(column_major shared ) buffer highp float u, layout(column_major shared ) buffer implicitly-sized array of 7-element array of highp 4-component vector of float v})
-0:99            'name3' (layout(column_major shared ) buffer 3-element array of block{layout(column_major shared ) buffer highp float u, layout(column_major shared ) buffer implicitly-sized array of 7-element array of highp 4-component vector of float v})
-0:99            Constant:
-0:99              0 (const int)
-0:99          Constant:
-0:99            1 (const int)
 0:?   Linker Objects
 0:?     'name' (layout(column_major shared ) buffer 3-element array of block{layout(column_major shared ) buffer implicitly-sized array of highp float u, layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float v})
 0:?     'uname' (layout(column_major shared ) uniform 3-element array of block{layout(column_major shared ) uniform highp float u, layout(column_major shared ) uniform 1-element array of highp 4-component vector of float v})
diff --git a/Test/baseResults/330.frag.out b/Test/baseResults/330.frag.out
index 904ad3e..d3c54fc 100644
--- a/Test/baseResults/330.frag.out
+++ b/Test/baseResults/330.frag.out
@@ -152,31 +152,6 @@
 0:12          'buffer' (temp int)
 0:12          Constant:
 0:12            4 (const int)
-0:21  Function Definition: foo( (global void)
-0:21    Function Parameters: 
-0:23    Sequence
-0:23      Sequence
-0:23        move second child to first child (temp 4-component vector of float)
-0:23          'c' (temp 4-component vector of float)
-0:23          gl_Color: direct index for structure (in 4-component vector of float Color)
-0:23            'anon@0' (in block{in 4-component vector of float Color gl_Color, })
-0:23            Constant:
-0:23              2 (const uint)
-0:24      move second child to first child (temp 4-component vector of float)
-0:24        'outVar' (layout(location=0 index=0 ) out 4-component vector of float)
-0:24        'inVar' (smooth in 4-component vector of float)
-0:133  Function Definition: qlod( (global void)
-0:133    Function Parameters: 
-0:?     Sequence
-0:140      'lod' (temp 2-component vector of float)
-0:141      'lod' (temp 2-component vector of float)
-0:147  Function Definition: fooKeyMem( (global void)
-0:147    Function Parameters: 
-0:149    Sequence
-0:149      precise: direct index for structure (global int)
-0:149        'KeyMem' (global structure{global int precise})
-0:149        Constant:
-0:149          0 (const int)
 0:?   Linker Objects
 0:?     'inVar' (smooth in 4-component vector of float)
 0:?     'outVar' (layout(location=0 index=0 ) out 4-component vector of float)
diff --git a/Test/baseResults/400.frag.out b/Test/baseResults/400.frag.out
index 33a8c9a..aea4e49 100644
--- a/Test/baseResults/400.frag.out
+++ b/Test/baseResults/400.frag.out
@@ -481,8 +481,6 @@
 0:?     'vl2' (layout(location=6 ) smooth in 4-component vector of float)
 0:?     'uv3' (layout(location=3 ) uniform 3-component vector of float)
 0:?     'anon@0' (in block{in float FogFragCoord gl_FogFragCoord, in implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, smooth in 4-component vector of float Color gl_Color, in 4-component vector of float SecondaryColor gl_SecondaryColor})
-0:?     'anon@0' (in block{in float FogFragCoord gl_FogFragCoord, in implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, smooth in 4-component vector of float Color gl_Color, in 4-component vector of float SecondaryColor gl_SecondaryColor})
-0:?     'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
 0:?     'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
 0:?     'u2drs' (uniform sampler2DRectShadow)
 0:?     'patchIn' (smooth patch in 4-component vector of float)
@@ -644,312 +642,6 @@
 0:27        move second child to first child (temp 4-component vector of float)
 0:27          'c' (temp 4-component vector of float)
 0:27          'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
-0:47  Function Definition: foo23( (global void)
-0:47    Function Parameters: 
-0:?     Sequence
-0:51      textureProjGradOffset (global float)
-0:51        'u2drs' (uniform sampler2DRectShadow)
-0:51        'outp' (out 4-component vector of float)
-0:51        Constant:
-0:51          0.000000
-0:51          0.000000
-0:51        Constant:
-0:51          0.000000
-0:51          0.000000
-0:51        Convert float to int (temp 2-component vector of int)
-0:51          'c2D' (smooth in 2-component vector of float)
-0:52      textureProjGradOffset (global float)
-0:52        'u2drs' (uniform sampler2DRectShadow)
-0:52        'outp' (out 4-component vector of float)
-0:52        Constant:
-0:52          0.000000
-0:52          0.000000
-0:52        Constant:
-0:52          0.000000
-0:52          0.000000
-0:52        Constant:
-0:52          3 (const int)
-0:52          4 (const int)
-0:53      textureProjGradOffset (global float)
-0:53        'u2drs' (uniform sampler2DRectShadow)
-0:53        'outp' (out 4-component vector of float)
-0:53        Constant:
-0:53          0.000000
-0:53          0.000000
-0:53        Constant:
-0:53          0.000000
-0:53          0.000000
-0:53        Constant:
-0:53          15 (const int)
-0:53          16 (const int)
-0:54      textureProjGradOffset (global float)
-0:54        'u2drs' (uniform sampler2DRectShadow)
-0:54        'outp' (out 4-component vector of float)
-0:54        Constant:
-0:54          0.000000
-0:54          0.000000
-0:54        Constant:
-0:54          0.000000
-0:54          0.000000
-0:54        Constant:
-0:54          -10 (const int)
-0:54          20 (const int)
-0:60  Function Definition: foo24( (global void)
-0:60    Function Parameters: 
-0:?     Sequence
-0:63      move second child to first child (temp 3-component vector of double)
-0:63        'df' (temp 3-component vector of double)
-0:63        modf (global 3-component vector of double)
-0:63          Convert float to double (temp 3-component vector of double)
-0:63            vector swizzle (temp 3-component vector of float)
-0:63              'outp' (out 4-component vector of float)
-0:63              Sequence
-0:63                Constant:
-0:63                  0 (const int)
-0:63                Constant:
-0:63                  1 (const int)
-0:63                Constant:
-0:63                  2 (const int)
-0:63          'di' (temp 3-component vector of double)
-0:71  Function Definition: foodc1( (global void)
-0:71    Function Parameters: 
-0:73    Sequence
-0:73      Sequence
-0:73        move second child to first child (temp 2-component vector of float)
-0:73          'v2' (temp 2-component vector of float)
-0:73          dPdxFine (global 2-component vector of float)
-0:73            'in2' (smooth in 2-component vector of float)
-0:74      Sequence
-0:74        move second child to first child (temp 3-component vector of float)
-0:74          'v3' (temp 3-component vector of float)
-0:74          dPdyCoarse (global 3-component vector of float)
-0:74            'in3' (smooth in 3-component vector of float)
-0:75      Sequence
-0:75        move second child to first child (temp 4-component vector of float)
-0:75          'v4' (temp 4-component vector of float)
-0:75          add (temp 4-component vector of float)
-0:75            fwidthCoarse (global 4-component vector of float)
-0:75              'in4' (smooth in 4-component vector of float)
-0:75            fwidthFine (global 4-component vector of float)
-0:75              'in4' (smooth in 4-component vector of float)
-0:80  Function Definition: foodc2( (global void)
-0:80    Function Parameters: 
-0:82    Sequence
-0:82      Sequence
-0:82        move second child to first child (temp 2-component vector of float)
-0:82          'v2' (temp 2-component vector of float)
-0:82          dPdxFine (global 2-component vector of float)
-0:82            'in2' (smooth in 2-component vector of float)
-0:83      Sequence
-0:83        move second child to first child (temp 3-component vector of float)
-0:83          'v3' (temp 3-component vector of float)
-0:83          dPdyCoarse (global 3-component vector of float)
-0:83            'in3' (smooth in 3-component vector of float)
-0:84      Sequence
-0:84        move second child to first child (temp 4-component vector of float)
-0:84          'v4' (temp 4-component vector of float)
-0:84          add (temp 4-component vector of float)
-0:84            fwidthCoarse (global 4-component vector of float)
-0:84              'in4' (smooth in 4-component vector of float)
-0:84            fwidthFine (global 4-component vector of float)
-0:84              'in4' (smooth in 4-component vector of float)
-0:89      move second child to first child (temp 2-component vector of float)
-0:89        'v2' (temp 2-component vector of float)
-0:89        frexp (global 2-component vector of float)
-0:89          'v2' (temp 2-component vector of float)
-0:89          'i2' (temp 2-component vector of int)
-0:90      move second child to first child (temp 3-component vector of float)
-0:90        'v3' (temp 3-component vector of float)
-0:90        ldexp (global 3-component vector of float)
-0:90          'v3' (temp 3-component vector of float)
-0:90          'i3' (temp 3-component vector of int)
-0:92      move second child to first child (temp uint)
-0:92        'u1' (temp uint)
-0:92        PackUnorm4x8 (global uint)
-0:92          'v4' (temp 4-component vector of float)
-0:93      move second child to first child (temp uint)
-0:93        'u1' (temp uint)
-0:93        PackSnorm4x8 (global uint)
-0:93          'v4' (temp 4-component vector of float)
-0:94      move second child to first child (temp 4-component vector of float)
-0:94        'v4' (temp 4-component vector of float)
-0:94        UnpackUnorm4x8 (global 4-component vector of float)
-0:94          'u1' (temp uint)
-0:95      move second child to first child (temp 4-component vector of float)
-0:95        'v4' (temp 4-component vector of float)
-0:95        UnpackSnorm4x8 (global 4-component vector of float)
-0:95          'u1' (temp uint)
-0:99      move second child to first child (temp double)
-0:99        'd' (temp double)
-0:99        PackDouble2x32 (global double)
-0:99          'u2' (temp 2-component vector of uint)
-0:100      move second child to first child (temp 2-component vector of uint)
-0:100        'u2' (temp 2-component vector of uint)
-0:100        UnpackDouble2x32 (global 2-component vector of uint)
-0:100          'd' (temp double)
-0:117  Function Definition: interp( (global void)
-0:117    Function Parameters: 
-0:119    Sequence
-0:119      interpolateAtCentroid (global 2-component vector of float)
-0:119        'colorfc' (centroid flat in 2-component vector of float)
-0:120      interpolateAtCentroid (global 4-component vector of float)
-0:120        'colorSampIn' (smooth sample in 4-component vector of float)
-0:121      interpolateAtCentroid (global 4-component vector of float)
-0:121        'colorfsi' (noperspective in 4-component vector of float)
-0:122      interpolateAtCentroid (global float)
-0:122        'scalarIn' (smooth in float)
-0:123      Constant:
-0:123        0.000000
-0:124      interpolateAtCentroid (global 3-component vector of float)
-0:124        direct index (smooth sample temp 3-component vector of float)
-0:124          'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
-0:124          Constant:
-0:124            2 (const int)
-0:125      interpolateAtCentroid (global 2-component vector of float)
-0:125        vector swizzle (temp 2-component vector of float)
-0:125          direct index (smooth sample temp 3-component vector of float)
-0:125            'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
-0:125            Constant:
-0:125              2 (const int)
-0:125          Sequence
-0:125            Constant:
-0:125              0 (const int)
-0:125            Constant:
-0:125              1 (const int)
-0:127      Constant:
-0:127        0.000000
-0:128      interpolateAtSample (global 3-component vector of float)
-0:128        indirect index (smooth sample temp 3-component vector of float)
-0:128          'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
-0:128          'i' (flat in int)
-0:128        Constant:
-0:128          0 (const int)
-0:129      interpolateAtSample (global float)
-0:129        x: direct index for structure (global float)
-0:129          's1' (smooth in structure{global float x})
-0:129          Constant:
-0:129            0 (const int)
-0:129        Constant:
-0:129          2 (const int)
-0:130      interpolateAtSample (global float)
-0:130        'scalarIn' (smooth in float)
-0:130        Constant:
-0:130          1 (const int)
-0:132      Constant:
-0:132        0.000000
-0:133      interpolateAtOffset (global 3-component vector of float)
-0:133        direct index (smooth sample temp 3-component vector of float)
-0:133          'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
-0:133          Constant:
-0:133            2 (const int)
-0:133        Constant:
-0:133          0.200000
-0:133          0.200000
-0:134      interpolateAtOffset (global 2-component vector of float)
-0:134        vector swizzle (temp 2-component vector of float)
-0:134          direct index (smooth sample temp 3-component vector of float)
-0:134            'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
-0:134            Constant:
-0:134              2 (const int)
-0:134          Sequence
-0:134            Constant:
-0:134              0 (const int)
-0:134            Constant:
-0:134              1 (const int)
-0:134        Constant:
-0:134          0.200000
-0:134          0.200000
-0:135      interpolateAtOffset (global float)
-0:135        add (temp float)
-0:135          'scalarIn' (smooth in float)
-0:135          'scalarIn' (smooth in float)
-0:135        Constant:
-0:135          0.200000
-0:135          0.200000
-0:136      interpolateAtOffset (global float)
-0:136        x: direct index for structure (global float)
-0:136          's2' (sample temp structure{global float x})
-0:136          Constant:
-0:136            0 (const int)
-0:136        Constant:
-0:136          0.200000
-0:136          0.200000
-0:139      interpolateAtCentroid (global float)
-0:139        'f' (temp float)
-0:140      interpolateAtSample (global 4-component vector of float)
-0:140        'outp' (out 4-component vector of float)
-0:140        Constant:
-0:140          0 (const int)
-0:161  Function Definition: qlod( (global void)
-0:161    Function Parameters: 
-0:?     Sequence
-0:168      move second child to first child (temp 2-component vector of float)
-0:168        'lod' (temp 2-component vector of float)
-0:168        textureQueryLod (global 2-component vector of float)
-0:168          'samp1D' (uniform sampler1D)
-0:168          'pf' (temp float)
-0:169      move second child to first child (temp 2-component vector of float)
-0:169        'lod' (temp 2-component vector of float)
-0:169        textureQueryLod (global 2-component vector of float)
-0:169          'isamp2D' (uniform isampler2D)
-0:169          'pf2' (temp 2-component vector of float)
-0:170      move second child to first child (temp 2-component vector of float)
-0:170        'lod' (temp 2-component vector of float)
-0:170        textureQueryLod (global 2-component vector of float)
-0:170          'usamp3D' (uniform usampler3D)
-0:170          'pf3' (temp 3-component vector of float)
-0:171      move second child to first child (temp 2-component vector of float)
-0:171        'lod' (temp 2-component vector of float)
-0:171        textureQueryLod (global 2-component vector of float)
-0:171          'sampCube' (uniform samplerCube)
-0:171          'pf3' (temp 3-component vector of float)
-0:172      move second child to first child (temp 2-component vector of float)
-0:172        'lod' (temp 2-component vector of float)
-0:172        textureQueryLod (global 2-component vector of float)
-0:172          'isamp1DA' (uniform isampler1DArray)
-0:172          'pf' (temp float)
-0:173      move second child to first child (temp 2-component vector of float)
-0:173        'lod' (temp 2-component vector of float)
-0:173        textureQueryLod (global 2-component vector of float)
-0:173          'usamp2DA' (uniform usampler2DArray)
-0:173          'pf2' (temp 2-component vector of float)
-0:174      move second child to first child (temp 2-component vector of float)
-0:174        'lod' (temp 2-component vector of float)
-0:174        textureQueryLod (global 2-component vector of float)
-0:174          'isampCubeA' (uniform isamplerCubeArray)
-0:174          'pf3' (temp 3-component vector of float)
-0:176      move second child to first child (temp 2-component vector of float)
-0:176        'lod' (temp 2-component vector of float)
-0:176        textureQueryLod (global 2-component vector of float)
-0:176          'samp1Ds' (uniform sampler1DShadow)
-0:176          'pf' (temp float)
-0:177      move second child to first child (temp 2-component vector of float)
-0:177        'lod' (temp 2-component vector of float)
-0:177        textureQueryLod (global 2-component vector of float)
-0:177          'samp2Ds' (uniform sampler2DShadow)
-0:177          'pf2' (temp 2-component vector of float)
-0:178      move second child to first child (temp 2-component vector of float)
-0:178        'lod' (temp 2-component vector of float)
-0:178        textureQueryLod (global 2-component vector of float)
-0:178          'sampCubes' (uniform samplerCubeShadow)
-0:178          'pf3' (temp 3-component vector of float)
-0:179      move second child to first child (temp 2-component vector of float)
-0:179        'lod' (temp 2-component vector of float)
-0:179        textureQueryLod (global 2-component vector of float)
-0:179          'samp1DAs' (uniform sampler1DArrayShadow)
-0:179          'pf' (temp float)
-0:180      move second child to first child (temp 2-component vector of float)
-0:180        'lod' (temp 2-component vector of float)
-0:180        textureQueryLod (global 2-component vector of float)
-0:180          'samp2DAs' (uniform sampler2DArrayShadow)
-0:180          'pf2' (temp 2-component vector of float)
-0:181      move second child to first child (temp 2-component vector of float)
-0:181        'lod' (temp 2-component vector of float)
-0:181        textureQueryLod (global 2-component vector of float)
-0:181          'sampCubeAs' (uniform samplerCubeArrayShadow)
-0:181          'pf3' (temp 3-component vector of float)
-0:183      'lod' (temp 2-component vector of float)
-0:184      'lod' (temp 2-component vector of float)
 0:?   Linker Objects
 0:?     'c2D' (smooth in 2-component vector of float)
 0:?     'i' (flat in int)
@@ -962,8 +654,6 @@
 0:?     'vl2' (layout(location=6 ) smooth in 4-component vector of float)
 0:?     'uv3' (layout(location=3 ) uniform 3-component vector of float)
 0:?     'anon@0' (in block{in float FogFragCoord gl_FogFragCoord, in 1-element array of 4-component vector of float TexCoord gl_TexCoord, smooth in 4-component vector of float Color gl_Color, in 4-component vector of float SecondaryColor gl_SecondaryColor})
-0:?     'anon@0' (in block{in float FogFragCoord gl_FogFragCoord, in 1-element array of 4-component vector of float TexCoord gl_TexCoord, smooth in 4-component vector of float Color gl_Color, in 4-component vector of float SecondaryColor gl_SecondaryColor})
-0:?     'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
 0:?     'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
 0:?     'u2drs' (uniform sampler2DRectShadow)
 0:?     'patchIn' (smooth patch in 4-component vector of float)
diff --git a/Test/baseResults/400.geom.out b/Test/baseResults/400.geom.out
index 16117e6..86e2b8f 100644
--- a/Test/baseResults/400.geom.out
+++ b/Test/baseResults/400.geom.out
@@ -1070,981 +1070,6 @@
 0:9        move second child to first child (temp int)
 0:9          'id' (temp int)
 0:9          'gl_InvocationID' (in int InvocationID)
-0:23  Function Definition: foo( (global void)
-0:23    Function Parameters: 
-0:25    Sequence
-0:25      Constant:
-0:25        1 (const int)
-0:26      gl_Position: direct index for structure (in 4-component vector of float Position)
-0:26        direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize})
-0:26          'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize})
-0:26          Constant:
-0:26            1 (const int)
-0:26        Constant:
-0:26          0 (const int)
-0:34  Function Definition: foo2( (global void)
-0:34    Function Parameters: 
-0:36    Sequence
-0:36      Constant:
-0:36        1 (const int)
-0:37      Constant:
-0:37        3 (const int)
-0:46  Function Definition: foo3( (global void)
-0:46    Function Parameters: 
-0:48    Sequence
-0:48      Constant:
-0:48        3 (const int)
-0:49      Constant:
-0:49        3 (const int)
-0:50      Constant:
-0:50        3 (const int)
-0:51      Constant:
-0:51        3 (const int)
-0:75  Function Definition: bits( (global void)
-0:75    Function Parameters: 
-0:?     Sequence
-0:78      move second child to first child (temp 2-component vector of uint)
-0:78        'u2' (temp 2-component vector of uint)
-0:78        addCarry (global 2-component vector of uint)
-0:78          'u2' (temp 2-component vector of uint)
-0:78          'u2' (temp 2-component vector of uint)
-0:78          'u2' (temp 2-component vector of uint)
-0:80      move second child to first child (temp uint)
-0:80        'u1' (temp uint)
-0:80        subBorrow (global uint)
-0:80          'u1' (temp uint)
-0:80          'u1' (temp uint)
-0:80          'u1' (temp uint)
-0:82      uMulExtended (global void)
-0:82        'u4' (temp 4-component vector of uint)
-0:82        'u4' (temp 4-component vector of uint)
-0:82        'u4' (temp 4-component vector of uint)
-0:82        'u4' (temp 4-component vector of uint)
-0:84      iMulExtended (global void)
-0:84        'i4' (temp 4-component vector of int)
-0:84        'i4' (temp 4-component vector of int)
-0:84        'i4' (temp 4-component vector of int)
-0:84        'i4' (temp 4-component vector of int)
-0:86      move second child to first child (temp int)
-0:86        'i1' (temp int)
-0:86        bitfieldExtract (global int)
-0:86          'i1' (temp int)
-0:86          Constant:
-0:86            4 (const int)
-0:86          Constant:
-0:86            5 (const int)
-0:88      move second child to first child (temp 3-component vector of uint)
-0:88        'u3' (temp 3-component vector of uint)
-0:88        bitfieldExtract (global 3-component vector of uint)
-0:88          'u3' (temp 3-component vector of uint)
-0:88          Constant:
-0:88            4 (const int)
-0:88          Constant:
-0:88            5 (const int)
-0:90      move second child to first child (temp 3-component vector of int)
-0:90        'i3' (temp 3-component vector of int)
-0:90        bitfieldInsert (global 3-component vector of int)
-0:90          'i3' (temp 3-component vector of int)
-0:90          'i3' (temp 3-component vector of int)
-0:90          Constant:
-0:90            4 (const int)
-0:90          Constant:
-0:90            5 (const int)
-0:91      move second child to first child (temp uint)
-0:91        'u1' (temp uint)
-0:91        bitfieldInsert (global uint)
-0:91          'u1' (temp uint)
-0:91          'u1' (temp uint)
-0:91          Constant:
-0:91            4 (const int)
-0:91          Constant:
-0:91            5 (const int)
-0:93      move second child to first child (temp 2-component vector of int)
-0:93        'i2' (temp 2-component vector of int)
-0:93        bitFieldReverse (global 2-component vector of int)
-0:93          'i2' (temp 2-component vector of int)
-0:94      move second child to first child (temp 4-component vector of uint)
-0:94        'u4' (temp 4-component vector of uint)
-0:94        bitFieldReverse (global 4-component vector of uint)
-0:94          'u4' (temp 4-component vector of uint)
-0:95      move second child to first child (temp int)
-0:95        'i1' (temp int)
-0:95        bitCount (global int)
-0:95          'i1' (temp int)
-0:96      move second child to first child (temp 3-component vector of int)
-0:96        'i3' (temp 3-component vector of int)
-0:96        bitCount (global 3-component vector of int)
-0:96          'u3' (temp 3-component vector of uint)
-0:97      move second child to first child (temp 2-component vector of int)
-0:97        'i2' (temp 2-component vector of int)
-0:97        findLSB (global 2-component vector of int)
-0:97          'i2' (temp 2-component vector of int)
-0:98      move second child to first child (temp 4-component vector of int)
-0:98        'i4' (temp 4-component vector of int)
-0:98        findLSB (global 4-component vector of int)
-0:98          'u4' (temp 4-component vector of uint)
-0:99      move second child to first child (temp int)
-0:99        'i1' (temp int)
-0:99        findMSB (global int)
-0:99          'i1' (temp int)
-0:100      move second child to first child (temp 2-component vector of int)
-0:100        'i2' (temp 2-component vector of int)
-0:100        findMSB (global 2-component vector of int)
-0:100          'u2' (temp 2-component vector of uint)
-0:108  Function Definition: qlod( (global void)
-0:108    Function Parameters: 
-0:?     Sequence
-0:115      'lod' (temp 2-component vector of float)
-0:116      'lod' (temp 2-component vector of float)
-0:119  Function Definition: doubles( (global void)
-0:119    Function Parameters: 
-0:?     Sequence
-0:131      move second child to first child (temp double)
-0:131        'doublev' (temp double)
-0:131        Constant:
-0:131          1.702939
-0:132      move second child to first child (temp 2-component vector of double)
-0:132        'dvec2v' (temp 2-component vector of double)
-0:132        Constant:
-0:132          1.643168
-0:132          1.643168
-0:133      move second child to first child (temp 3-component vector of double)
-0:133        'dvec3v' (temp 3-component vector of double)
-0:133        Constant:
-0:133          1.414214
-0:133          1.414214
-0:133          1.414214
-0:134      move second child to first child (temp 4-component vector of double)
-0:134        'dvec4v' (temp 4-component vector of double)
-0:134        Constant:
-0:134          1.449138
-0:134          1.449138
-0:134          1.449138
-0:134          1.449138
-0:136      add second child into first child (temp double)
-0:136        'doublev' (temp double)
-0:136        inverse sqrt (global double)
-0:136          'doublev' (temp double)
-0:137      add second child into first child (temp 2-component vector of double)
-0:137        'dvec2v' (temp 2-component vector of double)
-0:137        inverse sqrt (global 2-component vector of double)
-0:137          'dvec2v' (temp 2-component vector of double)
-0:138      add second child into first child (temp 3-component vector of double)
-0:138        'dvec3v' (temp 3-component vector of double)
-0:138        inverse sqrt (global 3-component vector of double)
-0:138          'dvec3v' (temp 3-component vector of double)
-0:139      add second child into first child (temp 4-component vector of double)
-0:139        'dvec4v' (temp 4-component vector of double)
-0:139        inverse sqrt (global 4-component vector of double)
-0:139          'dvec4v' (temp 4-component vector of double)
-0:141      add second child into first child (temp double)
-0:141        'doublev' (temp double)
-0:141        Absolute value (global double)
-0:141          'doublev' (temp double)
-0:142      add second child into first child (temp 2-component vector of double)
-0:142        'dvec2v' (temp 2-component vector of double)
-0:142        Absolute value (global 2-component vector of double)
-0:142          'dvec2v' (temp 2-component vector of double)
-0:143      add second child into first child (temp 3-component vector of double)
-0:143        'dvec3v' (temp 3-component vector of double)
-0:143        Absolute value (global 3-component vector of double)
-0:143          'dvec3v' (temp 3-component vector of double)
-0:144      add second child into first child (temp 4-component vector of double)
-0:144        'dvec4v' (temp 4-component vector of double)
-0:144        Absolute value (global 4-component vector of double)
-0:144          'dvec4v' (temp 4-component vector of double)
-0:146      add second child into first child (temp double)
-0:146        'doublev' (temp double)
-0:146        Sign (global double)
-0:146          'doublev' (temp double)
-0:147      add second child into first child (temp 2-component vector of double)
-0:147        'dvec2v' (temp 2-component vector of double)
-0:147        Sign (global 2-component vector of double)
-0:147          'dvec2v' (temp 2-component vector of double)
-0:148      add second child into first child (temp 3-component vector of double)
-0:148        'dvec3v' (temp 3-component vector of double)
-0:148        Sign (global 3-component vector of double)
-0:148          'dvec3v' (temp 3-component vector of double)
-0:149      add second child into first child (temp 4-component vector of double)
-0:149        'dvec4v' (temp 4-component vector of double)
-0:149        Sign (global 4-component vector of double)
-0:149          'dvec4v' (temp 4-component vector of double)
-0:151      add second child into first child (temp double)
-0:151        'doublev' (temp double)
-0:151        Floor (global double)
-0:151          'doublev' (temp double)
-0:152      add second child into first child (temp 2-component vector of double)
-0:152        'dvec2v' (temp 2-component vector of double)
-0:152        Floor (global 2-component vector of double)
-0:152          'dvec2v' (temp 2-component vector of double)
-0:153      add second child into first child (temp 3-component vector of double)
-0:153        'dvec3v' (temp 3-component vector of double)
-0:153        Floor (global 3-component vector of double)
-0:153          'dvec3v' (temp 3-component vector of double)
-0:154      add second child into first child (temp 4-component vector of double)
-0:154        'dvec4v' (temp 4-component vector of double)
-0:154        Floor (global 4-component vector of double)
-0:154          'dvec4v' (temp 4-component vector of double)
-0:156      add second child into first child (temp double)
-0:156        'doublev' (temp double)
-0:156        trunc (global double)
-0:156          'doublev' (temp double)
-0:157      add second child into first child (temp 2-component vector of double)
-0:157        'dvec2v' (temp 2-component vector of double)
-0:157        trunc (global 2-component vector of double)
-0:157          'dvec2v' (temp 2-component vector of double)
-0:158      add second child into first child (temp 3-component vector of double)
-0:158        'dvec3v' (temp 3-component vector of double)
-0:158        trunc (global 3-component vector of double)
-0:158          'dvec3v' (temp 3-component vector of double)
-0:159      add second child into first child (temp 4-component vector of double)
-0:159        'dvec4v' (temp 4-component vector of double)
-0:159        trunc (global 4-component vector of double)
-0:159          'dvec4v' (temp 4-component vector of double)
-0:161      add second child into first child (temp double)
-0:161        'doublev' (temp double)
-0:161        round (global double)
-0:161          'doublev' (temp double)
-0:162      add second child into first child (temp 2-component vector of double)
-0:162        'dvec2v' (temp 2-component vector of double)
-0:162        round (global 2-component vector of double)
-0:162          'dvec2v' (temp 2-component vector of double)
-0:163      add second child into first child (temp 3-component vector of double)
-0:163        'dvec3v' (temp 3-component vector of double)
-0:163        round (global 3-component vector of double)
-0:163          'dvec3v' (temp 3-component vector of double)
-0:164      add second child into first child (temp 4-component vector of double)
-0:164        'dvec4v' (temp 4-component vector of double)
-0:164        round (global 4-component vector of double)
-0:164          'dvec4v' (temp 4-component vector of double)
-0:166      add second child into first child (temp double)
-0:166        'doublev' (temp double)
-0:166        roundEven (global double)
-0:166          'doublev' (temp double)
-0:167      add second child into first child (temp 2-component vector of double)
-0:167        'dvec2v' (temp 2-component vector of double)
-0:167        roundEven (global 2-component vector of double)
-0:167          'dvec2v' (temp 2-component vector of double)
-0:168      add second child into first child (temp 3-component vector of double)
-0:168        'dvec3v' (temp 3-component vector of double)
-0:168        roundEven (global 3-component vector of double)
-0:168          'dvec3v' (temp 3-component vector of double)
-0:169      add second child into first child (temp 4-component vector of double)
-0:169        'dvec4v' (temp 4-component vector of double)
-0:169        roundEven (global 4-component vector of double)
-0:169          'dvec4v' (temp 4-component vector of double)
-0:171      add second child into first child (temp double)
-0:171        'doublev' (temp double)
-0:171        Ceiling (global double)
-0:171          'doublev' (temp double)
-0:172      add second child into first child (temp 2-component vector of double)
-0:172        'dvec2v' (temp 2-component vector of double)
-0:172        Ceiling (global 2-component vector of double)
-0:172          'dvec2v' (temp 2-component vector of double)
-0:173      add second child into first child (temp 3-component vector of double)
-0:173        'dvec3v' (temp 3-component vector of double)
-0:173        Ceiling (global 3-component vector of double)
-0:173          'dvec3v' (temp 3-component vector of double)
-0:174      add second child into first child (temp 4-component vector of double)
-0:174        'dvec4v' (temp 4-component vector of double)
-0:174        Ceiling (global 4-component vector of double)
-0:174          'dvec4v' (temp 4-component vector of double)
-0:176      add second child into first child (temp double)
-0:176        'doublev' (temp double)
-0:176        Fraction (global double)
-0:176          'doublev' (temp double)
-0:177      add second child into first child (temp 2-component vector of double)
-0:177        'dvec2v' (temp 2-component vector of double)
-0:177        Fraction (global 2-component vector of double)
-0:177          'dvec2v' (temp 2-component vector of double)
-0:178      add second child into first child (temp 3-component vector of double)
-0:178        'dvec3v' (temp 3-component vector of double)
-0:178        Fraction (global 3-component vector of double)
-0:178          'dvec3v' (temp 3-component vector of double)
-0:179      add second child into first child (temp 4-component vector of double)
-0:179        'dvec4v' (temp 4-component vector of double)
-0:179        Fraction (global 4-component vector of double)
-0:179          'dvec4v' (temp 4-component vector of double)
-0:181      add second child into first child (temp double)
-0:181        'doublev' (temp double)
-0:181        mod (global double)
-0:181          'doublev' (temp double)
-0:181          'doublev' (temp double)
-0:182      add second child into first child (temp 2-component vector of double)
-0:182        'dvec2v' (temp 2-component vector of double)
-0:182        mod (global 2-component vector of double)
-0:182          'dvec2v' (temp 2-component vector of double)
-0:182          'doublev' (temp double)
-0:183      add second child into first child (temp 3-component vector of double)
-0:183        'dvec3v' (temp 3-component vector of double)
-0:183        mod (global 3-component vector of double)
-0:183          'dvec3v' (temp 3-component vector of double)
-0:183          'doublev' (temp double)
-0:184      add second child into first child (temp 4-component vector of double)
-0:184        'dvec4v' (temp 4-component vector of double)
-0:184        mod (global 4-component vector of double)
-0:184          'dvec4v' (temp 4-component vector of double)
-0:184          'doublev' (temp double)
-0:185      add second child into first child (temp 2-component vector of double)
-0:185        'dvec2v' (temp 2-component vector of double)
-0:185        mod (global 2-component vector of double)
-0:185          'dvec2v' (temp 2-component vector of double)
-0:185          'dvec2v' (temp 2-component vector of double)
-0:186      add second child into first child (temp 3-component vector of double)
-0:186        'dvec3v' (temp 3-component vector of double)
-0:186        mod (global 3-component vector of double)
-0:186          'dvec3v' (temp 3-component vector of double)
-0:186          'dvec3v' (temp 3-component vector of double)
-0:187      add second child into first child (temp 4-component vector of double)
-0:187        'dvec4v' (temp 4-component vector of double)
-0:187        mod (global 4-component vector of double)
-0:187          'dvec4v' (temp 4-component vector of double)
-0:187          'dvec4v' (temp 4-component vector of double)
-0:189      add second child into first child (temp double)
-0:189        'doublev' (temp double)
-0:189        modf (global double)
-0:189          'doublev' (temp double)
-0:189          'doublev' (temp double)
-0:190      add second child into first child (temp 2-component vector of double)
-0:190        'dvec2v' (temp 2-component vector of double)
-0:190        modf (global 2-component vector of double)
-0:190          'dvec2v' (temp 2-component vector of double)
-0:190          'dvec2v' (temp 2-component vector of double)
-0:191      add second child into first child (temp 3-component vector of double)
-0:191        'dvec3v' (temp 3-component vector of double)
-0:191        modf (global 3-component vector of double)
-0:191          'dvec3v' (temp 3-component vector of double)
-0:191          'dvec3v' (temp 3-component vector of double)
-0:192      add second child into first child (temp 4-component vector of double)
-0:192        'dvec4v' (temp 4-component vector of double)
-0:192        modf (global 4-component vector of double)
-0:192          'dvec4v' (temp 4-component vector of double)
-0:192          'dvec4v' (temp 4-component vector of double)
-0:194      add second child into first child (temp double)
-0:194        'doublev' (temp double)
-0:194        min (global double)
-0:194          'doublev' (temp double)
-0:194          'doublev' (temp double)
-0:195      add second child into first child (temp 2-component vector of double)
-0:195        'dvec2v' (temp 2-component vector of double)
-0:195        min (global 2-component vector of double)
-0:195          'dvec2v' (temp 2-component vector of double)
-0:195          'doublev' (temp double)
-0:196      add second child into first child (temp 3-component vector of double)
-0:196        'dvec3v' (temp 3-component vector of double)
-0:196        min (global 3-component vector of double)
-0:196          'dvec3v' (temp 3-component vector of double)
-0:196          'doublev' (temp double)
-0:197      add second child into first child (temp 4-component vector of double)
-0:197        'dvec4v' (temp 4-component vector of double)
-0:197        min (global 4-component vector of double)
-0:197          'dvec4v' (temp 4-component vector of double)
-0:197          'doublev' (temp double)
-0:198      add second child into first child (temp 2-component vector of double)
-0:198        'dvec2v' (temp 2-component vector of double)
-0:198        min (global 2-component vector of double)
-0:198          'dvec2v' (temp 2-component vector of double)
-0:198          'dvec2v' (temp 2-component vector of double)
-0:199      add second child into first child (temp 3-component vector of double)
-0:199        'dvec3v' (temp 3-component vector of double)
-0:199        min (global 3-component vector of double)
-0:199          'dvec3v' (temp 3-component vector of double)
-0:199          'dvec3v' (temp 3-component vector of double)
-0:200      add second child into first child (temp 4-component vector of double)
-0:200        'dvec4v' (temp 4-component vector of double)
-0:200        min (global 4-component vector of double)
-0:200          'dvec4v' (temp 4-component vector of double)
-0:200          'dvec4v' (temp 4-component vector of double)
-0:202      add second child into first child (temp double)
-0:202        'doublev' (temp double)
-0:202        max (global double)
-0:202          'doublev' (temp double)
-0:202          'doublev' (temp double)
-0:203      add second child into first child (temp 2-component vector of double)
-0:203        'dvec2v' (temp 2-component vector of double)
-0:203        max (global 2-component vector of double)
-0:203          'dvec2v' (temp 2-component vector of double)
-0:203          'doublev' (temp double)
-0:204      add second child into first child (temp 3-component vector of double)
-0:204        'dvec3v' (temp 3-component vector of double)
-0:204        max (global 3-component vector of double)
-0:204          'dvec3v' (temp 3-component vector of double)
-0:204          'doublev' (temp double)
-0:205      add second child into first child (temp 4-component vector of double)
-0:205        'dvec4v' (temp 4-component vector of double)
-0:205        max (global 4-component vector of double)
-0:205          'dvec4v' (temp 4-component vector of double)
-0:205          'doublev' (temp double)
-0:206      add second child into first child (temp 2-component vector of double)
-0:206        'dvec2v' (temp 2-component vector of double)
-0:206        max (global 2-component vector of double)
-0:206          'dvec2v' (temp 2-component vector of double)
-0:206          'dvec2v' (temp 2-component vector of double)
-0:207      add second child into first child (temp 3-component vector of double)
-0:207        'dvec3v' (temp 3-component vector of double)
-0:207        max (global 3-component vector of double)
-0:207          'dvec3v' (temp 3-component vector of double)
-0:207          'dvec3v' (temp 3-component vector of double)
-0:208      add second child into first child (temp 4-component vector of double)
-0:208        'dvec4v' (temp 4-component vector of double)
-0:208        max (global 4-component vector of double)
-0:208          'dvec4v' (temp 4-component vector of double)
-0:208          'dvec4v' (temp 4-component vector of double)
-0:210      add second child into first child (temp double)
-0:210        'doublev' (temp double)
-0:210        clamp (global double)
-0:210          'doublev' (temp double)
-0:210          'doublev' (temp double)
-0:210          'doublev' (temp double)
-0:211      add second child into first child (temp 2-component vector of double)
-0:211        'dvec2v' (temp 2-component vector of double)
-0:211        clamp (global 2-component vector of double)
-0:211          'dvec2v' (temp 2-component vector of double)
-0:211          'doublev' (temp double)
-0:211          'doublev' (temp double)
-0:212      add second child into first child (temp 3-component vector of double)
-0:212        'dvec3v' (temp 3-component vector of double)
-0:212        clamp (global 3-component vector of double)
-0:212          'dvec3v' (temp 3-component vector of double)
-0:212          'doublev' (temp double)
-0:212          'doublev' (temp double)
-0:213      add second child into first child (temp 4-component vector of double)
-0:213        'dvec4v' (temp 4-component vector of double)
-0:213        clamp (global 4-component vector of double)
-0:213          'dvec4v' (temp 4-component vector of double)
-0:213          'doublev' (temp double)
-0:213          'doublev' (temp double)
-0:214      add second child into first child (temp 2-component vector of double)
-0:214        'dvec2v' (temp 2-component vector of double)
-0:214        clamp (global 2-component vector of double)
-0:214          'dvec2v' (temp 2-component vector of double)
-0:214          'dvec2v' (temp 2-component vector of double)
-0:214          'dvec2v' (temp 2-component vector of double)
-0:215      add second child into first child (temp 3-component vector of double)
-0:215        'dvec3v' (temp 3-component vector of double)
-0:215        clamp (global 3-component vector of double)
-0:215          'dvec3v' (temp 3-component vector of double)
-0:215          'dvec3v' (temp 3-component vector of double)
-0:215          'dvec3v' (temp 3-component vector of double)
-0:216      add second child into first child (temp 4-component vector of double)
-0:216        'dvec4v' (temp 4-component vector of double)
-0:216        clamp (global 4-component vector of double)
-0:216          'dvec4v' (temp 4-component vector of double)
-0:216          'dvec4v' (temp 4-component vector of double)
-0:216          'dvec4v' (temp 4-component vector of double)
-0:218      add second child into first child (temp double)
-0:218        'doublev' (temp double)
-0:218        mix (global double)
-0:218          'doublev' (temp double)
-0:218          'doublev' (temp double)
-0:218          'doublev' (temp double)
-0:219      add second child into first child (temp 2-component vector of double)
-0:219        'dvec2v' (temp 2-component vector of double)
-0:219        mix (global 2-component vector of double)
-0:219          'dvec2v' (temp 2-component vector of double)
-0:219          'dvec2v' (temp 2-component vector of double)
-0:219          'doublev' (temp double)
-0:220      add second child into first child (temp 3-component vector of double)
-0:220        'dvec3v' (temp 3-component vector of double)
-0:220        mix (global 3-component vector of double)
-0:220          'dvec3v' (temp 3-component vector of double)
-0:220          'dvec3v' (temp 3-component vector of double)
-0:220          'doublev' (temp double)
-0:221      add second child into first child (temp 4-component vector of double)
-0:221        'dvec4v' (temp 4-component vector of double)
-0:221        mix (global 4-component vector of double)
-0:221          'dvec4v' (temp 4-component vector of double)
-0:221          'dvec4v' (temp 4-component vector of double)
-0:221          'doublev' (temp double)
-0:222      add second child into first child (temp 2-component vector of double)
-0:222        'dvec2v' (temp 2-component vector of double)
-0:222        mix (global 2-component vector of double)
-0:222          'dvec2v' (temp 2-component vector of double)
-0:222          'dvec2v' (temp 2-component vector of double)
-0:222          'dvec2v' (temp 2-component vector of double)
-0:223      add second child into first child (temp 3-component vector of double)
-0:223        'dvec3v' (temp 3-component vector of double)
-0:223        mix (global 3-component vector of double)
-0:223          'dvec3v' (temp 3-component vector of double)
-0:223          'dvec3v' (temp 3-component vector of double)
-0:223          'dvec3v' (temp 3-component vector of double)
-0:224      add second child into first child (temp 4-component vector of double)
-0:224        'dvec4v' (temp 4-component vector of double)
-0:224        mix (global 4-component vector of double)
-0:224          'dvec4v' (temp 4-component vector of double)
-0:224          'dvec4v' (temp 4-component vector of double)
-0:224          'dvec4v' (temp 4-component vector of double)
-0:225      add second child into first child (temp double)
-0:225        'doublev' (temp double)
-0:225        mix (global double)
-0:225          'doublev' (temp double)
-0:225          'doublev' (temp double)
-0:225          'boolv' (temp bool)
-0:226      add second child into first child (temp 2-component vector of double)
-0:226        'dvec2v' (temp 2-component vector of double)
-0:226        mix (global 2-component vector of double)
-0:226          'dvec2v' (temp 2-component vector of double)
-0:226          'dvec2v' (temp 2-component vector of double)
-0:226          'bvec2v' (temp 2-component vector of bool)
-0:227      add second child into first child (temp 3-component vector of double)
-0:227        'dvec3v' (temp 3-component vector of double)
-0:227        mix (global 3-component vector of double)
-0:227          'dvec3v' (temp 3-component vector of double)
-0:227          'dvec3v' (temp 3-component vector of double)
-0:227          'bvec3v' (temp 3-component vector of bool)
-0:228      add second child into first child (temp 4-component vector of double)
-0:228        'dvec4v' (temp 4-component vector of double)
-0:228        mix (global 4-component vector of double)
-0:228          'dvec4v' (temp 4-component vector of double)
-0:228          'dvec4v' (temp 4-component vector of double)
-0:228          'bvec4v' (temp 4-component vector of bool)
-0:230      add second child into first child (temp double)
-0:230        'doublev' (temp double)
-0:230        step (global double)
-0:230          'doublev' (temp double)
-0:230          'doublev' (temp double)
-0:231      add second child into first child (temp 2-component vector of double)
-0:231        'dvec2v' (temp 2-component vector of double)
-0:231        step (global 2-component vector of double)
-0:231          'dvec2v' (temp 2-component vector of double)
-0:231          'dvec2v' (temp 2-component vector of double)
-0:232      add second child into first child (temp 3-component vector of double)
-0:232        'dvec3v' (temp 3-component vector of double)
-0:232        step (global 3-component vector of double)
-0:232          'dvec3v' (temp 3-component vector of double)
-0:232          'dvec3v' (temp 3-component vector of double)
-0:233      add second child into first child (temp 4-component vector of double)
-0:233        'dvec4v' (temp 4-component vector of double)
-0:233        step (global 4-component vector of double)
-0:233          'dvec4v' (temp 4-component vector of double)
-0:233          'dvec4v' (temp 4-component vector of double)
-0:234      add second child into first child (temp 2-component vector of double)
-0:234        'dvec2v' (temp 2-component vector of double)
-0:234        step (global 2-component vector of double)
-0:234          'doublev' (temp double)
-0:234          'dvec2v' (temp 2-component vector of double)
-0:235      add second child into first child (temp 3-component vector of double)
-0:235        'dvec3v' (temp 3-component vector of double)
-0:235        step (global 3-component vector of double)
-0:235          'doublev' (temp double)
-0:235          'dvec3v' (temp 3-component vector of double)
-0:236      add second child into first child (temp 4-component vector of double)
-0:236        'dvec4v' (temp 4-component vector of double)
-0:236        step (global 4-component vector of double)
-0:236          'doublev' (temp double)
-0:236          'dvec4v' (temp 4-component vector of double)
-0:238      add second child into first child (temp double)
-0:238        'doublev' (temp double)
-0:238        smoothstep (global double)
-0:238          'doublev' (temp double)
-0:238          'doublev' (temp double)
-0:238          'doublev' (temp double)
-0:239      add second child into first child (temp 2-component vector of double)
-0:239        'dvec2v' (temp 2-component vector of double)
-0:239        smoothstep (global 2-component vector of double)
-0:239          'dvec2v' (temp 2-component vector of double)
-0:239          'dvec2v' (temp 2-component vector of double)
-0:239          'dvec2v' (temp 2-component vector of double)
-0:240      add second child into first child (temp 3-component vector of double)
-0:240        'dvec3v' (temp 3-component vector of double)
-0:240        smoothstep (global 3-component vector of double)
-0:240          'dvec3v' (temp 3-component vector of double)
-0:240          'dvec3v' (temp 3-component vector of double)
-0:240          'dvec3v' (temp 3-component vector of double)
-0:241      add second child into first child (temp 4-component vector of double)
-0:241        'dvec4v' (temp 4-component vector of double)
-0:241        smoothstep (global 4-component vector of double)
-0:241          'dvec4v' (temp 4-component vector of double)
-0:241          'dvec4v' (temp 4-component vector of double)
-0:241          'dvec4v' (temp 4-component vector of double)
-0:242      add second child into first child (temp 2-component vector of double)
-0:242        'dvec2v' (temp 2-component vector of double)
-0:242        smoothstep (global 2-component vector of double)
-0:242          'doublev' (temp double)
-0:242          'doublev' (temp double)
-0:242          'dvec2v' (temp 2-component vector of double)
-0:243      add second child into first child (temp 3-component vector of double)
-0:243        'dvec3v' (temp 3-component vector of double)
-0:243        smoothstep (global 3-component vector of double)
-0:243          'doublev' (temp double)
-0:243          'doublev' (temp double)
-0:243          'dvec3v' (temp 3-component vector of double)
-0:244      add second child into first child (temp 4-component vector of double)
-0:244        'dvec4v' (temp 4-component vector of double)
-0:244        smoothstep (global 4-component vector of double)
-0:244          'doublev' (temp double)
-0:244          'doublev' (temp double)
-0:244          'dvec4v' (temp 4-component vector of double)
-0:246      move second child to first child (temp bool)
-0:246        'boolv' (temp bool)
-0:246        isnan (global bool)
-0:246          'doublev' (temp double)
-0:247      move second child to first child (temp 2-component vector of bool)
-0:247        'bvec2v' (temp 2-component vector of bool)
-0:247        isnan (global 2-component vector of bool)
-0:247          'dvec2v' (temp 2-component vector of double)
-0:248      move second child to first child (temp 3-component vector of bool)
-0:248        'bvec3v' (temp 3-component vector of bool)
-0:248        isnan (global 3-component vector of bool)
-0:248          'dvec3v' (temp 3-component vector of double)
-0:249      move second child to first child (temp 4-component vector of bool)
-0:249        'bvec4v' (temp 4-component vector of bool)
-0:249        isnan (global 4-component vector of bool)
-0:249          'dvec4v' (temp 4-component vector of double)
-0:251      move second child to first child (temp bool)
-0:251        'boolv' (temp bool)
-0:251        Test condition and select (temp bool)
-0:251          Condition
-0:251          'boolv' (temp bool)
-0:251          true case
-0:251          isinf (global bool)
-0:251            'doublev' (temp double)
-0:251          false case
-0:251          Constant:
-0:251            false (const bool)
-0:252      move second child to first child (temp 2-component vector of bool)
-0:252        'bvec2v' (temp 2-component vector of bool)
-0:252        Test condition and select (temp 2-component vector of bool)
-0:252          Condition
-0:252          'boolv' (temp bool)
-0:252          true case
-0:252          isinf (global 2-component vector of bool)
-0:252            'dvec2v' (temp 2-component vector of double)
-0:252          false case
-0:252          Constant:
-0:252            false (const bool)
-0:252            false (const bool)
-0:253      move second child to first child (temp 3-component vector of bool)
-0:253        'bvec3v' (temp 3-component vector of bool)
-0:253        Test condition and select (temp 3-component vector of bool)
-0:253          Condition
-0:253          'boolv' (temp bool)
-0:253          true case
-0:253          isinf (global 3-component vector of bool)
-0:253            'dvec3v' (temp 3-component vector of double)
-0:253          false case
-0:253          Constant:
-0:253            false (const bool)
-0:253            false (const bool)
-0:253            false (const bool)
-0:254      move second child to first child (temp 4-component vector of bool)
-0:254        'bvec4v' (temp 4-component vector of bool)
-0:254        Test condition and select (temp 4-component vector of bool)
-0:254          Condition
-0:254          'boolv' (temp bool)
-0:254          true case
-0:254          isinf (global 4-component vector of bool)
-0:254            'dvec4v' (temp 4-component vector of double)
-0:254          false case
-0:254          Constant:
-0:254            false (const bool)
-0:254            false (const bool)
-0:254            false (const bool)
-0:254            false (const bool)
-0:256      add second child into first child (temp double)
-0:256        'doublev' (temp double)
-0:256        length (global double)
-0:256          'doublev' (temp double)
-0:257      add second child into first child (temp double)
-0:257        'doublev' (temp double)
-0:257        length (global double)
-0:257          'dvec2v' (temp 2-component vector of double)
-0:258      add second child into first child (temp double)
-0:258        'doublev' (temp double)
-0:258        length (global double)
-0:258          'dvec3v' (temp 3-component vector of double)
-0:259      add second child into first child (temp double)
-0:259        'doublev' (temp double)
-0:259        length (global double)
-0:259          'dvec4v' (temp 4-component vector of double)
-0:261      add second child into first child (temp double)
-0:261        'doublev' (temp double)
-0:261        distance (global double)
-0:261          'doublev' (temp double)
-0:261          'doublev' (temp double)
-0:262      add second child into first child (temp double)
-0:262        'doublev' (temp double)
-0:262        distance (global double)
-0:262          'dvec2v' (temp 2-component vector of double)
-0:262          'dvec2v' (temp 2-component vector of double)
-0:263      add second child into first child (temp double)
-0:263        'doublev' (temp double)
-0:263        distance (global double)
-0:263          'dvec3v' (temp 3-component vector of double)
-0:263          'dvec3v' (temp 3-component vector of double)
-0:264      add second child into first child (temp double)
-0:264        'doublev' (temp double)
-0:264        distance (global double)
-0:264          'dvec4v' (temp 4-component vector of double)
-0:264          'dvec4v' (temp 4-component vector of double)
-0:266      add second child into first child (temp double)
-0:266        'doublev' (temp double)
-0:266        dot-product (global double)
-0:266          'doublev' (temp double)
-0:266          'doublev' (temp double)
-0:267      add second child into first child (temp double)
-0:267        'doublev' (temp double)
-0:267        dot-product (global double)
-0:267          'dvec2v' (temp 2-component vector of double)
-0:267          'dvec2v' (temp 2-component vector of double)
-0:268      add second child into first child (temp double)
-0:268        'doublev' (temp double)
-0:268        dot-product (global double)
-0:268          'dvec3v' (temp 3-component vector of double)
-0:268          'dvec3v' (temp 3-component vector of double)
-0:269      add second child into first child (temp double)
-0:269        'doublev' (temp double)
-0:269        dot-product (global double)
-0:269          'dvec4v' (temp 4-component vector of double)
-0:269          'dvec4v' (temp 4-component vector of double)
-0:271      add second child into first child (temp 3-component vector of double)
-0:271        'dvec3v' (temp 3-component vector of double)
-0:271        cross-product (global 3-component vector of double)
-0:271          'dvec3v' (temp 3-component vector of double)
-0:271          'dvec3v' (temp 3-component vector of double)
-0:273      add second child into first child (temp double)
-0:273        'doublev' (temp double)
-0:273        normalize (global double)
-0:273          'doublev' (temp double)
-0:274      add second child into first child (temp 2-component vector of double)
-0:274        'dvec2v' (temp 2-component vector of double)
-0:274        normalize (global 2-component vector of double)
-0:274          'dvec2v' (temp 2-component vector of double)
-0:275      add second child into first child (temp 3-component vector of double)
-0:275        'dvec3v' (temp 3-component vector of double)
-0:275        normalize (global 3-component vector of double)
-0:275          'dvec3v' (temp 3-component vector of double)
-0:276      add second child into first child (temp 4-component vector of double)
-0:276        'dvec4v' (temp 4-component vector of double)
-0:276        normalize (global 4-component vector of double)
-0:276          'dvec4v' (temp 4-component vector of double)
-0:278      add second child into first child (temp double)
-0:278        'doublev' (temp double)
-0:278        face-forward (global double)
-0:278          'doublev' (temp double)
-0:278          'doublev' (temp double)
-0:278          'doublev' (temp double)
-0:279      add second child into first child (temp 2-component vector of double)
-0:279        'dvec2v' (temp 2-component vector of double)
-0:279        face-forward (global 2-component vector of double)
-0:279          'dvec2v' (temp 2-component vector of double)
-0:279          'dvec2v' (temp 2-component vector of double)
-0:279          'dvec2v' (temp 2-component vector of double)
-0:280      add second child into first child (temp 3-component vector of double)
-0:280        'dvec3v' (temp 3-component vector of double)
-0:280        face-forward (global 3-component vector of double)
-0:280          'dvec3v' (temp 3-component vector of double)
-0:280          'dvec3v' (temp 3-component vector of double)
-0:280          'dvec3v' (temp 3-component vector of double)
-0:281      add second child into first child (temp 4-component vector of double)
-0:281        'dvec4v' (temp 4-component vector of double)
-0:281        face-forward (global 4-component vector of double)
-0:281          'dvec4v' (temp 4-component vector of double)
-0:281          'dvec4v' (temp 4-component vector of double)
-0:281          'dvec4v' (temp 4-component vector of double)
-0:283      add second child into first child (temp double)
-0:283        'doublev' (temp double)
-0:283        reflect (global double)
-0:283          'doublev' (temp double)
-0:283          'doublev' (temp double)
-0:284      add second child into first child (temp 2-component vector of double)
-0:284        'dvec2v' (temp 2-component vector of double)
-0:284        reflect (global 2-component vector of double)
-0:284          'dvec2v' (temp 2-component vector of double)
-0:284          'dvec2v' (temp 2-component vector of double)
-0:285      add second child into first child (temp 3-component vector of double)
-0:285        'dvec3v' (temp 3-component vector of double)
-0:285        reflect (global 3-component vector of double)
-0:285          'dvec3v' (temp 3-component vector of double)
-0:285          'dvec3v' (temp 3-component vector of double)
-0:286      add second child into first child (temp 4-component vector of double)
-0:286        'dvec4v' (temp 4-component vector of double)
-0:286        reflect (global 4-component vector of double)
-0:286          'dvec4v' (temp 4-component vector of double)
-0:286          'dvec4v' (temp 4-component vector of double)
-0:288      add second child into first child (temp double)
-0:288        'doublev' (temp double)
-0:288        refract (global double)
-0:288          'doublev' (temp double)
-0:288          'doublev' (temp double)
-0:288          'doublev' (temp double)
-0:289      add second child into first child (temp 2-component vector of double)
-0:289        'dvec2v' (temp 2-component vector of double)
-0:289        refract (global 2-component vector of double)
-0:289          'dvec2v' (temp 2-component vector of double)
-0:289          'dvec2v' (temp 2-component vector of double)
-0:289          'doublev' (temp double)
-0:290      add second child into first child (temp 3-component vector of double)
-0:290        'dvec3v' (temp 3-component vector of double)
-0:290        refract (global 3-component vector of double)
-0:290          'dvec3v' (temp 3-component vector of double)
-0:290          'dvec3v' (temp 3-component vector of double)
-0:290          'doublev' (temp double)
-0:291      add second child into first child (temp 4-component vector of double)
-0:291        'dvec4v' (temp 4-component vector of double)
-0:291        refract (global 4-component vector of double)
-0:291          'dvec4v' (temp 4-component vector of double)
-0:291          'dvec4v' (temp 4-component vector of double)
-0:291          'doublev' (temp double)
-0:293      Sequence
-0:293        move second child to first child (temp 2X2 matrix of double)
-0:293          'dmat2v' (temp 2X2 matrix of double)
-0:293          outer product (global 2X2 matrix of double)
-0:293            'dvec2v' (temp 2-component vector of double)
-0:293            'dvec2v' (temp 2-component vector of double)
-0:294      Sequence
-0:294        move second child to first child (temp 3X3 matrix of double)
-0:294          'dmat3v' (temp 3X3 matrix of double)
-0:294          outer product (global 3X3 matrix of double)
-0:294            'dvec3v' (temp 3-component vector of double)
-0:294            'dvec3v' (temp 3-component vector of double)
-0:295      Sequence
-0:295        move second child to first child (temp 4X4 matrix of double)
-0:295          'dmat4v' (temp 4X4 matrix of double)
-0:295          outer product (global 4X4 matrix of double)
-0:295            'dvec4v' (temp 4-component vector of double)
-0:295            'dvec4v' (temp 4-component vector of double)
-0:296      Sequence
-0:296        move second child to first child (temp 2X3 matrix of double)
-0:296          'dmat2x3v' (temp 2X3 matrix of double)
-0:296          outer product (global 2X3 matrix of double)
-0:296            'dvec3v' (temp 3-component vector of double)
-0:296            'dvec2v' (temp 2-component vector of double)
-0:297      Sequence
-0:297        move second child to first child (temp 3X2 matrix of double)
-0:297          'dmat3x2v' (temp 3X2 matrix of double)
-0:297          outer product (global 3X2 matrix of double)
-0:297            'dvec2v' (temp 2-component vector of double)
-0:297            'dvec3v' (temp 3-component vector of double)
-0:298      Sequence
-0:298        move second child to first child (temp 2X4 matrix of double)
-0:298          'dmat2x4v' (temp 2X4 matrix of double)
-0:298          outer product (global 2X4 matrix of double)
-0:298            'dvec4v' (temp 4-component vector of double)
-0:298            'dvec2v' (temp 2-component vector of double)
-0:299      Sequence
-0:299        move second child to first child (temp 4X2 matrix of double)
-0:299          'dmat4x2v' (temp 4X2 matrix of double)
-0:299          outer product (global 4X2 matrix of double)
-0:299            'dvec2v' (temp 2-component vector of double)
-0:299            'dvec4v' (temp 4-component vector of double)
-0:300      Sequence
-0:300        move second child to first child (temp 3X4 matrix of double)
-0:300          'dmat3x4v' (temp 3X4 matrix of double)
-0:300          outer product (global 3X4 matrix of double)
-0:300            'dvec4v' (temp 4-component vector of double)
-0:300            'dvec3v' (temp 3-component vector of double)
-0:301      Sequence
-0:301        move second child to first child (temp 4X3 matrix of double)
-0:301          'dmat4x3v' (temp 4X3 matrix of double)
-0:301          outer product (global 4X3 matrix of double)
-0:301            'dvec3v' (temp 3-component vector of double)
-0:301            'dvec4v' (temp 4-component vector of double)
-0:303      matrix mult second child into first child (temp 2X2 matrix of double)
-0:303        'dmat2v' (temp 2X2 matrix of double)
-0:303        component-wise multiply (global 2X2 matrix of double)
-0:303          'dmat2v' (temp 2X2 matrix of double)
-0:303          'dmat2v' (temp 2X2 matrix of double)
-0:304      matrix mult second child into first child (temp 3X3 matrix of double)
-0:304        'dmat3v' (temp 3X3 matrix of double)
-0:304        component-wise multiply (global 3X3 matrix of double)
-0:304          'dmat3v' (temp 3X3 matrix of double)
-0:304          'dmat3v' (temp 3X3 matrix of double)
-0:305      matrix mult second child into first child (temp 4X4 matrix of double)
-0:305        'dmat4v' (temp 4X4 matrix of double)
-0:305        component-wise multiply (global 4X4 matrix of double)
-0:305          'dmat4v' (temp 4X4 matrix of double)
-0:305          'dmat4v' (temp 4X4 matrix of double)
-0:306      move second child to first child (temp 2X3 matrix of double)
-0:306        'dmat2x3v' (temp 2X3 matrix of double)
-0:306        component-wise multiply (global 2X3 matrix of double)
-0:306          'dmat2x3v' (temp 2X3 matrix of double)
-0:306          'dmat2x3v' (temp 2X3 matrix of double)
-0:307      move second child to first child (temp 2X4 matrix of double)
-0:307        'dmat2x4v' (temp 2X4 matrix of double)
-0:307        component-wise multiply (global 2X4 matrix of double)
-0:307          'dmat2x4v' (temp 2X4 matrix of double)
-0:307          'dmat2x4v' (temp 2X4 matrix of double)
-0:308      move second child to first child (temp 3X2 matrix of double)
-0:308        'dmat3x2v' (temp 3X2 matrix of double)
-0:308        component-wise multiply (global 3X2 matrix of double)
-0:308          'dmat3x2v' (temp 3X2 matrix of double)
-0:308          'dmat3x2v' (temp 3X2 matrix of double)
-0:309      move second child to first child (temp 3X4 matrix of double)
-0:309        'dmat3x4v' (temp 3X4 matrix of double)
-0:309        component-wise multiply (global 3X4 matrix of double)
-0:309          'dmat3x4v' (temp 3X4 matrix of double)
-0:309          'dmat3x4v' (temp 3X4 matrix of double)
-0:310      move second child to first child (temp 4X2 matrix of double)
-0:310        'dmat4x2v' (temp 4X2 matrix of double)
-0:310        component-wise multiply (global 4X2 matrix of double)
-0:310          'dmat4x2v' (temp 4X2 matrix of double)
-0:310          'dmat4x2v' (temp 4X2 matrix of double)
-0:311      move second child to first child (temp 4X3 matrix of double)
-0:311        'dmat4x3v' (temp 4X3 matrix of double)
-0:311        component-wise multiply (global 4X3 matrix of double)
-0:311          'dmat4x3v' (temp 4X3 matrix of double)
-0:311          'dmat4x3v' (temp 4X3 matrix of double)
-0:313      matrix mult second child into first child (temp 2X2 matrix of double)
-0:313        'dmat2v' (temp 2X2 matrix of double)
-0:313        transpose (global 2X2 matrix of double)
-0:313          'dmat2v' (temp 2X2 matrix of double)
-0:314      matrix mult second child into first child (temp 3X3 matrix of double)
-0:314        'dmat3v' (temp 3X3 matrix of double)
-0:314        transpose (global 3X3 matrix of double)
-0:314          'dmat3v' (temp 3X3 matrix of double)
-0:315      matrix mult second child into first child (temp 4X4 matrix of double)
-0:315        'dmat4v' (temp 4X4 matrix of double)
-0:315        transpose (global 4X4 matrix of double)
-0:315          'dmat4v' (temp 4X4 matrix of double)
-0:316      move second child to first child (temp 2X3 matrix of double)
-0:316        'dmat2x3v' (temp 2X3 matrix of double)
-0:316        transpose (global 2X3 matrix of double)
-0:316          'dmat3x2v' (temp 3X2 matrix of double)
-0:317      move second child to first child (temp 3X2 matrix of double)
-0:317        'dmat3x2v' (temp 3X2 matrix of double)
-0:317        transpose (global 3X2 matrix of double)
-0:317          'dmat2x3v' (temp 2X3 matrix of double)
-0:318      move second child to first child (temp 2X4 matrix of double)
-0:318        'dmat2x4v' (temp 2X4 matrix of double)
-0:318        transpose (global 2X4 matrix of double)
-0:318          'dmat4x2v' (temp 4X2 matrix of double)
-0:319      move second child to first child (temp 4X2 matrix of double)
-0:319        'dmat4x2v' (temp 4X2 matrix of double)
-0:319        transpose (global 4X2 matrix of double)
-0:319          'dmat2x4v' (temp 2X4 matrix of double)
-0:320      move second child to first child (temp 3X4 matrix of double)
-0:320        'dmat3x4v' (temp 3X4 matrix of double)
-0:320        transpose (global 3X4 matrix of double)
-0:320          'dmat4x3v' (temp 4X3 matrix of double)
-0:321      move second child to first child (temp 4X3 matrix of double)
-0:321        'dmat4x3v' (temp 4X3 matrix of double)
-0:321        transpose (global 4X3 matrix of double)
-0:321          'dmat3x4v' (temp 3X4 matrix of double)
-0:323      add second child into first child (temp double)
-0:323        'doublev' (temp double)
-0:323        determinant (global double)
-0:323          'dmat2v' (temp 2X2 matrix of double)
-0:324      add second child into first child (temp double)
-0:324        'doublev' (temp double)
-0:324        determinant (global double)
-0:324          'dmat3v' (temp 3X3 matrix of double)
-0:325      add second child into first child (temp double)
-0:325        'doublev' (temp double)
-0:325        determinant (global double)
-0:325          'dmat4v' (temp 4X4 matrix of double)
-0:327      matrix mult second child into first child (temp 2X2 matrix of double)
-0:327        'dmat2v' (temp 2X2 matrix of double)
-0:327        inverse (global 2X2 matrix of double)
-0:327          'dmat2v' (temp 2X2 matrix of double)
-0:328      matrix mult second child into first child (temp 3X3 matrix of double)
-0:328        'dmat3v' (temp 3X3 matrix of double)
-0:328        inverse (global 3X3 matrix of double)
-0:328          'dmat3v' (temp 3X3 matrix of double)
-0:329      matrix mult second child into first child (temp 4X4 matrix of double)
-0:329        'dmat4v' (temp 4X4 matrix of double)
-0:329        inverse (global 4X4 matrix of double)
-0:329          'dmat4v' (temp 4X4 matrix of double)
 0:?   Linker Objects
 0:?     'bn' (in 3-element array of block{in int a})
 0:?     'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize})
diff --git a/Test/baseResults/400.tesc.out b/Test/baseResults/400.tesc.out
index 58a8a32..f3e7b8b 100644
--- a/Test/baseResults/400.tesc.out
+++ b/Test/baseResults/400.tesc.out
@@ -364,35 +364,6 @@
 0:56        Barrier (global void)
 0:59      Branch: Return
 0:61      Barrier (global void)
-0:67  Function Definition: foo( (global void)
-0:67    Function Parameters: 
-0:69    Sequence
-0:69      gl_PointSize: direct index for structure (out float PointSize)
-0:69        direct index (temp block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
-0:69          'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
-0:69          Constant:
-0:69            4 (const int)
-0:69        Constant:
-0:69          1 (const int)
-0:71      Barrier (global void)
-0:91  Function Definition: foop( (global void)
-0:91    Function Parameters: 
-0:?     Sequence
-0:95      multiply second child into first child (temp 3-component vector of float)
-0:95        'pv3' (noContraction temp 3-component vector of float)
-0:95        'pv3' (noContraction temp 3-component vector of float)
-0:96      move second child to first child (temp 3-component vector of float)
-0:96        'pv3' (noContraction temp 3-component vector of float)
-0:96        fma (global 3-component vector of float)
-0:96          'pv3' (noContraction temp 3-component vector of float)
-0:96          'pv3' (noContraction temp 3-component vector of float)
-0:96          'pv3' (noContraction temp 3-component vector of float)
-0:97      move second child to first child (temp double)
-0:97        'd' (noContraction temp double)
-0:97        fma (global double)
-0:97          'd' (noContraction temp double)
-0:97          'd' (noContraction temp double)
-0:97          'd' (noContraction temp double)
 0:?   Linker Objects
 0:?     'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
 0:?     'outa' (global 4-element array of int)
diff --git a/Test/baseResults/400.vert.out b/Test/baseResults/400.vert.out
index 2b0d63d..bf07887 100755
--- a/Test/baseResults/400.vert.out
+++ b/Test/baseResults/400.vert.out
@@ -340,11 +340,6 @@
 0:20      '' (in uint)
 0:20      '' (in float)
 0:20      '' (in double)
-0:21  Function Definition: ftd(f1;d1;d1; (global void)
-0:21    Function Parameters: 
-0:21      '' (in float)
-0:21      '' (in double)
-0:21      '' (in double)
 0:23  Function Definition: main( (global void)
 0:23    Function Parameters: 
 0:?     Sequence
@@ -552,19 +547,6 @@
 0:91        'f' (temp float)
 0:91        Convert float to double (temp double)
 0:91          'f' (temp float)
-0:97  Function Definition: tf( (global void)
-0:97    Function Parameters: 
-0:?     Sequence
-0:104      Function Call: itf(i1;f1;i1; (global void)
-0:104        'i' (temp int)
-0:104        Convert int to float (temp float)
-0:104          'i' (temp int)
-0:104        'i' (temp int)
-0:105      Function Call: itf(i1;f1;i1; (global void)
-0:105        'i' (temp int)
-0:105        Convert uint to float (temp float)
-0:105          'u' (temp uint)
-0:105        'i' (temp int)
 0:?   Linker Objects
 0:?     'd' (in double)
 0:?     'd3' (in 3-component vector of double)
diff --git a/Test/baseResults/410.geom.out b/Test/baseResults/410.geom.out
index 6f7252c..aa421db 100644
--- a/Test/baseResults/410.geom.out
+++ b/Test/baseResults/410.geom.out
@@ -77,35 +77,6 @@
 0:5        'gl_ViewportIndex' (layout(stream=0 ) out int ViewportIndex)
 0:5        Constant:
 0:5          7 (const int)
-0:28  Function Definition: foo( (global void)
-0:28    Function Parameters: 
-0:30    Sequence
-0:30      Sequence
-0:30        move second child to first child (temp float)
-0:30          'p' (temp float)
-0:30          gl_PointSize: direct index for structure (in float PointSize)
-0:30            direct index (temp block{in float PointSize gl_PointSize})
-0:30              'gl_in' (in 2-element array of block{in float PointSize gl_PointSize})
-0:30              Constant:
-0:30                1 (const int)
-0:30            Constant:
-0:30              0 (const int)
-0:31      move second child to first child (temp float)
-0:31        gl_PointSize: direct index for structure (layout(stream=0 ) gl_PointSize float PointSize)
-0:31          'anon@0' (layout(stream=0 ) out block{layout(stream=0 ) gl_PointSize float PointSize gl_PointSize, })
-0:31          Constant:
-0:31            1 (const uint)
-0:31        'p' (temp float)
-0:33      gl_Position: direct index for structure (layout(stream=0 ) gl_Position void Position)
-0:33        'anon@0' (layout(stream=0 ) out block{layout(stream=0 ) gl_PointSize float PointSize gl_PointSize, })
-0:33        Constant:
-0:33          0 (const uint)
-0:36  Function Definition: foo5( (global float)
-0:36    Function Parameters: 
-0:38    Sequence
-0:38      Branch: Return with expression
-0:38        Constant:
-0:38          4.000000
 0:?   Linker Objects
 0:?     'gl_in' (in 2-element array of block{in float PointSize gl_PointSize})
 0:?     'anon@0' (layout(stream=0 ) out block{layout(stream=0 ) gl_PointSize float PointSize gl_PointSize, })
diff --git a/Test/baseResults/420.frag.out b/Test/baseResults/420.frag.out
index 784cdb4..3b4c9be 100644
--- a/Test/baseResults/420.frag.out
+++ b/Test/baseResults/420.frag.out
@@ -19,7 +19,6 @@
 0:8          0.300000
 0:?   Linker Objects
 0:?     'gl_FragDepth' (gl_FragDepth float FragDepth)
-0:?     'gl_FragDepth' (gl_FragDepth float FragDepth)
 0:?     'depth' (smooth in float)
 0:?     'a' (layout(binding=0 offset=0 ) uniform implicitly-sized array of atomic_uint)
 
@@ -39,7 +38,6 @@
 0:8          0.300000
 0:?   Linker Objects
 0:?     'gl_FragDepth' (gl_FragDepth float FragDepth)
-0:?     'gl_FragDepth' (gl_FragDepth float FragDepth)
 0:?     'depth' (smooth in float)
 0:?     'a' (layout(binding=0 offset=0 ) uniform 1-element array of atomic_uint)
 
diff --git a/Test/baseResults/420.geom.out b/Test/baseResults/420.geom.out
index 625feea..ca459a6 100644
--- a/Test/baseResults/420.geom.out
+++ b/Test/baseResults/420.geom.out
@@ -142,111 +142,6 @@
 input primitive = triangles
 output primitive = none
 ERROR: node is still EOpNull!
-0:7  Function Definition: foo( (global void)
-0:7    Function Parameters: 
-0:9    Sequence
-0:9      Constant:
-0:9        1 (const int)
-0:10      gl_Position: direct index for structure (in 4-component vector of float Position)
-0:10        direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 1-element array of float ClipDistance gl_ClipDistance})
-0:10          'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 1-element array of float ClipDistance gl_ClipDistance})
-0:10          Constant:
-0:10            1 (const int)
-0:10        Constant:
-0:10          0 (const int)
-0:11      gl_Position: direct index for structure (in 4-component vector of float Position)
-0:11        indirect index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 1-element array of float ClipDistance gl_ClipDistance})
-0:11          'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 1-element array of float ClipDistance gl_ClipDistance})
-0:11          'i' (global int)
-0:11        Constant:
-0:11          0 (const int)
-0:18  Function Definition: foo3( (global void)
-0:18    Function Parameters: 
-0:20    Sequence
-0:20      Constant:
-0:20        3 (const int)
-0:21      gl_Position: direct index for structure (in 4-component vector of float Position)
-0:21        indirect index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 1-element array of float ClipDistance gl_ClipDistance})
-0:21          'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 1-element array of float ClipDistance gl_ClipDistance})
-0:21          'i' (global int)
-0:21        Constant:
-0:21          0 (const int)
-0:22      Constant:
-0:22        3 (const int)
-0:29  Function Definition: foo4( (global void)
-0:29    Function Parameters: 
-0:?     Sequence
-0:40      Sequence
-0:40        move second child to first child (temp 4-component vector of float)
-0:40          'v' (temp 4-component vector of float)
-0:40          textureGatherOffset (global 4-component vector of float)
-0:40            's2D' (uniform sampler2D)
-0:40            direct index (temp 2-component vector of float)
-0:40              'coord' (in 3-element array of 2-component vector of float)
-0:40              Constant:
-0:40                0 (const int)
-0:40            vector swizzle (temp 2-component vector of int)
-0:40              indirect index (temp 2-component vector of int)
-0:40                Constant:
-0:40                  0 (const int)
-0:40                  1 (const int)
-0:40                  1 (const int)
-0:40                  -2 (const int)
-0:40                  0 (const int)
-0:40                  3 (const int)
-0:40                  -3 (const int)
-0:40                  0 (const int)
-0:40                  2 (const int)
-0:40                  1 (const int)
-0:40                'i' (global int)
-0:40              Sequence
-0:40                Constant:
-0:40                  0 (const int)
-0:40                Constant:
-0:40                  1 (const int)
-0:42      move second child to first child (temp 2-component vector of int)
-0:42        vector swizzle (temp 2-component vector of int)
-0:42          indirect index (temp 2-component vector of int)
-0:42            Constant:
-0:42              0 (const int)
-0:42              1 (const int)
-0:42              1 (const int)
-0:42              -2 (const int)
-0:42              0 (const int)
-0:42              3 (const int)
-0:42              -3 (const int)
-0:42              0 (const int)
-0:42              2 (const int)
-0:42              1 (const int)
-0:42            'i' (global int)
-0:42          Sequence
-0:42            Constant:
-0:42              0 (const int)
-0:42            Constant:
-0:42              1 (const int)
-0:42        Constant:
-0:42          3 (const int)
-0:42          3 (const int)
-0:43      move second child to first child (temp float)
-0:43        direct index (temp float)
-0:43          'v4' (uniform 4-component vector of float)
-0:43          Constant:
-0:43            0 (const int)
-0:43        Constant:
-0:43          3.200000
-0:44      vector swizzle (temp 2-component vector of float)
-0:44        'v4' (uniform 4-component vector of float)
-0:44        Sequence
-0:44          Constant:
-0:44            0 (const int)
-0:44          Constant:
-0:44            1 (const int)
-0:52  Function Definition: foo5( (global float)
-0:52    Function Parameters: 
-0:54    Sequence
-0:54      Branch: Return with expression
-0:54        Convert int to float (temp float)
-0:54          'i' (global int)
 0:?   Linker Objects
 0:?     'i' (global int)
 0:?     'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 1-element array of float ClipDistance gl_ClipDistance})
diff --git a/Test/baseResults/420.tesc.out b/Test/baseResults/420.tesc.out
index 594e130..30839ec 100644
--- a/Test/baseResults/420.tesc.out
+++ b/Test/baseResults/420.tesc.out
@@ -184,41 +184,6 @@
 0:26      indirect index (temp block{out 4-component vector of float Position gl_Position})
 0:26        'gl_out' (out 3-element array of block{out 4-component vector of float Position gl_Position})
 0:26        'gl_InvocationID' (in int InvocationID)
-0:34  Function Definition: foo( (global void)
-0:34    Function Parameters: 
-0:36    Sequence
-0:36      Test condition and select (temp void)
-0:36        Condition
-0:36        logical-or (temp bool)
-0:36          Compare Not Equal (temp bool)
-0:36            Constant:
-0:36              -0.625000
-0:36              -0.500000
-0:36              -0.375000
-0:36              -0.250000
-0:36              -0.375000
-0:36              -0.250000
-0:36              -0.125000
-0:36              0.000000
-0:36            direct index (layout(location=0 ) temp 2X4 matrix of double)
-0:36              'vs_tcs_first' (layout(location=0 ) in 32-element array of 2X4 matrix of double)
-0:36              Constant:
-0:36                0 (const int)
-0:37          Compare Not Equal (temp bool)
-0:37            Constant:
-0:37              0.375000
-0:37              0.500000
-0:37              0.625000
-0:37              0.750000
-0:37              0.625000
-0:37              0.750000
-0:37              0.875000
-0:37              -0.625000
-0:37            direct index (layout(location=12 ) temp 2X4 matrix of double)
-0:37              'vs_tcs_last' (layout(location=12 ) in 32-element array of 2X4 matrix of double)
-0:37              Constant:
-0:37                0 (const int)
-0:36        true case is null
 0:?   Linker Objects
 0:?     'gl_out' (out 3-element array of block{out 4-component vector of float Position gl_Position})
 0:?     'a' (out 3-element array of int)
diff --git a/Test/baseResults/420.vert.out b/Test/baseResults/420.vert.out
index 5636e7a..a70b44e 100644
--- a/Test/baseResults/420.vert.out
+++ b/Test/baseResults/420.vert.out
@@ -310,19 +310,6 @@
 
 Shader version: 420
 ERROR: node is still EOpNull!
-0:20  Function Definition: foo( (const int)
-0:20    Function Parameters: 
-0:?     Sequence
-0:23      Sequence
-0:23        move second child to first child (temp int)
-0:23          'b' (const (read only) int)
-0:23          'anonconst' (global int)
-0:25      Sequence
-0:25        move second child to first child (temp int)
-0:25          'd' (const (read only) int)
-0:25          'b' (const (read only) int)
-0:29      Branch: Return with expression
-0:29        'b' (const (read only) int)
 0:32  Function Definition: main( (global void)
 0:32    Function Parameters: 
 0:?     Sequence
@@ -342,164 +329,6 @@
 0:42        Constant:
 0:42          true (const bool)
 0:42        No loop body
-0:50  Function Definition: bar(vf4; (global void)
-0:50    Function Parameters: 
-0:50      'v' (volatile in 4-component vector of float)
-0:?     Sequence
-0:53      's' (temp int)
-0:54      's' (temp int)
-0:55      Test condition and select (temp void)
-0:55        Condition
-0:55        Compare Equal (temp bool)
-0:55          direct index (temp float)
-0:55            direct index (temp 4-component vector of float)
-0:55              'bad' (in 10-element array of 4-component vector of float)
-0:55              Constant:
-0:55                0 (const int)
-0:55            Constant:
-0:55              0 (const int)
-0:55          Constant:
-0:55            4.200000
-0:55        true case is null
-0:57      Test condition and select (temp void)
-0:57        Condition
-0:57        Constant:
-0:57          true (const bool)
-0:57        true case
-0:58        move second child to first child (temp 4-component vector of float)
-0:58          'badorder3' (flat out 4-component vector of float)
-0:58          direct index (temp 4-component vector of float)
-0:58            'bad' (in 10-element array of 4-component vector of float)
-0:58            Constant:
-0:58              0 (const int)
-0:61      Sequence
-0:61        move second child to first child (temp 3-component vector of float)
-0:61          'smeared' (temp 3-component vector of float)
-0:61          Construct vec3 (temp 3-component vector of float)
-0:61            'f' (temp float)
-0:62      'f' (temp float)
-0:63      'f' (temp float)
-0:88  Function Definition: bar23444( (global void)
-0:88    Function Parameters: 
-0:?     Sequence
-0:91      Sequence
-0:91        move second child to first child (temp float)
-0:91          'a1' (temp float)
-0:91          direct index (temp float)
-0:91            direct index (temp 3-component vector of float)
-0:91              'm43' (temp 4X3 matrix of float)
-0:91              Constant:
-0:91                3 (const int)
-0:91            Constant:
-0:91              1 (const int)
-0:93      Sequence
-0:93        move second child to first child (temp int)
-0:93          'a2' (temp int)
-0:93          Constant:
-0:93            4 (const int)
-0:94      add second child into first child (temp int)
-0:94        'a2' (temp int)
-0:94        Constant:
-0:94          3 (const int)
-0:95      add second child into first child (temp int)
-0:95        'a2' (temp int)
-0:95        Constant:
-0:95          3 (const int)
-0:96      Sequence
-0:96        move second child to first child (temp float)
-0:96          'b' (const (read only) float)
-0:96          component-wise multiply (temp float)
-0:96            Constant:
-0:96              2.000000
-0:96            'a1' (temp float)
-0:97      Sequence
-0:97        move second child to first child (temp int)
-0:97          'a' (temp int)
-0:97          Constant:
-0:97            -1 (const int)
-0:109  Function Definition: qux( (global void)
-0:109    Function Parameters: 
-0:111    Sequence
-0:111      Sequence
-0:111        move second child to first child (temp int)
-0:111          'i' (temp int)
-0:111          aoeu: direct index for structure (layout(column_major shared ) uniform int)
-0:111            'anon@0' (layout(binding=7 column_major shared ) uniform block{layout(column_major shared ) uniform int aoeu})
-0:111            Constant:
-0:111              0 (const uint)
-0:112      imageAtomicCompSwap (global int)
-0:112        'iimg2D' (layout(r32i ) uniform iimage2D)
-0:112        Construct ivec2 (temp 2-component vector of int)
-0:112          'i' (temp int)
-0:112          'i' (temp int)
-0:112        'i' (temp int)
-0:112        'i' (temp int)
-0:113      imageAtomicAdd (global uint)
-0:113        'uimg2D' (layout(r32ui ) uniform uimage2D)
-0:113        Construct ivec2 (temp 2-component vector of int)
-0:113          'i' (temp int)
-0:113          'i' (temp int)
-0:113        Convert int to uint (temp uint)
-0:113          'i' (temp int)
-0:114      imageAtomicMin (global int)
-0:114        'iimg2Drgba' (layout(rgba32i ) uniform iimage2D)
-0:114        Construct ivec2 (temp 2-component vector of int)
-0:114          'i' (temp int)
-0:114          'i' (temp int)
-0:114        'i' (temp int)
-0:115      Constant:
-0:115        0.000000
-0:116      Sequence
-0:116        move second child to first child (temp 4-component vector of int)
-0:116          'pos' (temp 4-component vector of int)
-0:116          imageLoad (global 4-component vector of int)
-0:116            'iimg2D' (layout(r32i ) uniform iimage2D)
-0:116            Construct ivec2 (temp 2-component vector of int)
-0:116              'i' (temp int)
-0:116              'i' (temp int)
-0:117      Sequence
-0:117        move second child to first child (temp 4-component vector of float)
-0:117          'col' (temp 4-component vector of float)
-0:117          imageLoad (global 4-component vector of float)
-0:117            'img2DMS' (uniform image2DMS)
-0:117            Construct ivec2 (temp 2-component vector of int)
-0:117              'i' (temp int)
-0:117              'i' (temp int)
-0:117            'i' (temp int)
-0:118      imageStore (global void)
-0:118        'img2DMSWO' (writeonly uniform image2DMS)
-0:118        Construct ivec2 (temp 2-component vector of int)
-0:118          'i' (temp int)
-0:118          'i' (temp int)
-0:118        'i' (temp int)
-0:118        Constant:
-0:118          0.000000
-0:118          0.000000
-0:118          0.000000
-0:118          0.000000
-0:119      imageLoad (global 4-component vector of float)
-0:119        'img2DMSWO' (writeonly uniform image2DMS)
-0:119        Construct ivec2 (temp 2-component vector of int)
-0:119          'i' (temp int)
-0:119          'i' (temp int)
-0:119        'i' (temp int)
-0:125  Function Definition: passr(iI21; (global void)
-0:125    Function Parameters: 
-0:125      'image' (coherent readonly in iimage2D)
-0:132  Function Definition: passrc( (global void)
-0:132    Function Parameters: 
-0:134    Sequence
-0:134      Function Call: passr(iI21; (global void)
-0:134        'qualim1' (layout(r32i ) coherent readonly uniform iimage2D)
-0:135      Function Call: passr(iI21; (global void)
-0:135        'qualim2' (layout(r32i ) coherent volatile readonly uniform iimage2D)
-0:136      Function Call: passr(iI21; (global void)
-0:136        'iimg2D' (layout(r32i ) uniform iimage2D)
-0:153  Function Definition: qlod( (global void)
-0:153    Function Parameters: 
-0:?     Sequence
-0:157      'levels' (temp int)
-0:158      'levels' (temp int)
 0:?   Linker Objects
 0:?     'v2' (smooth out 2-component vector of float)
 0:?     'bad' (in 10-element array of 4-component vector of float)
diff --git a/Test/baseResults/420_size_gl_in.geom.out b/Test/baseResults/420_size_gl_in.geom.out
index 28d09a6..54ec99e 100644
--- a/Test/baseResults/420_size_gl_in.geom.out
+++ b/Test/baseResults/420_size_gl_in.geom.out
@@ -49,26 +49,6 @@
 input primitive = triangles
 output primitive = none
 ERROR: node is still EOpNull!
-0:11  Function Definition: foo( (global void)
-0:11    Function Parameters: 
-0:13    Sequence
-0:13      Constant:
-0:13        3 (const int)
-0:14      gl_Position: direct index for structure (in 4-component vector of float Position)
-0:14        direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 1-element array of float ClipDistance gl_ClipDistance})
-0:14          'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 1-element array of float ClipDistance gl_ClipDistance})
-0:14          Constant:
-0:14            1 (const int)
-0:14        Constant:
-0:14          0 (const int)
-0:15      Constant:
-0:15        3 (const int)
-0:16      gl_Position: direct index for structure (in 4-component vector of float Position)
-0:16        indirect index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 1-element array of float ClipDistance gl_ClipDistance})
-0:16          'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 1-element array of float ClipDistance gl_ClipDistance})
-0:16          'i' (global int)
-0:16        Constant:
-0:16          0 (const int)
 0:?   Linker Objects
 0:?     'i' (global int)
 0:?     'colorun' (in 3-element array of 4-component vector of float)
diff --git a/Test/baseResults/430.comp.out b/Test/baseResults/430.comp.out
index aecf42f..ed61346 100644
--- a/Test/baseResults/430.comp.out
+++ b/Test/baseResults/430.comp.out
@@ -184,77 +184,6 @@
 0:39            10 (const int)
 0:39        true case
 0:40        Barrier (global void)
-0:63  Function Definition: foo( (global void)
-0:63    Function Parameters: 
-0:65    Sequence
-0:65      move second child to first child (temp float)
-0:65        direct index (layout(column_major shared ) temp float)
-0:65          values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of float)
-0:65            'ro' (layout(column_major shared ) readonly buffer block{layout(column_major shared ) buffer int value, layout(column_major shared ) buffer implicitly-sized array of float values})
-0:65            Constant:
-0:65              1 (const int)
-0:65          Constant:
-0:65            2 (const int)
-0:65        Constant:
-0:65          4.700000
-0:66      array length (temp int)
-0:66        values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of float)
-0:66          'ro' (layout(column_major shared ) readonly buffer block{layout(column_major shared ) buffer int value, layout(column_major shared ) buffer implicitly-sized array of float values})
-0:66          Constant:
-0:66            1 (const int)
-0:67      Barrier (global void)
-0:72  Function Definition: fooaoeu( (global void)
-0:72    Function Parameters: 
-0:73    Sequence
-0:73      Sequence
-0:73        move second child to first child (temp 2-component vector of int)
-0:73          'storePos' (temp 2-component vector of int)
-0:73          Convert uint to int (temp 2-component vector of int)
-0:73            vector swizzle (temp 2-component vector of uint)
-0:73              'gl_GlobalInvocationID' (in 3-component vector of uint GlobalInvocationID)
-0:73              Sequence
-0:73                Constant:
-0:73                  0 (const int)
-0:73                Constant:
-0:73                  1 (const int)
-0:74      Sequence
-0:74        move second child to first child (temp double)
-0:74          'localCoef' (temp double)
-0:74          Convert float to double (temp double)
-0:74            length (global float)
-0:74              divide (temp 2-component vector of float)
-0:74                Convert int to float (temp 2-component vector of float)
-0:74                  subtract (temp 2-component vector of int)
-0:74                    Convert uint to int (temp 2-component vector of int)
-0:74                      vector swizzle (temp 2-component vector of uint)
-0:74                        'gl_LocalInvocationID' (in 3-component vector of uint LocalInvocationID)
-0:74                        Sequence
-0:74                          Constant:
-0:74                            0 (const int)
-0:74                          Constant:
-0:74                            1 (const int)
-0:74                    Constant:
-0:74                      8 (const int)
-0:74                Constant:
-0:74                  8.000000
-0:75      Sequence
-0:75        move second child to first child (temp 4-component vector of double)
-0:75          'aa' (temp 4-component vector of double)
-0:75          Constant:
-0:75            0.400000
-0:75            0.200000
-0:75            0.300000
-0:75            0.400000
-0:76      Sequence
-0:76        move second child to first child (temp double)
-0:76          'globalCoef' (temp double)
-0:76          Constant:
-0:76            1.000000
-0:78      Sequence
-0:78        move second child to first child (temp double)
-0:78          'di' (temp double)
-0:78          Convert int to double (temp double)
-0:78            'i' (temp int)
 0:?   Linker Objects
 0:?     'gl_WorkGroupSize' (const 3-component vector of uint WorkGroupSize)
 0:?       2 (const uint)
diff --git a/Test/baseResults/430.vert.out b/Test/baseResults/430.vert.out
index 676fcd3..8cd1156 100644
--- a/Test/baseResults/430.vert.out
+++ b/Test/baseResults/430.vert.out
@@ -275,135 +275,6 @@
 Requested GL_ARB_shader_texture_image_samples
 in xfb mode
 ERROR: node is still EOpNull!
-0:14  Function Definition: foo( (global void)
-0:14    Function Parameters: 
-0:16    Sequence
-0:16      move second child to first child (temp float)
-0:16        direct index (temp float ClipDistance)
-0:16          gl_ClipDistance: direct index for structure (out 17-element array of float ClipDistance)
-0:16            'anon@0' (out block{out 17-element array of float ClipDistance gl_ClipDistance, })
-0:16            Constant:
-0:16              2 (const uint)
-0:16          Constant:
-0:16            2 (const int)
-0:16        Constant:
-0:16          3.700000
-0:31  Function Definition: foo3(vf4;vf3;vf2;vf3; (global void)
-0:31    Function Parameters: 
-0:31      'v4' (in 4-component vector of float)
-0:31      'v3' (volatile in 3-component vector of float)
-0:31      'v2' (in 2-component vector of float)
-0:31      'cv3' (in 3-component vector of float)
-0:148  Function Definition: fooBarrier( (global void)
-0:148    Function Parameters: 
-0:150    Sequence
-0:150      Constant:
-0:150        0.000000
-0:151      MemoryBarrier (global void)
-0:152      MemoryBarrierAtomicCounter (global void)
-0:153      MemoryBarrierBuffer (global void)
-0:154      Constant:
-0:154        0.000000
-0:155      MemoryBarrierImage (global void)
-0:156      Constant:
-0:156        0.000000
-0:166  Function Definition: fooq( (global void)
-0:166    Function Parameters: 
-0:168    Sequence
-0:168      Sequence
-0:168        move second child to first child (temp int)
-0:168          's' (temp int)
-0:168          textureSamples (global int)
-0:168            's2dms' (uniform sampler2DMS)
-0:169      add second child into first child (temp int)
-0:169        's' (temp int)
-0:169        textureSamples (global int)
-0:169          'us2dmsa' (uniform usampler2DMSArray)
-0:170      add second child into first child (temp int)
-0:170        's' (temp int)
-0:170        imageQuerySamples (global int)
-0:170          'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
-0:171      add second child into first child (temp int)
-0:171        's' (temp int)
-0:171        imageQuerySamples (global int)
-0:171          'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
-0:176  Function Definition: fooq2( (global void)
-0:176    Function Parameters: 
-0:178    Sequence
-0:178      Sequence
-0:178        move second child to first child (temp int)
-0:178          's' (temp int)
-0:178          textureSamples (global int)
-0:178            's2dms' (uniform sampler2DMS)
-0:179      add second child into first child (temp int)
-0:179        's' (temp int)
-0:179        textureSamples (global int)
-0:179          'us2dmsa' (uniform usampler2DMSArray)
-0:180      add second child into first child (temp int)
-0:180        's' (temp int)
-0:180        imageQuerySamples (global int)
-0:180          'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
-0:181      add second child into first child (temp int)
-0:181        's' (temp int)
-0:181        imageQuerySamples (global int)
-0:181          'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
-0:202  Function Definition: qlod( (global void)
-0:202    Function Parameters: 
-0:?     Sequence
-0:206      move second child to first child (temp int)
-0:206        'levels' (temp int)
-0:206        textureQueryLevels (global int)
-0:206          'samp1D' (uniform sampler1D)
-0:207      move second child to first child (temp int)
-0:207        'levels' (temp int)
-0:207        textureQueryLevels (global int)
-0:207          'usamp2D' (uniform usampler2D)
-0:208      move second child to first child (temp int)
-0:208        'levels' (temp int)
-0:208        textureQueryLevels (global int)
-0:208          'isamp3D' (uniform isampler3D)
-0:209      move second child to first child (temp int)
-0:209        'levels' (temp int)
-0:209        textureQueryLevels (global int)
-0:209          'isampCube' (uniform isamplerCube)
-0:210      move second child to first child (temp int)
-0:210        'levels' (temp int)
-0:210        textureQueryLevels (global int)
-0:210          'isamp1DA' (uniform isampler1DArray)
-0:211      move second child to first child (temp int)
-0:211        'levels' (temp int)
-0:211        textureQueryLevels (global int)
-0:211          'samp2DA' (uniform sampler2DArray)
-0:212      move second child to first child (temp int)
-0:212        'levels' (temp int)
-0:212        textureQueryLevels (global int)
-0:212          'usampCubeA' (uniform usamplerCubeArray)
-0:214      move second child to first child (temp int)
-0:214        'levels' (temp int)
-0:214        textureQueryLevels (global int)
-0:214          'samp1Ds' (uniform sampler1DShadow)
-0:215      move second child to first child (temp int)
-0:215        'levels' (temp int)
-0:215        textureQueryLevels (global int)
-0:215          'samp2Ds' (uniform sampler2DShadow)
-0:216      move second child to first child (temp int)
-0:216        'levels' (temp int)
-0:216        textureQueryLevels (global int)
-0:216          'sampCubes' (uniform samplerCubeShadow)
-0:217      move second child to first child (temp int)
-0:217        'levels' (temp int)
-0:217        textureQueryLevels (global int)
-0:217          'samp1DAs' (uniform sampler1DArrayShadow)
-0:218      move second child to first child (temp int)
-0:218        'levels' (temp int)
-0:218        textureQueryLevels (global int)
-0:218          'samp2DAs' (uniform sampler2DArrayShadow)
-0:219      move second child to first child (temp int)
-0:219        'levels' (temp int)
-0:219        textureQueryLevels (global int)
-0:219          'sampCubeAs' (uniform samplerCubeArrayShadow)
-0:221      'levels' (temp int)
-0:222      'levels' (temp int)
 0:?   Linker Objects
 0:?     'v4' (layout(location=3 ) temp 4-component vector of float)
 0:?     'uv4' (layout(location=4 ) uniform 4-component vector of float)
diff --git a/Test/baseResults/430AofA.frag.out b/Test/baseResults/430AofA.frag.out
index 68285f7..fd3892d 100644
--- a/Test/baseResults/430AofA.frag.out
+++ b/Test/baseResults/430AofA.frag.out
@@ -2,7 +2,7 @@
 Warning, version 430 is not yet complete; most version-specific features are present, but some are missing.
 ERROR: 0:6: '[]' : only outermost dimension of an array of arrays can be implicitly sized 
 ERROR: 0:14: 'constructor' : constructing non-array constituent from array argument 
-ERROR: 0:15: 'constructior' : array constructor argument not correct type to construct array element 
+ERROR: 0:15: 'constructor' : array constructor argument not correct type to construct array element 
 ERROR: 0:28: '[' :  array index out of range '4'
 ERROR: 0:56: 'constructor' :  cannot convert parameter 2 from 'const 3-element array of 4-component vector of float' to 'temp 2-element array of 4-component vector of float'
 ERROR: 0:60: 'constructor' :  cannot convert parameter 2 from 'const 2-element array of 4-component vector of float' to 'temp 3-element array of 4-component vector of float'
@@ -766,34 +766,6 @@
 0:84          5.000000
 0:85      Function Call: foo(f1[5][7]; (global 4-element array of 7-element array of float)
 0:85        'u' (temp 5-element array of 7-element array of float)
-0:88  Function Definition: foo3( (global void)
-0:88    Function Parameters: 
-0:?     Sequence
-0:91      Constant:
-0:91        1 (const int)
-0:92      move second child to first child (temp float)
-0:92        direct index (temp float)
-0:92          direct index (temp 7-element array of float)
-0:92            direct index (temp 5-element array of 7-element array of float)
-0:92              'resize1' (temp 3-element array of 5-element array of 7-element array of float)
-0:92              Constant:
-0:92                1 (const int)
-0:92            Constant:
-0:92              4 (const int)
-0:92          Constant:
-0:92            5 (const int)
-0:92        Constant:
-0:92          2.000000
-0:93      Constant:
-0:93        1 (const int)
-0:95      Constant:
-0:95        3 (const int)
-0:96      Constant:
-0:96        5 (const int)
-0:97      Constant:
-0:97        7 (const int)
-0:98      Constant:
-0:98        0.000000
 0:?   Linker Objects
 0:?     'many' (global 1-element array of 2-element array of 3-element array of 4-element array of 5-element array of 6-element array of float)
 0:?     'gu' (global 1-element array of 7-element array of float)
diff --git a/Test/baseResults/430scope.vert.out b/Test/baseResults/430scope.vert.out
index 0a097a2..c7d0503 100644
--- a/Test/baseResults/430scope.vert.out
+++ b/Test/baseResults/430scope.vert.out
@@ -127,6 +127,8 @@
 
 Linked vertex stage:
 
+ERROR: Linking vertex stage: No function definition (body) found: 
+    g(
 
 Shader version: 430
 ERROR: node is still EOpNull!
@@ -147,20 +149,6 @@
 0:8                1.000000
 0:11      Branch: Return with expression
 0:11        'a' (in int)
-0:25  Function Definition: cos(f1; (global float)
-0:25    Function Parameters: 
-0:25      'x' (in float)
-0:27    Sequence
-0:27      Branch: Return with expression
-0:27        Constant:
-0:27          1.000000
-0:29  Function Definition: radians(b1; (global bool)
-0:29    Function Parameters: 
-0:29      'x' (in bool)
-0:31    Sequence
-0:31      Branch: Return with expression
-0:31        Constant:
-0:31          true (const bool)
 0:36  Function Definition: main( (global void)
 0:36    Function Parameters: 
 0:?     Sequence
diff --git a/Test/baseResults/440.frag.out b/Test/baseResults/440.frag.out
index 064fe19..bdc1b09 100644
--- a/Test/baseResults/440.frag.out
+++ b/Test/baseResults/440.frag.out
@@ -126,35 +126,6 @@
 
 Shader version: 440
 ERROR: node is still EOpNull!
-0:144  Function Definition: interp( (global void)
-0:144    Function Parameters: 
-0:146    Sequence
-0:146      interpolateAtCentroid (global 2-component vector of float)
-0:146        vector swizzle (temp 2-component vector of float)
-0:146          direct index (smooth sample temp 3-component vector of float)
-0:146            'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
-0:146            Constant:
-0:146              2 (const int)
-0:146          Sequence
-0:146            Constant:
-0:146              0 (const int)
-0:146            Constant:
-0:146              1 (const int)
-0:147      interpolateAtSample (global float)
-0:147        direct index (temp float)
-0:147          direct index (smooth sample temp 3-component vector of float)
-0:147            'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
-0:147            Constant:
-0:147              2 (const int)
-0:147          Constant:
-0:147            0 (const int)
-0:147        Constant:
-0:147          2 (const int)
-0:150  Function Definition: layer( (global int)
-0:150    Function Parameters: 
-0:152    Sequence
-0:152      Branch: Return with expression
-0:152        'gl_Layer' (flat in int Layer)
 0:?   Linker Objects
 0:?     'a' (layout(location=4 component=2 ) smooth in 2-component vector of float)
 0:?     'b' (layout(location=4 component=1 ) smooth in float)
diff --git a/Test/baseResults/440.vert.out b/Test/baseResults/440.vert.out
index 022ddec..bf625c8 100644
--- a/Test/baseResults/440.vert.out
+++ b/Test/baseResults/440.vert.out
@@ -174,37 +174,6 @@
 Requested GL_ARB_shader_draw_parameters
 in xfb mode
 ERROR: node is still EOpNull!
-0:177  Function Definition: drawParamsBad( (global int)
-0:177    Function Parameters: 
-0:179    Sequence
-0:179      Branch: Return with expression
-0:179        add (temp int)
-0:179          add (temp int)
-0:179            'gl_BaseVertexARB' (in int BaseVertex)
-0:179            'gl_BaseInstanceARB' (in int BaseInstance)
-0:179          'gl_DrawIDARB' (in int DrawId)
-0:184  Function Definition: drawParams( (global int)
-0:184    Function Parameters: 
-0:186    Sequence
-0:186      Branch: Return with expression
-0:186        add (temp int)
-0:186          add (temp int)
-0:186            'gl_BaseVertexARB' (in int BaseVertex)
-0:186            'gl_BaseInstanceARB' (in int BaseInstance)
-0:186          'gl_DrawIDARB' (in int DrawId)
-0:187      move second child to first child (temp int)
-0:187        'gl_BaseVertexARB' (in int BaseVertex)
-0:187        Constant:
-0:187          3 (const int)
-0:188      move second child to first child (temp int)
-0:188        'gl_BaseInstanceARB' (in int BaseInstance)
-0:188        Constant:
-0:188          3 (const int)
-0:189      move second child to first child (temp int)
-0:189        'gl_DrawIDARB' (in int DrawId)
-0:189        Constant:
-0:189          3 (const int)
-0:190      'glBaseInstanceARB' (temp float)
 0:?   Linker Objects
 0:?     'a' (layout(location=2 component=2 ) in 2-component vector of float)
 0:?     'b' (layout(location=2 component=1 ) in float)
diff --git a/Test/baseResults/450.frag.out b/Test/baseResults/450.frag.out
index 23682e8..0382673 100644
--- a/Test/baseResults/450.frag.out
+++ b/Test/baseResults/450.frag.out
@@ -263,57 +263,6 @@
 0:34                'uin' (temp uint)
 0:34            Construct bvec3 (temp 3-component vector of bool)
 0:34              'b' (temp bool)
-0:42  Function Definition: foo( (global void)
-0:42    Function Parameters: 
-0:44    Sequence
-0:44      Sequence
-0:44        move second child to first child (temp int)
-0:44          's' (temp int)
-0:44          textureSamples (global int)
-0:44            's2dms' (uniform sampler2DMS)
-0:45      add second child into first child (temp int)
-0:45        's' (temp int)
-0:45        textureSamples (global int)
-0:45          'us2dmsa' (uniform usampler2DMSArray)
-0:46      add second child into first child (temp int)
-0:46        's' (temp int)
-0:46        imageQuerySamples (global int)
-0:46          'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
-0:47      add second child into first child (temp int)
-0:47        's' (temp int)
-0:47        imageQuerySamples (global int)
-0:47          'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
-0:48      Sequence
-0:48        move second child to first child (temp float)
-0:48          'f' (temp float)
-0:48          imageAtomicExchange (global float)
-0:48            'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
-0:48            Convert float to int (temp 3-component vector of int)
-0:48              'in3' (smooth in 3-component vector of float)
-0:48            Constant:
-0:48              2 (const int)
-0:48            Constant:
-0:48              4.500000
-0:53  Function Definition: cull(i1; (global float)
-0:53    Function Parameters: 
-0:53      'i' (in int)
-0:55    Sequence
-0:55      Branch: Return with expression
-0:55        Test condition and select (temp float)
-0:55          Condition
-0:55          Compare Greater Than or Equal (temp bool)
-0:55            'i' (in int)
-0:55            Constant:
-0:55              6 (const int)
-0:55          true case
-0:55          direct index (smooth temp float CullDistance)
-0:55            'gl_CullDistance' (smooth in 6-element array of float CullDistance)
-0:55            Constant:
-0:55              5 (const int)
-0:55          false case
-0:55          indirect index (smooth temp float CullDistance)
-0:55            'gl_CullDistance' (smooth in 6-element array of float CullDistance)
-0:55            'i' (in int)
 0:?   Linker Objects
 0:?     'in1' (smooth in float)
 0:?     'in2' (smooth in 2-component vector of float)
diff --git a/Test/baseResults/array.frag.out b/Test/baseResults/array.frag.out
index 8b3cf80..e254bf1 100644
--- a/Test/baseResults/array.frag.out
+++ b/Test/baseResults/array.frag.out
@@ -446,71 +446,6 @@
 0:58              1 (const int)
 0:58        Constant:
 0:58          4 (const int)
-0:68  Function Definition: foo( (global void)
-0:68    Function Parameters: 
-0:?     Sequence
-0:71      move second child to first child (temp int)
-0:71        direct index (temp int)
-0:71          'uns' (temp 4-element array of int)
-0:71          Constant:
-0:71            3 (const int)
-0:71        Constant:
-0:71          40 (const int)
-0:72      move second child to first child (temp int)
-0:72        direct index (temp int)
-0:72          'uns' (temp 4-element array of int)
-0:72          Constant:
-0:72            1 (const int)
-0:72        Constant:
-0:72          30 (const int)
-0:73      move second child to first child (temp 3-component vector of float)
-0:73        direct index (temp 3-component vector of float)
-0:73          'guns' (global 8-element array of 3-component vector of float)
-0:73          Constant:
-0:73            2 (const int)
-0:73        Constant:
-0:73          2.400000
-0:73          2.400000
-0:73          2.400000
-0:76      Constant:
-0:76        0.000000
-0:79  Function Definition: foo2( (global implicitly-sized array of float)
-0:79    Function Parameters: 
-0:?     Sequence
-0:82      Branch: Return with expression
-0:82        'f' (temp 1-element array of float)
-0:84      Branch: Return with expression
-0:84        'g' (temp 9-element array of float)
-0:89  Function Definition: foo3( (global void)
-0:89    Function Parameters: 
-0:?     Sequence
-0:92      move second child to first child (temp float)
-0:92        direct index (temp float)
-0:92          'resize1' (temp 3-element array of float)
-0:92          Constant:
-0:92            2 (const int)
-0:92        Constant:
-0:92          4.000000
-0:93      Constant:
-0:93        1 (const int)
-0:95      Constant:
-0:95        3 (const int)
-0:98      move second child to first child (temp float)
-0:98        direct index (temp float)
-0:98          'resize2' (temp 5-element array of float)
-0:98          Constant:
-0:98            5 (const int)
-0:98        Constant:
-0:98          4.000000
-0:100      Constant:
-0:100        5 (const int)
-0:101      move second child to first child (temp float)
-0:101        direct index (temp float)
-0:101          'resize2' (temp 5-element array of float)
-0:101          Constant:
-0:101            5 (const int)
-0:101        Constant:
-0:101          4.000000
 0:106  Sequence
 0:106    move second child to first child (temp float)
 0:106      'b' (global float)
diff --git a/Test/baseResults/array100.frag.out b/Test/baseResults/array100.frag.out
index b44f6a0..cf54361 100644
--- a/Test/baseResults/array100.frag.out
+++ b/Test/baseResults/array100.frag.out
@@ -265,29 +265,6 @@
 0:40          1.000000
 0:40          1.000000
 0:40          1.000000
-0:53  Function Definition: bar9( (global structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
-0:53    Function Parameters: 
-0:?     Sequence
-0:56      Branch: Return with expression
-0:56        's' (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
-0:59  Function Definition: bar10(struct-SB-vf4-struct-SA-vf3-vf2[4]11; (global void)
-0:59    Function Parameters: 
-0:59      's' (in structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
-0:63  Function Definition: bar11( (global void)
-0:63    Function Parameters: 
-0:?     Sequence
-0:66      move second child to first child (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
-0:66        's1' (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
-0:66        's2' (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
-0:67      Function Call: bar10(struct-SB-vf4-struct-SA-vf3-vf2[4]11; (global void)
-0:67        's1' (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
-0:68      move second child to first child (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
-0:68        's2' (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
-0:68        Function Call: bar9( (global structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
-0:69      Sequence
-0:69        move second child to first child (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
-0:69          'initSb' (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
-0:69          's1' (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
 0:?   Linker Objects
 0:?     'gu' (global 1-element array of mediump float)
 0:?     'g4' (global 4-element array of mediump float)
diff --git a/Test/baseResults/atomic_uint.frag.out b/Test/baseResults/atomic_uint.frag.out
index 4d05756..e54b5dc 100644
--- a/Test/baseResults/atomic_uint.frag.out
+++ b/Test/baseResults/atomic_uint.frag.out
@@ -86,22 +86,6 @@
 
 Shader version: 420
 ERROR: node is still EOpNull!
-0:5  Function Definition: func(au1; (global uint)
-0:5    Function Parameters: 
-0:5      'c' (in atomic_uint)
-0:7    Sequence
-0:7      Branch: Return with expression
-0:7        AtomicCounterIncrement (global uint)
-0:7          'c' (in atomic_uint)
-0:10  Function Definition: func2(au1; (global uint)
-0:10    Function Parameters: 
-0:10      'c' (out atomic_uint)
-0:12    Sequence
-0:12      Branch: Return with expression
-0:12        'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
-0:13      Branch: Return with expression
-0:13        AtomicCounter (global uint)
-0:13          'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
 0:16  Function Definition: main( (global void)
 0:16    Function Parameters: 
 0:?     Sequence
@@ -112,22 +96,6 @@
 0:19            'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
 0:20      AtomicCounterDecrement (global uint)
 0:20        'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
-0:26  Function Definition: opac( (global void)
-0:26    Function Parameters: 
-0:28    Sequence
-0:28      'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
-0:29      'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
-0:31      indirect index (temp int)
-0:31        'a' (temp 3-element array of int)
-0:31        'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
-0:32      direct index (layout(binding=1 offset=3 ) temp atomic_uint)
-0:32        'countArr' (layout(binding=1 offset=3 ) uniform 4-element array of atomic_uint)
-0:32        Constant:
-0:32          2 (const int)
-0:33      indirect index (layout(binding=1 offset=3 ) temp atomic_uint)
-0:33        'countArr' (layout(binding=1 offset=3 ) uniform 4-element array of atomic_uint)
-0:33        'i' (uniform int)
-0:34      'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
 0:?   Linker Objects
 0:?     'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
 0:?     'countArr' (layout(binding=1 offset=3 ) uniform 4-element array of atomic_uint)
diff --git a/Test/baseResults/constFold.frag.out b/Test/baseResults/constFold.frag.out
index 2e78468..33bf513 100644
--- a/Test/baseResults/constFold.frag.out
+++ b/Test/baseResults/constFold.frag.out
@@ -546,120 +546,6 @@
 0:69          0.028000
 0:69          0.500000
 0:69          1.000000
-0:78  Function Definition: foo( (global void)
-0:78    Function Parameters: 
-0:?     Sequence
-0:81      move second child to first child (temp float)
-0:81        direct index (temp float)
-0:81          'a' (temp 3-element array of float)
-0:81          Constant:
-0:81            0 (const int)
-0:81        Constant:
-0:81          7.000000
-0:82      Constant:
-0:82        2 (const int)
-0:83      Constant:
-0:83        2147483647 (const int)
-0:84      Constant:
-0:84        inf
-0:88      Constant:
-0:88        2 (const uint)
-0:88        3 (const uint)
-0:89      Constant:
-0:89        0 (const uint)
-0:90      Constant:
-0:90        6 (const uint)
-0:90        7 (const uint)
-0:103  Function Definition: foo2( (global void)
-0:103    Function Parameters: 
-0:105    Sequence
-0:105      direct index (temp float)
-0:105        'a1' (global 1-element array of float)
-0:105        Constant:
-0:105          0 (const int)
-0:106      direct index (temp float)
-0:106        'a2' (global 2-element array of float)
-0:106        Constant:
-0:106          0 (const int)
-0:107      direct index (temp float)
-0:107        'a3' (global 4-element array of float)
-0:107        Constant:
-0:107          0 (const int)
-0:108      direct index (temp float)
-0:108        'a4' (global 2-element array of float)
-0:108        Constant:
-0:108          0 (const int)
-0:109      Constant:
-0:109        1.000000
-0:110      Constant:
-0:110        5.000000
-0:111      Constant:
-0:111        2.000000
-0:112      Constant:
-0:112        3.000000
-0:113      Constant:
-0:113        0.000000
-0:114      Constant:
-0:114        0.000000
-0:116      move second child to first child (temp int)
-0:116        'p' (temp int)
-0:116        Constant:
-0:116          2147483647 (const int)
-0:117      move second child to first child (temp int)
-0:117        'p' (temp int)
-0:117        Constant:
-0:117          -2147483648 (const int)
-0:118      move second child to first child (temp int)
-0:118        'p' (temp int)
-0:118        Constant:
-0:118          -2147483647 (const int)
-0:119      Sequence
-0:119        move second child to first child (temp float)
-0:119          'f' (temp float)
-0:119          Constant:
-0:119            1.444000
-0:120      move second child to first child (temp float)
-0:120        'f' (temp float)
-0:120        direct index (temp float)
-0:120          Construct vec4 (temp 4-component vector of float)
-0:120            Test condition and select (temp float)
-0:120              Condition
-0:120              Compare Less Than (temp bool)
-0:120                direct index (temp float)
-0:120                  'inv' (smooth in 4-component vector of float)
-0:120                  Constant:
-0:120                    0 (const int)
-0:120                Constant:
-0:120                  2.400000
-0:120              true case
-0:120              Constant:
-0:120                -1.000000
-0:120              false case
-0:120              Constant:
-0:120                1.000000
-0:120          Constant:
-0:120            3 (const int)
-0:126  Function Definition: foo3( (global void)
-0:126    Function Parameters: 
-0:128    Sequence
-0:128      Sequence
-0:128        move second child to first child (temp 3X2 matrix of float)
-0:128          'r32' (temp 3X2 matrix of float)
-0:128          Constant:
-0:128            43.000000
-0:128            64.000000
-0:128            51.000000
-0:128            76.000000
-0:128            59.000000
-0:128            88.000000
-0:138  Function Definition: foo4( (global void)
-0:138    Function Parameters: 
-0:140    Sequence
-0:140      Sequence
-0:140        move second child to first child (temp int)
-0:140          'a' (temp int)
-0:140          Constant:
-0:140            9 (const int)
 0:?   Linker Objects
 0:?     'a' (const int)
 0:?       1 (const int)
diff --git a/Test/baseResults/cppComplexExpr.vert.out b/Test/baseResults/cppComplexExpr.vert.out
index aa73a06..352dcac 100644
--- a/Test/baseResults/cppComplexExpr.vert.out
+++ b/Test/baseResults/cppComplexExpr.vert.out
@@ -152,41 +152,6 @@
 0:39        'gl_Position' (gl_Position highp 4-component vector of float Position)
 0:39        Construct vec4 (temp highp 4-component vector of float)
 0:39          'sum' (global highp float)
-0:44  Function Definition: foo( (global highp float)
-0:44    Function Parameters: 
-0:46    Sequence
-0:46      Branch: Return with expression
-0:46        add (temp highp float)
-0:46          add (temp highp float)
-0:46            direct index (temp highp float)
-0:46              'gl_Position' (gl_Position highp 4-component vector of float Position)
-0:46              Constant:
-0:46                0 (const int)
-0:46            Constant:
-0:46              3.000000
-0:46          add (temp highp float)
-0:46            direct index (temp highp float)
-0:46              'gl_Position' (gl_Position highp 4-component vector of float Position)
-0:46              Constant:
-0:46                0 (const int)
-0:46            Constant:
-0:46              3.000000
-0:47      Branch: Return with expression
-0:47        add (temp highp float)
-0:47          add (temp highp float)
-0:47            direct index (temp highp float)
-0:47              'gl_Position' (gl_Position highp 4-component vector of float Position)
-0:47              Constant:
-0:47                1 (const int)
-0:47            Constant:
-0:47              3.000000
-0:47          add (temp highp float)
-0:47            direct index (temp highp float)
-0:47              'gl_Position' (gl_Position highp 4-component vector of float Position)
-0:47              Constant:
-0:47                1 (const int)
-0:47            Constant:
-0:47              3.000000
 0:97  Sequence
 0:97    move second child to first child (temp highp float)
 0:97      'c' (global highp float)
diff --git a/Test/baseResults/cppNest.vert.out b/Test/baseResults/cppNest.vert.out
index df90557..2077ec3 100644
--- a/Test/baseResults/cppNest.vert.out
+++ b/Test/baseResults/cppNest.vert.out
@@ -135,17 +135,6 @@
 0:133      'selected3' (global int)
 0:133      Constant:
 0:133        3 (const int)
-0:175  Function Definition: foo985( (global void)
-0:175    Function Parameters: 
-0:175    Sequence
-0:175      add (temp int)
-0:175        Constant:
-0:175          2 (const int)
-0:175        Comma (temp int)
-0:175          Constant:
-0:175            3 (const int)
-0:175          Constant:
-0:175            4 (const int)
 0:?   Linker Objects
 0:?     'sum' (global float)
 0:?     'selected4' (global int)
diff --git a/Test/baseResults/cppSimple.vert.out b/Test/baseResults/cppSimple.vert.out
index 366770d..bf4b42a 100644
--- a/Test/baseResults/cppSimple.vert.out
+++ b/Test/baseResults/cppSimple.vert.out
@@ -282,19 +282,6 @@
 0:202      'f' (global double)
 0:202      Constant:
 0:202        0.000800
-12:20031  Function Definition: foo234( (global void)
-12:20031    Function Parameters: 
-12:20033    Sequence
-12:20033      move second child to first child (temp 4-component vector of float)
-12:20033        gl_Position: direct index for structure (gl_Position 4-component vector of float Position)
-12:20033          'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
-12:20033          Constant:
-12:20033            0 (const uint)
-12:20033        Constant:
-12:20033          6.000000
-12:20033          6.000000
-12:20033          6.000000
-12:20033          6.000000
 12:9011  Sequence
 12:9011    move second child to first child (temp int)
 12:9011      'R1' (global int)
diff --git a/Test/baseResults/dce.frag.out b/Test/baseResults/dce.frag.out
index 2846abd..6707ae7 100644
--- a/Test/baseResults/dce.frag.out
+++ b/Test/baseResults/dce.frag.out
@@ -147,128 +147,6 @@
 0:5      'c' (global int)
 0:5      Constant:
 0:5        0 (const int)
-0:7  Function Definition: bar( (global void)
-0:7    Function Parameters: 
-0:9    Sequence
-0:9      Test condition and select (temp void)
-0:9        Condition
-0:9        Constant:
-0:9          false (const bool)
-0:9        true case
-0:10        Pre-Increment (temp int)
-0:10          'c' (global int)
-0:9        false case
-0:12        Pre-Increment (temp int)
-0:12          'c' (global int)
-0:14      Test condition and select (temp int)
-0:14        Condition
-0:14        Constant:
-0:14          false (const bool)
-0:14        true case
-0:14        Pre-Increment (temp int)
-0:14          'c' (global int)
-0:14        false case
-0:14        Pre-Increment (temp int)
-0:14          'c' (global int)
-0:16      switch
-0:16      condition
-0:16        'c' (global int)
-0:16      body
-0:16        Sequence
-0:17          case:  with expression
-0:17            Constant:
-0:17              1 (const int)
-0:?           Sequence
-0:18            Pre-Increment (temp int)
-0:18              'c' (global int)
-0:19            Branch: Break
-0:20            Pre-Increment (temp int)
-0:20              'c' (global int)
-0:21          case:  with expression
-0:21            Constant:
-0:21              2 (const int)
-0:?           Sequence
-0:22            Branch: Break
-0:23            Pre-Increment (temp int)
-0:23              'c' (global int)
-0:24          default: 
-0:?           Sequence
-0:25            Branch: Break
-0:28      Sequence
-0:28        Sequence
-0:28          move second child to first child (temp int)
-0:28            'i' (temp int)
-0:28            Constant:
-0:28              0 (const int)
-0:28        Loop with condition tested first
-0:28          Loop Condition
-0:28          Compare Less Than (temp bool)
-0:28            'i' (temp int)
-0:28            Constant:
-0:28              0 (const int)
-0:28          Loop Body
-0:29          Pre-Increment (temp int)
-0:29            'c' (global int)
-0:28          Loop Terminal Expression
-0:28          Pre-Increment (temp int)
-0:28            'i' (temp int)
-0:31      Sequence
-0:31        Sequence
-0:31          move second child to first child (temp int)
-0:31            'i' (temp int)
-0:31            Constant:
-0:31              0 (const int)
-0:31        Loop with condition tested first
-0:31          Loop Condition
-0:31          Compare Less Than (temp bool)
-0:31            'i' (temp int)
-0:31            Constant:
-0:31              10 (const int)
-0:31          Loop Body
-0:32          Sequence
-0:32            Test condition and select (temp void)
-0:32              Condition
-0:32              Compare Less Than (temp bool)
-0:32                'c' (global int)
-0:32                Constant:
-0:32                  3 (const int)
-0:32              true case
-0:33              Sequence
-0:33                Branch: Break
-0:34                Pre-Increment (temp int)
-0:34                  'c' (global int)
-0:32              false case
-0:36              Sequence
-0:36                Branch: Continue
-0:37                Pre-Increment (temp int)
-0:37                  'c' (global int)
-0:31          Loop Terminal Expression
-0:31          Pre-Increment (temp int)
-0:31            'i' (temp int)
-0:41      Branch: Return
-0:43      Pre-Increment (temp int)
-0:43        'c' (global int)
-0:46  Function Definition: foo( (global int)
-0:46    Function Parameters: 
-0:48    Sequence
-0:48      Test condition and select (temp void)
-0:48        Condition
-0:48        Compare Greater Than (temp bool)
-0:48          'c' (global int)
-0:48          Constant:
-0:48            4 (const int)
-0:48        true case
-0:49        Sequence
-0:49          Branch: Return with expression
-0:49            Constant:
-0:49              4 (const int)
-0:50          Pre-Increment (temp int)
-0:50            'c' (global int)
-0:53      Branch: Return with expression
-0:53        Constant:
-0:53          5 (const int)
-0:55      Pre-Increment (temp int)
-0:55        'c' (global int)
 0:?   Linker Objects
 0:?     'flag' (const bool)
 0:?       false (const bool)
diff --git a/Test/baseResults/functionSemantics.frag.out b/Test/baseResults/functionSemantics.frag.out
index 1ea7dbd..e0fd076 100644
--- a/Test/baseResults/functionSemantics.frag.out
+++ b/Test/baseResults/functionSemantics.frag.out
@@ -397,19 +397,6 @@
 0:62        Construct vec4 (temp 4-component vector of float)
 0:62          Convert int to float (temp float)
 0:62            'color' (temp int)
-0:66  Function Definition: aggCall( (global void)
-0:66    Function Parameters: 
-0:?     Sequence
-0:69      Function Call: m(vf2; (global 3-component vector of float)
-0:69        Convert int to float (temp 2-component vector of float)
-0:69          Construct ivec2 (temp 2-component vector of int)
-0:69            Convert float to int (temp int)
-0:69              'F' (temp float)
-0:72  Function Definition: badConv( (global 4-component vector of float)
-0:72    Function Parameters: 
-0:74    Sequence
-0:74      Branch: Return with expression
-0:74        'u' (uniform float)
 0:?   Linker Objects
 0:?     'u' (uniform float)
 
diff --git a/Test/baseResults/glspv.esversion.vert.out b/Test/baseResults/glspv.esversion.vert.out
index ef406a1..8e4b3b8 100755
--- a/Test/baseResults/glspv.esversion.vert.out
+++ b/Test/baseResults/glspv.esversion.vert.out
@@ -4,8 +4,4 @@
 ERROR: 1 compilation errors.  No code generated.
 
 
-
-Linked vertex stage:
-
-
 SPIR-V is not generated for failed compile or link
diff --git a/Test/baseResults/glspv.frag.out b/Test/baseResults/glspv.frag.out
index 5df46c5..daa1dc1 100755
--- a/Test/baseResults/glspv.frag.out
+++ b/Test/baseResults/glspv.frag.out
@@ -6,8 +6,4 @@
 ERROR: 4 compilation errors.  No code generated.
 
 
-
-Linked fragment stage:
-
-
 SPIR-V is not generated for failed compile or link
diff --git a/Test/baseResults/glspv.version.frag.out b/Test/baseResults/glspv.version.frag.out
index 7f44889..3e8e8c4 100755
--- a/Test/baseResults/glspv.version.frag.out
+++ b/Test/baseResults/glspv.version.frag.out
@@ -1,10 +1,6 @@
 glspv.version.frag
 ERROR: #version: compilation for SPIR-V does not support the compatibility profile
 
-
-Linked fragment stage:
-
-
 // Module Version 10000
 // Generated by (magic number): 80001
 // Id's are bound by 6
diff --git a/Test/baseResults/glspv.version.vert.out b/Test/baseResults/glspv.version.vert.out
index eb003df..9683b3b 100755
--- a/Test/baseResults/glspv.version.vert.out
+++ b/Test/baseResults/glspv.version.vert.out
@@ -3,8 +3,4 @@
 ERROR: 1 compilation errors.  No code generated.
 
 
-
-Linked vertex stage:
-
-
 SPIR-V is not generated for failed compile or link
diff --git a/Test/baseResults/glspv.vert.out b/Test/baseResults/glspv.vert.out
index b91ab50..5f6d9bb 100755
--- a/Test/baseResults/glspv.vert.out
+++ b/Test/baseResults/glspv.vert.out
@@ -11,8 +11,4 @@
 ERROR: 8 compilation errors.  No code generated.
 
 
-
-Linked vertex stage:
-
-
 SPIR-V is not generated for failed compile or link
diff --git a/Test/baseResults/hlsl.amend.frag.out b/Test/baseResults/hlsl.amend.frag.out
index 1be5906..44d7655 100755
--- a/Test/baseResults/hlsl.amend.frag.out
+++ b/Test/baseResults/hlsl.amend.frag.out
@@ -58,7 +58,7 @@
 0:25          Constant:
 0:25            0 (const uint)
 0:?   Linker Objects
-0:?     'anon@0' (uniform block{layout(offset=0 ) uniform 4-component vector of float a, layout(offset=16 ) uniform float b, layout(offset=32 ) uniform 3-component vector of float c, layout(offset=44 ) uniform int d, uniform int e})
+0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of float a, layout(offset=16 ) uniform float b, layout(offset=32 ) uniform 3-component vector of float c, layout(offset=44 ) uniform int d, uniform int e})
 
 
 Linked fragment stage:
@@ -123,7 +123,7 @@
 0:25          Constant:
 0:25            0 (const uint)
 0:?   Linker Objects
-0:?     'anon@0' (uniform block{layout(offset=0 ) uniform 4-component vector of float a, layout(offset=16 ) uniform float b, layout(offset=32 ) uniform 3-component vector of float c, layout(offset=44 ) uniform int d, uniform int e})
+0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of float a, layout(offset=16 ) uniform float b, layout(offset=32 ) uniform 3-component vector of float c, layout(offset=44 ) uniform int d, uniform int e})
 
 // Module Version 10000
 // Generated by (magic number): 80001
diff --git a/Test/baseResults/hlsl.array.flatten.frag.out b/Test/baseResults/hlsl.array.flatten.frag.out
index cbfb0ef..74a348a 100644
--- a/Test/baseResults/hlsl.array.flatten.frag.out
+++ b/Test/baseResults/hlsl.array.flatten.frag.out
@@ -138,6 +138,7 @@
 0:?                   'g_samp[2]' (uniform sampler)
 0:37              'aggShadow' (temp 3-element array of sampler)
 0:?   Linker Objects
+0:?     'color' (layout(location=0 ) out 4-component vector of float)
 0:?     'g_tex[0]' (uniform texture1D)
 0:?     'g_tex[1]' (uniform texture1D)
 0:?     'g_tex[2]' (uniform texture1D)
@@ -150,9 +151,8 @@
 0:?     'g_samp_explicit[0]' (layout(binding=5 ) uniform sampler)
 0:?     'g_samp_explicit[1]' (layout(binding=6 ) uniform sampler)
 0:?     'g_samp_explicit[2]' (layout(binding=7 ) uniform sampler)
-0:?     'anon@0' (uniform block{layout(offset=0 ) uniform 4-element array of 3X3 matrix of float g_mats, layout(binding=10 offset=192 ) uniform 4-element array of 3X3 matrix of float g_mats_explicit, layout(offset=384 ) uniform 4-element array of float g_floats})
+0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-element array of 3X3 matrix of float g_mats, layout(binding=10 offset=192 ) uniform 4-element array of 3X3 matrix of float g_mats_explicit, layout(offset=384 ) uniform 4-element array of float g_floats})
 0:?     'not_flattened_a' (global 5-element array of int)
-0:?     'color' (layout(location=0 ) out 4-component vector of float)
 
 
 Linked fragment stage:
@@ -297,6 +297,7 @@
 0:?                   'g_samp[2]' (uniform sampler)
 0:37              'aggShadow' (temp 3-element array of sampler)
 0:?   Linker Objects
+0:?     'color' (layout(location=0 ) out 4-component vector of float)
 0:?     'g_tex[0]' (uniform texture1D)
 0:?     'g_tex[1]' (uniform texture1D)
 0:?     'g_tex[2]' (uniform texture1D)
@@ -309,9 +310,8 @@
 0:?     'g_samp_explicit[0]' (layout(binding=5 ) uniform sampler)
 0:?     'g_samp_explicit[1]' (layout(binding=6 ) uniform sampler)
 0:?     'g_samp_explicit[2]' (layout(binding=7 ) uniform sampler)
-0:?     'anon@0' (uniform block{layout(offset=0 ) uniform 4-element array of 3X3 matrix of float g_mats, layout(binding=10 offset=192 ) uniform 4-element array of 3X3 matrix of float g_mats_explicit, layout(offset=384 ) uniform 4-element array of float g_floats})
+0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-element array of 3X3 matrix of float g_mats, layout(binding=10 offset=192 ) uniform 4-element array of 3X3 matrix of float g_mats_explicit, layout(offset=384 ) uniform 4-element array of float g_floats})
 0:?     'not_flattened_a' (global 5-element array of int)
-0:?     'color' (layout(location=0 ) out 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
diff --git a/Test/baseResults/hlsl.array.frag.out b/Test/baseResults/hlsl.array.frag.out
index 00aedb3..e04a5e8 100755
--- a/Test/baseResults/hlsl.array.frag.out
+++ b/Test/baseResults/hlsl.array.frag.out
@@ -57,9 +57,9 @@
 0:10        Branch: Return
 0:?   Linker Objects
 0:?     '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
-0:?     'anon@0' (uniform block{layout(offset=0 ) uniform 4-element array of 4-component vector of float a, layout(offset=64 ) uniform 11-element array of structure{temp 7-element array of 4-component vector of float m} s})
 0:?     'i' (layout(location=0 ) in int)
 0:?     'input' (layout(location=1 ) in 3-element array of 4-component vector of float)
+0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-element array of 4-component vector of float a, layout(offset=64 ) uniform 11-element array of structure{temp 7-element array of 4-component vector of float m} s})
 
 
 Linked fragment stage:
@@ -123,9 +123,9 @@
 0:10        Branch: Return
 0:?   Linker Objects
 0:?     '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
-0:?     'anon@0' (uniform block{layout(offset=0 ) uniform 4-element array of 4-component vector of float a, layout(offset=64 ) uniform 11-element array of structure{temp 7-element array of 4-component vector of float m} s})
 0:?     'i' (layout(location=0 ) in int)
 0:?     'input' (layout(location=1 ) in 3-element array of 4-component vector of float)
+0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-element array of 4-component vector of float a, layout(offset=64 ) uniform 11-element array of structure{temp 7-element array of 4-component vector of float m} s})
 
 // Module Version 10000
 // Generated by (magic number): 80001
diff --git a/Test/baseResults/hlsl.array.implicit-size.frag.out b/Test/baseResults/hlsl.array.implicit-size.frag.out
index d8e0ed8..5674cb4 100644
--- a/Test/baseResults/hlsl.array.implicit-size.frag.out
+++ b/Test/baseResults/hlsl.array.implicit-size.frag.out
@@ -81,6 +81,7 @@
 
 Linked fragment stage:
 
+WARNING: Linking fragment stage: Entry point not found
 
 Shader version: 450
 gl_FragCoord origin is upper left
@@ -234,6 +235,7 @@
                               Store 18(g_array) 24
                               Store 28(g_array_unused) 31
                               Store 37(g_mystruct) 42
+                              Return
                               FunctionEnd
 12(main(struct-PS_OUTPUT-vf41;):           2 Function None 10
    11(ps_output):      9(ptr) FunctionParameter
diff --git a/Test/baseResults/hlsl.array.multidim.frag.out b/Test/baseResults/hlsl.array.multidim.frag.out
index a2df1a8..66890b5 100644
--- a/Test/baseResults/hlsl.array.multidim.frag.out
+++ b/Test/baseResults/hlsl.array.multidim.frag.out
@@ -59,7 +59,7 @@
 0:19        Branch: Return
 0:?   Linker Objects
 0:?     'Color' (layout(location=0 ) out 4-component vector of float)
-0:?     'anon@0' (uniform block{layout(offset=0 ) uniform 5-element array of 4-element array of 3-element array of float float_array})
+0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 5-element array of 4-element array of 3-element array of float float_array})
 
 
 Linked fragment stage:
@@ -125,7 +125,7 @@
 0:19        Branch: Return
 0:?   Linker Objects
 0:?     'Color' (layout(location=0 ) out 4-component vector of float)
-0:?     'anon@0' (uniform block{layout(offset=0 ) uniform 5-element array of 4-element array of 3-element array of float float_array})
+0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 5-element array of 4-element array of 3-element array of float float_array})
 
 // Module Version 10000
 // Generated by (magic number): 80001
diff --git a/Test/baseResults/hlsl.attribute.expression.comp.out b/Test/baseResults/hlsl.attribute.expression.comp.out
new file mode 100644
index 0000000..2316cd9
--- /dev/null
+++ b/Test/baseResults/hlsl.attribute.expression.comp.out
@@ -0,0 +1,138 @@
+hlsl.attribute.expression.comp
+Shader version: 450
+local_size = (4, 6, 8)
+0:? Sequence
+0:9  Function Definition: main( (temp 4-component vector of float)
+0:9    Function Parameters: 
+0:?     Sequence
+0:11      Sequence
+0:11        move second child to first child (temp int)
+0:11          'x' (temp int)
+0:11          Constant:
+0:11            0 (const int)
+0:11        Loop with condition tested first
+0:11          Loop Condition
+0:11          Compare Less Than (temp bool)
+0:11            'x' (temp int)
+0:11            bound: direct index for structure (layout(offset=0 ) uniform int)
+0:11              'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int bound})
+0:11              Constant:
+0:11                0 (const uint)
+0:11          No loop body
+0:11          Loop Terminal Expression
+0:11          Pre-Increment (temp int)
+0:11            'x' (temp int)
+0:14      Sequence
+0:14        move second child to first child (temp 4-component vector of float)
+0:?           '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
+0:?           Constant:
+0:?             0.000000
+0:?             0.000000
+0:?             0.000000
+0:?             0.000000
+0:14        Branch: Return
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
+0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int bound})
+
+
+Linked compute stage:
+
+
+Shader version: 450
+local_size = (4, 6, 8)
+0:? Sequence
+0:9  Function Definition: main( (temp 4-component vector of float)
+0:9    Function Parameters: 
+0:?     Sequence
+0:11      Sequence
+0:11        move second child to first child (temp int)
+0:11          'x' (temp int)
+0:11          Constant:
+0:11            0 (const int)
+0:11        Loop with condition tested first
+0:11          Loop Condition
+0:11          Compare Less Than (temp bool)
+0:11            'x' (temp int)
+0:11            bound: direct index for structure (layout(offset=0 ) uniform int)
+0:11              'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int bound})
+0:11              Constant:
+0:11                0 (const uint)
+0:11          No loop body
+0:11          Loop Terminal Expression
+0:11          Pre-Increment (temp int)
+0:11            'x' (temp int)
+0:14      Sequence
+0:14        move second child to first child (temp 4-component vector of float)
+0:?           '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
+0:?           Constant:
+0:?             0.000000
+0:?             0.000000
+0:?             0.000000
+0:?             0.000000
+0:14        Branch: Return
+0:?   Linker Objects
+0:?     '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
+0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int bound})
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 34
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint GLCompute 4  "main" 30
+                              ExecutionMode 4 LocalSize 4 6 8
+                              Name 4  "main"
+                              Name 8  "x"
+                              Name 16  "$Global"
+                              MemberName 16($Global) 0  "bound"
+                              Name 18  ""
+                              Name 30  "@entryPointOutput"
+                              MemberDecorate 16($Global) 0 Offset 0
+                              Decorate 16($Global) Block
+                              Decorate 18 DescriptorSet 0
+                              Decorate 30(@entryPointOutput) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeInt 32 1
+               7:             TypePointer Function 6(int)
+               9:      6(int) Constant 0
+     16($Global):             TypeStruct 6(int)
+              17:             TypePointer Uniform 16($Global)
+              18:     17(ptr) Variable Uniform
+              19:             TypePointer Uniform 6(int)
+              22:             TypeBool
+              25:      6(int) Constant 1
+              27:             TypeFloat 32
+              28:             TypeVector 27(float) 4
+              29:             TypePointer Output 28(fvec4)
+30(@entryPointOutput):     29(ptr) Variable Output
+              31:   27(float) Constant 0
+              32:   28(fvec4) ConstantComposite 31 31 31 31
+         4(main):           2 Function None 3
+               5:             Label
+            8(x):      7(ptr) Variable Function
+                              Store 8(x) 9
+                              Branch 10
+              10:             Label
+                              LoopMerge 12 13 None
+                              Branch 14
+              14:             Label
+              15:      6(int) Load 8(x)
+              20:     19(ptr) AccessChain 18 9
+              21:      6(int) Load 20
+              23:    22(bool) SLessThan 15 21
+                              BranchConditional 23 11 12
+              11:               Label
+                                Branch 13
+              13:               Label
+              24:      6(int)   Load 8(x)
+              26:      6(int)   IAdd 24 25
+                                Store 8(x) 26
+                                Branch 10
+              12:             Label
+                              Store 30(@entryPointOutput) 32
+                              Return
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.basic.comp.out b/Test/baseResults/hlsl.basic.comp.out
index c6dc3e5..9101e22 100755
--- a/Test/baseResults/hlsl.basic.comp.out
+++ b/Test/baseResults/hlsl.basic.comp.out
@@ -8,8 +8,8 @@
 0:?     Sequence
 0:5      'dti' (in int LocalInvocationID)
 0:?   Linker Objects
-0:?     'a' (shared 100-element array of 4-component vector of float)
 0:?     'dti' (in int LocalInvocationID)
+0:?     'a' (shared 100-element array of 4-component vector of float)
 
 
 Linked compute stage:
@@ -24,8 +24,8 @@
 0:?     Sequence
 0:5      'dti' (in int LocalInvocationID)
 0:?   Linker Objects
-0:?     'a' (shared 100-element array of 4-component vector of float)
 0:?     'dti' (in int LocalInvocationID)
+0:?     'a' (shared 100-element array of 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
diff --git a/Test/baseResults/hlsl.basic.geom.out b/Test/baseResults/hlsl.basic.geom.out
new file mode 100644
index 0000000..2c20b43
--- /dev/null
+++ b/Test/baseResults/hlsl.basic.geom.out
@@ -0,0 +1,201 @@
+hlsl.basic.geom
+Shader version: 450
+invocations = -1
+max_vertices = 4
+input primitive = triangles
+output primitive = line_strip
+0:? Sequence
+0:16  Function Definition: main(u1[3];u1[3];struct-PSInput-f1-i11; (temp void)
+0:16    Function Parameters: 
+0:16      'VertexID' (layout(location=0 ) in 3-element array of uint)
+0:16      'test' (layout(location=3 ) in 3-element array of uint)
+0:16      'OutputStream' (out structure{temp float myfloat, temp int something})
+0:?     Sequence
+0:19      move second child to first child (temp float)
+0:19        myfloat: direct index for structure (temp float)
+0:19          'Vert' (temp structure{temp float myfloat, temp int something})
+0:19          Constant:
+0:19            0 (const int)
+0:19        Convert uint to float (temp float)
+0:19          add (temp uint)
+0:19            add (temp uint)
+0:19              direct index (layout(location=3 ) temp uint)
+0:19                'test' (layout(location=3 ) in 3-element array of uint)
+0:19                Constant:
+0:19                  0 (const int)
+0:19              direct index (layout(location=3 ) temp uint)
+0:19                'test' (layout(location=3 ) in 3-element array of uint)
+0:19                Constant:
+0:19                  1 (const int)
+0:19            direct index (layout(location=3 ) temp uint)
+0:19              'test' (layout(location=3 ) in 3-element array of uint)
+0:19              Constant:
+0:19                2 (const int)
+0:20      move second child to first child (temp int)
+0:20        something: direct index for structure (temp int)
+0:20          'Vert' (temp structure{temp float myfloat, temp int something})
+0:20          Constant:
+0:20            1 (const int)
+0:20        Convert uint to int (temp int)
+0:20          direct index (layout(location=0 ) temp uint)
+0:20            'VertexID' (layout(location=0 ) in 3-element array of uint)
+0:20            Constant:
+0:20              0 (const int)
+0:22      Sequence
+0:22        move second child to first child (temp structure{temp float myfloat, temp int something})
+0:22          'OutputStream' (out structure{temp float myfloat, temp int something})
+0:22          'Vert' (temp structure{temp float myfloat, temp int something})
+0:22        EmitVertex (temp void)
+0:23      Sequence
+0:23        move second child to first child (temp structure{temp float myfloat, temp int something})
+0:23          'OutputStream' (out structure{temp float myfloat, temp int something})
+0:23          'Vert' (temp structure{temp float myfloat, temp int something})
+0:23        EmitVertex (temp void)
+0:24      EndPrimitive (temp void)
+0:?   Linker Objects
+0:?     'VertexID' (layout(location=0 ) in 3-element array of uint)
+0:?     'test' (layout(location=3 ) in 3-element array of uint)
+0:?     'myfloat' (layout(location=0 ) out float)
+0:?     'something' (layout(location=1 ) out int)
+
+
+Linked geometry stage:
+
+
+Shader version: 450
+invocations = 1
+max_vertices = 4
+input primitive = triangles
+output primitive = line_strip
+0:? Sequence
+0:16  Function Definition: main(u1[3];u1[3];struct-PSInput-f1-i11; (temp void)
+0:16    Function Parameters: 
+0:16      'VertexID' (layout(location=0 ) in 3-element array of uint)
+0:16      'test' (layout(location=3 ) in 3-element array of uint)
+0:16      'OutputStream' (out structure{temp float myfloat, temp int something})
+0:?     Sequence
+0:19      move second child to first child (temp float)
+0:19        myfloat: direct index for structure (temp float)
+0:19          'Vert' (temp structure{temp float myfloat, temp int something})
+0:19          Constant:
+0:19            0 (const int)
+0:19        Convert uint to float (temp float)
+0:19          add (temp uint)
+0:19            add (temp uint)
+0:19              direct index (layout(location=3 ) temp uint)
+0:19                'test' (layout(location=3 ) in 3-element array of uint)
+0:19                Constant:
+0:19                  0 (const int)
+0:19              direct index (layout(location=3 ) temp uint)
+0:19                'test' (layout(location=3 ) in 3-element array of uint)
+0:19                Constant:
+0:19                  1 (const int)
+0:19            direct index (layout(location=3 ) temp uint)
+0:19              'test' (layout(location=3 ) in 3-element array of uint)
+0:19              Constant:
+0:19                2 (const int)
+0:20      move second child to first child (temp int)
+0:20        something: direct index for structure (temp int)
+0:20          'Vert' (temp structure{temp float myfloat, temp int something})
+0:20          Constant:
+0:20            1 (const int)
+0:20        Convert uint to int (temp int)
+0:20          direct index (layout(location=0 ) temp uint)
+0:20            'VertexID' (layout(location=0 ) in 3-element array of uint)
+0:20            Constant:
+0:20              0 (const int)
+0:22      Sequence
+0:22        move second child to first child (temp structure{temp float myfloat, temp int something})
+0:22          'OutputStream' (out structure{temp float myfloat, temp int something})
+0:22          'Vert' (temp structure{temp float myfloat, temp int something})
+0:22        EmitVertex (temp void)
+0:23      Sequence
+0:23        move second child to first child (temp structure{temp float myfloat, temp int something})
+0:23          'OutputStream' (out structure{temp float myfloat, temp int something})
+0:23          'Vert' (temp structure{temp float myfloat, temp int something})
+0:23        EmitVertex (temp void)
+0:24      EndPrimitive (temp void)
+0:?   Linker Objects
+0:?     'VertexID' (layout(location=0 ) in 3-element array of uint)
+0:?     'test' (layout(location=3 ) in 3-element array of uint)
+0:?     'myfloat' (layout(location=0 ) out float)
+0:?     'something' (layout(location=1 ) out int)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 45
+
+                              Capability Geometry
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Geometry 4  "main" 16 31 38 42 44
+                              ExecutionMode 4 Triangles
+                              ExecutionMode 4 Invocations 1
+                              ExecutionMode 4 OutputLineStrip
+                              ExecutionMode 4 OutputVertices 4
+                              Name 4  "main"
+                              Name 8  "PSInput"
+                              MemberName 8(PSInput) 0  "myfloat"
+                              MemberName 8(PSInput) 1  "something"
+                              Name 10  "Vert"
+                              Name 16  "test"
+                              Name 31  "VertexID"
+                              Name 38  "OutputStream"
+                              Name 42  "myfloat"
+                              Name 44  "something"
+                              Decorate 16(test) Location 3
+                              Decorate 31(VertexID) Location 0
+                              Decorate 42(myfloat) Location 0
+                              Decorate 44(something) Location 1
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeInt 32 1
+      8(PSInput):             TypeStruct 6(float) 7(int)
+               9:             TypePointer Function 8(PSInput)
+              11:      7(int) Constant 0
+              12:             TypeInt 32 0
+              13:     12(int) Constant 3
+              14:             TypeArray 12(int) 13
+              15:             TypePointer Input 14
+        16(test):     15(ptr) Variable Input
+              17:             TypePointer Input 12(int)
+              20:      7(int) Constant 1
+              24:      7(int) Constant 2
+              29:             TypePointer Function 6(float)
+    31(VertexID):     15(ptr) Variable Input
+              35:             TypePointer Function 7(int)
+              37:             TypePointer Output 8(PSInput)
+38(OutputStream):     37(ptr) Variable Output
+              41:             TypePointer Output 6(float)
+     42(myfloat):     41(ptr) Variable Output
+              43:             TypePointer Output 7(int)
+   44(something):     43(ptr) Variable Output
+         4(main):           2 Function None 3
+               5:             Label
+        10(Vert):      9(ptr) Variable Function
+              18:     17(ptr) AccessChain 16(test) 11
+              19:     12(int) Load 18
+              21:     17(ptr) AccessChain 16(test) 20
+              22:     12(int) Load 21
+              23:     12(int) IAdd 19 22
+              25:     17(ptr) AccessChain 16(test) 24
+              26:     12(int) Load 25
+              27:     12(int) IAdd 23 26
+              28:    6(float) ConvertUToF 27
+              30:     29(ptr) AccessChain 10(Vert) 11
+                              Store 30 28
+              32:     17(ptr) AccessChain 31(VertexID) 11
+              33:     12(int) Load 32
+              34:      7(int) Bitcast 33
+              36:     35(ptr) AccessChain 10(Vert) 20
+                              Store 36 34
+              39:  8(PSInput) Load 10(Vert)
+                              Store 38(OutputStream) 39
+                              EmitVertex
+              40:  8(PSInput) Load 10(Vert)
+                              Store 38(OutputStream) 40
+                              EmitVertex
+                              EndPrimitive
+                              Return
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.buffer.frag.out b/Test/baseResults/hlsl.buffer.frag.out
index 2eb1f9c..dbb2b5e 100755
--- a/Test/baseResults/hlsl.buffer.frag.out
+++ b/Test/baseResults/hlsl.buffer.frag.out
@@ -32,12 +32,12 @@
 0:31                0 (const uint)
 0:31        Branch: Return
 0:?   Linker Objects
+0:?     '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
+0:?     'input' (layout(location=0 ) in 4-component vector of float)
 0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(row_major std140 ) uniform 4-component vector of float v1})
 0:?     'anon@1' (layout(row_major std430 ) buffer block{layout(row_major std430 ) buffer 4-component vector of float v2})
 0:?     'anon@2' (layout(set=10 binding=2 row_major std140 ) uniform block{layout(row_major std140 ) uniform 4-component vector of float v3, layout(row_major std140 offset=20 ) uniform int i3})
 0:?     'anon@3' (layout(binding=8 row_major std430 ) buffer block{layout(row_major std430 offset=16 ) buffer 4-component vector of float v4, layout(row_major std430 offset=48 ) buffer int i4, layout(row_major std430 offset=60 ) buffer float f1, layout(row_major std430 offset=64 ) buffer float f3, layout(row_major std430 offset=68 ) buffer float f4, layout(row_major std430 offset=72 ) buffer float f5, layout(row_major std430 ) buffer float f6, layout(row_major std430 ) buffer float f7, layout(row_major std430 ) buffer 3X4 matrix of float m1, layout(column_major std430 ) buffer 3X4 matrix of float m2, layout(row_major std430 ) buffer 3X4 matrix of float m3, ...})
-0:?     '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
-0:?     'input' (layout(location=0 ) in 4-component vector of float)
 
 
 Linked fragment stage:
@@ -76,12 +76,12 @@
 0:31                0 (const uint)
 0:31        Branch: Return
 0:?   Linker Objects
+0:?     '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
+0:?     'input' (layout(location=0 ) in 4-component vector of float)
 0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(row_major std140 ) uniform 4-component vector of float v1})
 0:?     'anon@1' (layout(row_major std430 ) buffer block{layout(row_major std430 ) buffer 4-component vector of float v2})
 0:?     'anon@2' (layout(set=10 binding=2 row_major std140 ) uniform block{layout(row_major std140 ) uniform 4-component vector of float v3, layout(row_major std140 offset=20 ) uniform int i3})
 0:?     'anon@3' (layout(binding=8 row_major std430 ) buffer block{layout(row_major std430 offset=16 ) buffer 4-component vector of float v4, layout(row_major std430 offset=48 ) buffer int i4, layout(row_major std430 offset=60 ) buffer float f1, layout(row_major std430 offset=64 ) buffer float f3, layout(row_major std430 offset=68 ) buffer float f4, layout(row_major std430 offset=72 ) buffer float f5, layout(row_major std430 ) buffer float f6, layout(row_major std430 ) buffer float f7, layout(row_major std430 ) buffer 3X4 matrix of float m1, layout(column_major std430 ) buffer 3X4 matrix of float m2, layout(row_major std430 ) buffer 3X4 matrix of float m3, ...})
-0:?     '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
-0:?     'input' (layout(location=0 ) in 4-component vector of float)
 
 // Module Version 10000
 // Generated by (magic number): 80001
diff --git a/Test/baseResults/hlsl.calculatelod.dx10.frag.out b/Test/baseResults/hlsl.calculatelod.dx10.frag.out
index ff18441..56a2ce8 100644
--- a/Test/baseResults/hlsl.calculatelod.dx10.frag.out
+++ b/Test/baseResults/hlsl.calculatelod.dx10.frag.out
@@ -155,6 +155,8 @@
 0:43                1 (const int)
 0:43        Branch: Return
 0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'Depth' (out float FragDepth)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_tTex1df4a' (layout(binding=1 ) uniform texture1DArray)
 0:?     'g_tTex1df4' (layout(binding=0 ) uniform texture1DArray)
@@ -166,8 +168,6 @@
 0:?     'g_tTexcdf4a' (uniform textureCubeArray)
 0:?     'g_tTexcdi4a' (uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' (uniform utextureCubeArray)
-0:?     'Color' (layout(location=0 ) out 4-component vector of float)
-0:?     'Depth' (out float FragDepth)
 
 
 Linked fragment stage:
@@ -329,6 +329,8 @@
 0:43                1 (const int)
 0:43        Branch: Return
 0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'Depth' (out float FragDepth)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_tTex1df4a' (layout(binding=1 ) uniform texture1DArray)
 0:?     'g_tTex1df4' (layout(binding=0 ) uniform texture1DArray)
@@ -340,8 +342,6 @@
 0:?     'g_tTexcdf4a' (uniform textureCubeArray)
 0:?     'g_tTexcdi4a' (uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' (uniform utextureCubeArray)
-0:?     'Color' (layout(location=0 ) out 4-component vector of float)
-0:?     'Depth' (out float FragDepth)
 
 // Module Version 10000
 // Generated by (magic number): 80001
diff --git a/Test/baseResults/hlsl.calculatelodunclamped.dx10.frag.out b/Test/baseResults/hlsl.calculatelodunclamped.dx10.frag.out
index ecd1f0d..799dcc3 100644
--- a/Test/baseResults/hlsl.calculatelodunclamped.dx10.frag.out
+++ b/Test/baseResults/hlsl.calculatelodunclamped.dx10.frag.out
@@ -167,6 +167,8 @@
 0:43                1 (const int)
 0:43        Branch: Return
 0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'Depth' (out float FragDepth)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_tTex1df4a' (layout(binding=1 ) uniform texture1DArray)
 0:?     'g_tTex1df4' (layout(binding=0 ) uniform texture1DArray)
@@ -178,8 +180,6 @@
 0:?     'g_tTexcdf4a' (uniform textureCubeArray)
 0:?     'g_tTexcdi4a' (uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' (uniform utextureCubeArray)
-0:?     'Color' (layout(location=0 ) out 4-component vector of float)
-0:?     'Depth' (out float FragDepth)
 
 
 Linked fragment stage:
@@ -341,6 +341,8 @@
 0:43                1 (const int)
 0:43        Branch: Return
 0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'Depth' (out float FragDepth)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_tTex1df4a' (layout(binding=1 ) uniform texture1DArray)
 0:?     'g_tTex1df4' (layout(binding=0 ) uniform texture1DArray)
@@ -352,7 +354,5 @@
 0:?     'g_tTexcdf4a' (uniform textureCubeArray)
 0:?     'g_tTexcdi4a' (uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' (uniform utextureCubeArray)
-0:?     'Color' (layout(location=0 ) out 4-component vector of float)
-0:?     'Depth' (out float FragDepth)
 
 SPIR-V is not generated for failed compile or link
diff --git a/Test/baseResults/hlsl.comparison.vec.frag.out b/Test/baseResults/hlsl.comparison.vec.frag.out
new file mode 100644
index 0000000..1bf63ec
--- /dev/null
+++ b/Test/baseResults/hlsl.comparison.vec.frag.out
@@ -0,0 +1,402 @@
+hlsl.comparison.vec.frag
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:4  Function Definition: Bug1(vf4; (temp void)
+0:4    Function Parameters: 
+0:4      'a' (in 4-component vector of float)
+0:?     Sequence
+0:5      Sequence
+0:5        move second child to first child (temp 4-component vector of float)
+0:5          'v04' (temp 4-component vector of float)
+0:?           Constant:
+0:?             0.000000
+0:?             0.000000
+0:?             0.000000
+0:?             0.000000
+0:6      Sequence
+0:6        move second child to first child (temp float)
+0:6          'v01' (temp float)
+0:6          Constant:
+0:6            0.000000
+0:8      Sequence
+0:8        move second child to first child (temp 4-component vector of bool)
+0:8          'r00' (temp 4-component vector of bool)
+0:8          Equal (temp 4-component vector of bool)
+0:8            'a' (in 4-component vector of float)
+0:8            'v04' (temp 4-component vector of float)
+0:9      Sequence
+0:9        move second child to first child (temp 4-component vector of bool)
+0:9          'r01' (temp 4-component vector of bool)
+0:9          NotEqual (temp 4-component vector of bool)
+0:9            'a' (in 4-component vector of float)
+0:9            'v04' (temp 4-component vector of float)
+0:10      Sequence
+0:10        move second child to first child (temp 4-component vector of bool)
+0:10          'r02' (temp 4-component vector of bool)
+0:10          Compare Less Than (temp 4-component vector of bool)
+0:10            'a' (in 4-component vector of float)
+0:10            'v04' (temp 4-component vector of float)
+0:11      Sequence
+0:11        move second child to first child (temp 4-component vector of bool)
+0:11          'r03' (temp 4-component vector of bool)
+0:11          Compare Greater Than (temp 4-component vector of bool)
+0:11            'a' (in 4-component vector of float)
+0:11            'v04' (temp 4-component vector of float)
+0:13      Sequence
+0:13        move second child to first child (temp 4-component vector of bool)
+0:13          'r10' (temp 4-component vector of bool)
+0:13          Equal (temp 4-component vector of bool)
+0:13            'a' (in 4-component vector of float)
+0:13            Construct vec4 (in 4-component vector of float)
+0:13              'v01' (temp float)
+0:14      Sequence
+0:14        move second child to first child (temp 4-component vector of bool)
+0:14          'r11' (temp 4-component vector of bool)
+0:14          NotEqual (temp 4-component vector of bool)
+0:14            'a' (in 4-component vector of float)
+0:14            Construct vec4 (in 4-component vector of float)
+0:14              'v01' (temp float)
+0:15      Sequence
+0:15        move second child to first child (temp 4-component vector of bool)
+0:15          'r12' (temp 4-component vector of bool)
+0:15          Compare Less Than (temp 4-component vector of bool)
+0:15            'a' (in 4-component vector of float)
+0:15            Construct vec4 (in 4-component vector of float)
+0:15              'v01' (temp float)
+0:16      Sequence
+0:16        move second child to first child (temp 4-component vector of bool)
+0:16          'r13' (temp 4-component vector of bool)
+0:16          Compare Greater Than (temp 4-component vector of bool)
+0:16            'a' (in 4-component vector of float)
+0:16            Construct vec4 (in 4-component vector of float)
+0:16              'v01' (temp float)
+0:18      Sequence
+0:18        move second child to first child (temp 4-component vector of bool)
+0:18          'r20' (temp 4-component vector of bool)
+0:18          Equal (temp 4-component vector of bool)
+0:18            Construct vec4 (in 4-component vector of float)
+0:18              'v01' (temp float)
+0:18            'a' (in 4-component vector of float)
+0:19      Sequence
+0:19        move second child to first child (temp 4-component vector of bool)
+0:19          'r21' (temp 4-component vector of bool)
+0:19          NotEqual (temp 4-component vector of bool)
+0:19            Construct vec4 (in 4-component vector of float)
+0:19              'v01' (temp float)
+0:19            'a' (in 4-component vector of float)
+0:20      Sequence
+0:20        move second child to first child (temp 4-component vector of bool)
+0:20          'r22' (temp 4-component vector of bool)
+0:20          Compare Less Than (temp 4-component vector of bool)
+0:20            Construct vec4 (in 4-component vector of float)
+0:20              'v01' (temp float)
+0:20            'a' (in 4-component vector of float)
+0:21      Sequence
+0:21        move second child to first child (temp 4-component vector of bool)
+0:21          'r23' (temp 4-component vector of bool)
+0:21          Compare Greater Than (temp 4-component vector of bool)
+0:21            Construct vec4 (in 4-component vector of float)
+0:21              'v01' (temp float)
+0:21            'a' (in 4-component vector of float)
+0:30  Function Definition: main( (temp structure{temp 4-component vector of float Color})
+0:30    Function Parameters: 
+0:?     Sequence
+0:32      move second child to first child (temp 4-component vector of float)
+0:32        Color: direct index for structure (temp 4-component vector of float)
+0:32          'psout' (temp structure{temp 4-component vector of float Color})
+0:32          Constant:
+0:32            0 (const int)
+0:32        Constant:
+0:32          0.000000
+0:32          0.000000
+0:32          0.000000
+0:32          0.000000
+0:33      Sequence
+0:33        Sequence
+0:33          move second child to first child (temp 4-component vector of float)
+0:?             'Color' (layout(location=0 ) out 4-component vector of float)
+0:33            Color: direct index for structure (temp 4-component vector of float)
+0:33              'psout' (temp structure{temp 4-component vector of float Color})
+0:33              Constant:
+0:33                0 (const int)
+0:33        Branch: Return
+0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of float uf4})
+
+
+Linked fragment stage:
+
+
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:4  Function Definition: Bug1(vf4; (temp void)
+0:4    Function Parameters: 
+0:4      'a' (in 4-component vector of float)
+0:?     Sequence
+0:5      Sequence
+0:5        move second child to first child (temp 4-component vector of float)
+0:5          'v04' (temp 4-component vector of float)
+0:?           Constant:
+0:?             0.000000
+0:?             0.000000
+0:?             0.000000
+0:?             0.000000
+0:6      Sequence
+0:6        move second child to first child (temp float)
+0:6          'v01' (temp float)
+0:6          Constant:
+0:6            0.000000
+0:8      Sequence
+0:8        move second child to first child (temp 4-component vector of bool)
+0:8          'r00' (temp 4-component vector of bool)
+0:8          Equal (temp 4-component vector of bool)
+0:8            'a' (in 4-component vector of float)
+0:8            'v04' (temp 4-component vector of float)
+0:9      Sequence
+0:9        move second child to first child (temp 4-component vector of bool)
+0:9          'r01' (temp 4-component vector of bool)
+0:9          NotEqual (temp 4-component vector of bool)
+0:9            'a' (in 4-component vector of float)
+0:9            'v04' (temp 4-component vector of float)
+0:10      Sequence
+0:10        move second child to first child (temp 4-component vector of bool)
+0:10          'r02' (temp 4-component vector of bool)
+0:10          Compare Less Than (temp 4-component vector of bool)
+0:10            'a' (in 4-component vector of float)
+0:10            'v04' (temp 4-component vector of float)
+0:11      Sequence
+0:11        move second child to first child (temp 4-component vector of bool)
+0:11          'r03' (temp 4-component vector of bool)
+0:11          Compare Greater Than (temp 4-component vector of bool)
+0:11            'a' (in 4-component vector of float)
+0:11            'v04' (temp 4-component vector of float)
+0:13      Sequence
+0:13        move second child to first child (temp 4-component vector of bool)
+0:13          'r10' (temp 4-component vector of bool)
+0:13          Equal (temp 4-component vector of bool)
+0:13            'a' (in 4-component vector of float)
+0:13            Construct vec4 (in 4-component vector of float)
+0:13              'v01' (temp float)
+0:14      Sequence
+0:14        move second child to first child (temp 4-component vector of bool)
+0:14          'r11' (temp 4-component vector of bool)
+0:14          NotEqual (temp 4-component vector of bool)
+0:14            'a' (in 4-component vector of float)
+0:14            Construct vec4 (in 4-component vector of float)
+0:14              'v01' (temp float)
+0:15      Sequence
+0:15        move second child to first child (temp 4-component vector of bool)
+0:15          'r12' (temp 4-component vector of bool)
+0:15          Compare Less Than (temp 4-component vector of bool)
+0:15            'a' (in 4-component vector of float)
+0:15            Construct vec4 (in 4-component vector of float)
+0:15              'v01' (temp float)
+0:16      Sequence
+0:16        move second child to first child (temp 4-component vector of bool)
+0:16          'r13' (temp 4-component vector of bool)
+0:16          Compare Greater Than (temp 4-component vector of bool)
+0:16            'a' (in 4-component vector of float)
+0:16            Construct vec4 (in 4-component vector of float)
+0:16              'v01' (temp float)
+0:18      Sequence
+0:18        move second child to first child (temp 4-component vector of bool)
+0:18          'r20' (temp 4-component vector of bool)
+0:18          Equal (temp 4-component vector of bool)
+0:18            Construct vec4 (in 4-component vector of float)
+0:18              'v01' (temp float)
+0:18            'a' (in 4-component vector of float)
+0:19      Sequence
+0:19        move second child to first child (temp 4-component vector of bool)
+0:19          'r21' (temp 4-component vector of bool)
+0:19          NotEqual (temp 4-component vector of bool)
+0:19            Construct vec4 (in 4-component vector of float)
+0:19              'v01' (temp float)
+0:19            'a' (in 4-component vector of float)
+0:20      Sequence
+0:20        move second child to first child (temp 4-component vector of bool)
+0:20          'r22' (temp 4-component vector of bool)
+0:20          Compare Less Than (temp 4-component vector of bool)
+0:20            Construct vec4 (in 4-component vector of float)
+0:20              'v01' (temp float)
+0:20            'a' (in 4-component vector of float)
+0:21      Sequence
+0:21        move second child to first child (temp 4-component vector of bool)
+0:21          'r23' (temp 4-component vector of bool)
+0:21          Compare Greater Than (temp 4-component vector of bool)
+0:21            Construct vec4 (in 4-component vector of float)
+0:21              'v01' (temp float)
+0:21            'a' (in 4-component vector of float)
+0:30  Function Definition: main( (temp structure{temp 4-component vector of float Color})
+0:30    Function Parameters: 
+0:?     Sequence
+0:32      move second child to first child (temp 4-component vector of float)
+0:32        Color: direct index for structure (temp 4-component vector of float)
+0:32          'psout' (temp structure{temp 4-component vector of float Color})
+0:32          Constant:
+0:32            0 (const int)
+0:32        Constant:
+0:32          0.000000
+0:32          0.000000
+0:32          0.000000
+0:32          0.000000
+0:33      Sequence
+0:33        Sequence
+0:33          move second child to first child (temp 4-component vector of float)
+0:?             'Color' (layout(location=0 ) out 4-component vector of float)
+0:33            Color: direct index for structure (temp 4-component vector of float)
+0:33              'psout' (temp structure{temp 4-component vector of float Color})
+0:33              Constant:
+0:33                0 (const int)
+0:33        Branch: Return
+0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of float uf4})
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 91
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 84
+                              ExecutionMode 4 OriginUpperLeft
+                              Name 4  "main"
+                              Name 11  "Bug1(vf4;"
+                              Name 10  "a"
+                              Name 13  "v04"
+                              Name 17  "v01"
+                              Name 21  "r00"
+                              Name 25  "r01"
+                              Name 29  "r02"
+                              Name 33  "r03"
+                              Name 37  "r10"
+                              Name 42  "r11"
+                              Name 47  "r12"
+                              Name 52  "r13"
+                              Name 57  "r20"
+                              Name 62  "r21"
+                              Name 67  "r22"
+                              Name 72  "r23"
+                              Name 77  "PS_OUTPUT"
+                              MemberName 77(PS_OUTPUT) 0  "Color"
+                              Name 79  "psout"
+                              Name 84  "Color"
+                              Name 88  "$Global"
+                              MemberName 88($Global) 0  "uf4"
+                              Name 90  ""
+                              Decorate 84(Color) Location 0
+                              MemberDecorate 88($Global) 0 Offset 0
+                              Decorate 88($Global) Block
+                              Decorate 90 DescriptorSet 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypePointer Function 7(fvec4)
+               9:             TypeFunction 2 8(ptr)
+              14:    6(float) Constant 0
+              15:    7(fvec4) ConstantComposite 14 14 14 14
+              16:             TypePointer Function 6(float)
+              18:             TypeBool
+              19:             TypeVector 18(bool) 4
+              20:             TypePointer Function 19(bvec4)
+   77(PS_OUTPUT):             TypeStruct 7(fvec4)
+              78:             TypePointer Function 77(PS_OUTPUT)
+              80:             TypeInt 32 1
+              81:     80(int) Constant 0
+              83:             TypePointer Output 7(fvec4)
+       84(Color):     83(ptr) Variable Output
+     88($Global):             TypeStruct 7(fvec4)
+              89:             TypePointer Uniform 88($Global)
+              90:     89(ptr) Variable Uniform
+         4(main):           2 Function None 3
+               5:             Label
+       79(psout):     78(ptr) Variable Function
+              82:      8(ptr) AccessChain 79(psout) 81
+                              Store 82 15
+              85:      8(ptr) AccessChain 79(psout) 81
+              86:    7(fvec4) Load 85
+                              Store 84(Color) 86
+                              Return
+                              FunctionEnd
+   11(Bug1(vf4;):           2 Function None 9
+           10(a):      8(ptr) FunctionParameter
+              12:             Label
+         13(v04):      8(ptr) Variable Function
+         17(v01):     16(ptr) Variable Function
+         21(r00):     20(ptr) Variable Function
+         25(r01):     20(ptr) Variable Function
+         29(r02):     20(ptr) Variable Function
+         33(r03):     20(ptr) Variable Function
+         37(r10):     20(ptr) Variable Function
+         42(r11):     20(ptr) Variable Function
+         47(r12):     20(ptr) Variable Function
+         52(r13):     20(ptr) Variable Function
+         57(r20):     20(ptr) Variable Function
+         62(r21):     20(ptr) Variable Function
+         67(r22):     20(ptr) Variable Function
+         72(r23):     20(ptr) Variable Function
+                              Store 13(v04) 15
+                              Store 17(v01) 14
+              22:    7(fvec4) Load 10(a)
+              23:    7(fvec4) Load 13(v04)
+              24:   19(bvec4) FOrdEqual 22 23
+                              Store 21(r00) 24
+              26:    7(fvec4) Load 10(a)
+              27:    7(fvec4) Load 13(v04)
+              28:   19(bvec4) FOrdNotEqual 26 27
+                              Store 25(r01) 28
+              30:    7(fvec4) Load 10(a)
+              31:    7(fvec4) Load 13(v04)
+              32:   19(bvec4) FOrdLessThan 30 31
+                              Store 29(r02) 32
+              34:    7(fvec4) Load 10(a)
+              35:    7(fvec4) Load 13(v04)
+              36:   19(bvec4) FOrdGreaterThan 34 35
+                              Store 33(r03) 36
+              38:    7(fvec4) Load 10(a)
+              39:    6(float) Load 17(v01)
+              40:    7(fvec4) CompositeConstruct 39 39 39 39
+              41:   19(bvec4) FOrdEqual 38 40
+                              Store 37(r10) 41
+              43:    7(fvec4) Load 10(a)
+              44:    6(float) Load 17(v01)
+              45:    7(fvec4) CompositeConstruct 44 44 44 44
+              46:   19(bvec4) FOrdNotEqual 43 45
+                              Store 42(r11) 46
+              48:    7(fvec4) Load 10(a)
+              49:    6(float) Load 17(v01)
+              50:    7(fvec4) CompositeConstruct 49 49 49 49
+              51:   19(bvec4) FOrdLessThan 48 50
+                              Store 47(r12) 51
+              53:    7(fvec4) Load 10(a)
+              54:    6(float) Load 17(v01)
+              55:    7(fvec4) CompositeConstruct 54 54 54 54
+              56:   19(bvec4) FOrdGreaterThan 53 55
+                              Store 52(r13) 56
+              58:    6(float) Load 17(v01)
+              59:    7(fvec4) CompositeConstruct 58 58 58 58
+              60:    7(fvec4) Load 10(a)
+              61:   19(bvec4) FOrdEqual 59 60
+                              Store 57(r20) 61
+              63:    6(float) Load 17(v01)
+              64:    7(fvec4) CompositeConstruct 63 63 63 63
+              65:    7(fvec4) Load 10(a)
+              66:   19(bvec4) FOrdNotEqual 64 65
+                              Store 62(r21) 66
+              68:    6(float) Load 17(v01)
+              69:    7(fvec4) CompositeConstruct 68 68 68 68
+              70:    7(fvec4) Load 10(a)
+              71:   19(bvec4) FOrdLessThan 69 70
+                              Store 67(r22) 71
+              73:    6(float) Load 17(v01)
+              74:    7(fvec4) CompositeConstruct 73 73 73 73
+              75:    7(fvec4) Load 10(a)
+              76:   19(bvec4) FOrdGreaterThan 74 75
+                              Store 72(r23) 76
+                              Return
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.deadFunctionMissingBody.vert.out b/Test/baseResults/hlsl.deadFunctionMissingBody.vert.out
new file mode 100644
index 0000000..71842af
--- /dev/null
+++ b/Test/baseResults/hlsl.deadFunctionMissingBody.vert.out
@@ -0,0 +1,25 @@
+hlsl.deadFunctionMissingBody.vert
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 13
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Vertex 4  "main" 9
+                              Name 4  "main"
+                              Name 9  "@entryPointOutput"
+                              Decorate 9(@entryPointOutput) Location 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 4
+               8:             TypePointer Output 7(fvec4)
+9(@entryPointOutput):      8(ptr) Variable Output
+              10:    6(float) Constant 0
+              11:    7(fvec4) ConstantComposite 10 10 10 10
+         4(main):           2 Function None 3
+               5:             Label
+                              Store 9(@entryPointOutput) 11
+                              Return
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.doLoop.frag.out b/Test/baseResults/hlsl.doLoop.frag.out
index 2d5a8fb..c060cdc 100755
--- a/Test/baseResults/hlsl.doLoop.frag.out
+++ b/Test/baseResults/hlsl.doLoop.frag.out
@@ -18,9 +18,10 @@
 0:4        No loop body
 0:5      Loop with condition not tested first
 0:5        Loop Condition
-0:5        Compare Equal (temp bool)
-0:5          'input' (layout(location=0 ) in 4-component vector of float)
-0:5          'input' (layout(location=0 ) in 4-component vector of float)
+0:5        all (temp bool)
+0:5          Equal (temp 4-component vector of bool)
+0:5            'input' (layout(location=0 ) in 4-component vector of float)
+0:5            'input' (layout(location=0 ) in 4-component vector of float)
 0:5        Loop Body
 0:5        Sequence
 0:5          move second child to first child (temp 4-component vector of float)
@@ -54,9 +55,10 @@
 0:4        No loop body
 0:5      Loop with condition not tested first
 0:5        Loop Condition
-0:5        Compare Equal (temp bool)
-0:5          'input' (layout(location=0 ) in 4-component vector of float)
-0:5          'input' (layout(location=0 ) in 4-component vector of float)
+0:5        all (temp bool)
+0:5          Equal (temp 4-component vector of bool)
+0:5            'input' (layout(location=0 ) in 4-component vector of float)
+0:5            'input' (layout(location=0 ) in 4-component vector of float)
 0:5        Loop Body
 0:5        Sequence
 0:5          move second child to first child (temp 4-component vector of float)
diff --git a/Test/baseResults/hlsl.entry.rename.frag.out b/Test/baseResults/hlsl.entry.rename.frag.out
new file mode 100644
index 0000000..b24cb7a
--- /dev/null
+++ b/Test/baseResults/hlsl.entry.rename.frag.out
@@ -0,0 +1,119 @@
+hlsl.entry.rename.frag
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:7  Function Definition: not_the_entry_point( (temp void)
+0:7    Function Parameters: 
+0:11  Function Definition: main_in_spv( (temp structure{temp 4-component vector of float Color})
+0:11    Function Parameters: 
+0:?     Sequence
+0:13      move second child to first child (temp 4-component vector of float)
+0:13        Color: direct index for structure (temp 4-component vector of float)
+0:13          'psout' (temp structure{temp 4-component vector of float Color})
+0:13          Constant:
+0:13            0 (const int)
+0:13        Constant:
+0:13          0.000000
+0:13          0.000000
+0:13          0.000000
+0:13          0.000000
+0:14      Sequence
+0:14        Sequence
+0:14          move second child to first child (temp 4-component vector of float)
+0:?             'Color' (layout(location=0 ) out 4-component vector of float)
+0:14            Color: direct index for structure (temp 4-component vector of float)
+0:14              'psout' (temp structure{temp 4-component vector of float Color})
+0:14              Constant:
+0:14                0 (const int)
+0:14        Branch: Return
+0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int also_not_the_entry_point})
+
+
+Linked fragment stage:
+
+
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:7  Function Definition: not_the_entry_point( (temp void)
+0:7    Function Parameters: 
+0:11  Function Definition: main_in_spv( (temp structure{temp 4-component vector of float Color})
+0:11    Function Parameters: 
+0:?     Sequence
+0:13      move second child to first child (temp 4-component vector of float)
+0:13        Color: direct index for structure (temp 4-component vector of float)
+0:13          'psout' (temp structure{temp 4-component vector of float Color})
+0:13          Constant:
+0:13            0 (const int)
+0:13        Constant:
+0:13          0.000000
+0:13          0.000000
+0:13          0.000000
+0:13          0.000000
+0:14      Sequence
+0:14        Sequence
+0:14          move second child to first child (temp 4-component vector of float)
+0:?             'Color' (layout(location=0 ) out 4-component vector of float)
+0:14            Color: direct index for structure (temp 4-component vector of float)
+0:14              'psout' (temp structure{temp 4-component vector of float Color})
+0:14              Constant:
+0:14                0 (const int)
+0:14        Branch: Return
+0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int also_not_the_entry_point})
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 27
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main_in_spv" 20
+                              ExecutionMode 4 OriginUpperLeft
+                              Name 4  "main_in_spv"
+                              Name 6  "not_the_entry_point("
+                              Name 10  "PS_OUTPUT"
+                              MemberName 10(PS_OUTPUT) 0  "Color"
+                              Name 12  "psout"
+                              Name 20  "Color"
+                              Name 24  "$Global"
+                              MemberName 24($Global) 0  "also_not_the_entry_point"
+                              Name 26  ""
+                              Decorate 20(Color) Location 0
+                              MemberDecorate 24($Global) 0 Offset 0
+                              Decorate 24($Global) Block
+                              Decorate 26 DescriptorSet 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               8:             TypeFloat 32
+               9:             TypeVector 8(float) 4
+   10(PS_OUTPUT):             TypeStruct 9(fvec4)
+              11:             TypePointer Function 10(PS_OUTPUT)
+              13:             TypeInt 32 1
+              14:     13(int) Constant 0
+              15:    8(float) Constant 0
+              16:    9(fvec4) ConstantComposite 15 15 15 15
+              17:             TypePointer Function 9(fvec4)
+              19:             TypePointer Output 9(fvec4)
+       20(Color):     19(ptr) Variable Output
+     24($Global):             TypeStruct 13(int)
+              25:             TypePointer Uniform 24($Global)
+              26:     25(ptr) Variable Uniform
+  4(main_in_spv):           2 Function None 3
+               5:             Label
+       12(psout):     11(ptr) Variable Function
+              18:     17(ptr) AccessChain 12(psout) 14
+                              Store 18 16
+              21:     17(ptr) AccessChain 12(psout) 14
+              22:    9(fvec4) Load 21
+                              Store 20(Color) 22
+                              Return
+                              FunctionEnd
+6(not_the_entry_point():           2 Function None 3
+               7:             Label
+                              Return
+                              FunctionEnd
diff --git a/Test/baseResults/hlsl.float1.frag.out b/Test/baseResults/hlsl.float1.frag.out
index 83a243f..641febd 100755
--- a/Test/baseResults/hlsl.float1.frag.out
+++ b/Test/baseResults/hlsl.float1.frag.out
@@ -32,6 +32,7 @@
 
 Linked fragment stage:
 
+WARNING: Linking fragment stage: Entry point not found
 
 Shader version: 450
 gl_FragCoord origin is upper left
@@ -92,6 +93,7 @@
                5:             Label
                               Store 14(f1) 15
                               Store 16(scalar) 17
+                              Return
                               FunctionEnd
 11(ShaderFunction(vf1;f1;):    6(float) Function None 8
      9(inFloat1):      7(ptr) FunctionParameter
diff --git a/Test/baseResults/hlsl.float4.frag.out b/Test/baseResults/hlsl.float4.frag.out
index 6caac24..27c9a5c 100755
--- a/Test/baseResults/hlsl.float4.frag.out
+++ b/Test/baseResults/hlsl.float4.frag.out
@@ -17,11 +17,12 @@
 0:10            Constant:
 0:10              0 (const uint)
 0:?   Linker Objects
-0:?     'anon@0' (uniform block{layout(offset=0 ) uniform 4-component vector of float AmbientColor, layout(offset=16 ) uniform bool Face ff1, layout(offset=20 ) uniform float ff2, layout(binding=0 offset=32 ) uniform 4-component vector of float ff3, layout(binding=1 offset=48 ) uniform 4-component vector of float ff4})
+0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of float AmbientColor, layout(offset=16 ) uniform bool Face ff1, layout(offset=20 ) uniform float ff2, layout(binding=0 offset=32 ) uniform 4-component vector of float ff3, layout(binding=1 offset=48 ) uniform 4-component vector of float ff4})
 
 
 Linked fragment stage:
 
+WARNING: Linking fragment stage: Entry point not found
 
 Shader version: 450
 gl_FragCoord origin is upper left
@@ -38,7 +39,7 @@
 0:10            Constant:
 0:10              0 (const uint)
 0:?   Linker Objects
-0:?     'anon@0' (uniform block{layout(offset=0 ) uniform 4-component vector of float AmbientColor, layout(offset=16 ) uniform bool Face ff1, layout(offset=20 ) uniform float ff2, layout(binding=0 offset=32 ) uniform 4-component vector of float ff3, layout(binding=1 offset=48 ) uniform 4-component vector of float ff4})
+0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of float AmbientColor, layout(offset=16 ) uniform bool Face ff1, layout(offset=20 ) uniform float ff2, layout(binding=0 offset=32 ) uniform 4-component vector of float ff3, layout(binding=1 offset=48 ) uniform 4-component vector of float ff4})
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -82,6 +83,7 @@
               20:             TypePointer Uniform 7(fvec4)
 4(PixelShaderFunction):           2 Function None 3
                5:             Label
+                              Return
                               FunctionEnd
 11(ShaderFunction(vf4;):    7(fvec4) Function None 9
        10(input):      8(ptr) FunctionParameter
diff --git a/Test/baseResults/hlsl.forLoop.frag.out b/Test/baseResults/hlsl.forLoop.frag.out
index cc47578..85b8fb2 100755
--- a/Test/baseResults/hlsl.forLoop.frag.out
+++ b/Test/baseResults/hlsl.forLoop.frag.out
@@ -19,16 +19,18 @@
 0:?       Sequence
 0:5        Loop with condition tested first
 0:5          Loop Condition
-0:5          Compare Not Equal (temp bool)
-0:5            'input' (layout(location=0 ) in 4-component vector of float)
-0:5            'input' (layout(location=0 ) in 4-component vector of float)
+0:5          any (temp bool)
+0:5            NotEqual (temp 4-component vector of bool)
+0:5              'input' (layout(location=0 ) in 4-component vector of float)
+0:5              'input' (layout(location=0 ) in 4-component vector of float)
 0:5          No loop body
 0:?       Sequence
 0:6        Loop with condition tested first
 0:6          Loop Condition
-0:6          Compare Not Equal (temp bool)
-0:6            'input' (layout(location=0 ) in 4-component vector of float)
-0:6            'input' (layout(location=0 ) in 4-component vector of float)
+0:6          any (temp bool)
+0:6            NotEqual (temp 4-component vector of bool)
+0:6              'input' (layout(location=0 ) in 4-component vector of float)
+0:6              'input' (layout(location=0 ) in 4-component vector of float)
 0:6          Loop Body
 0:?           Sequence
 0:6            Sequence
@@ -42,9 +44,10 @@
 0:7          'input' (layout(location=0 ) in 4-component vector of float)
 0:7        Loop with condition tested first
 0:7          Loop Condition
-0:7          Compare Not Equal (temp bool)
-0:7            'input' (layout(location=0 ) in 4-component vector of float)
-0:7            'input' (layout(location=0 ) in 4-component vector of float)
+0:7          any (temp bool)
+0:7            NotEqual (temp 4-component vector of bool)
+0:7              'input' (layout(location=0 ) in 4-component vector of float)
+0:7              'input' (layout(location=0 ) in 4-component vector of float)
 0:7          Loop Body
 0:?           Sequence
 0:7            Sequence
@@ -141,16 +144,18 @@
 0:?       Sequence
 0:5        Loop with condition tested first
 0:5          Loop Condition
-0:5          Compare Not Equal (temp bool)
-0:5            'input' (layout(location=0 ) in 4-component vector of float)
-0:5            'input' (layout(location=0 ) in 4-component vector of float)
+0:5          any (temp bool)
+0:5            NotEqual (temp 4-component vector of bool)
+0:5              'input' (layout(location=0 ) in 4-component vector of float)
+0:5              'input' (layout(location=0 ) in 4-component vector of float)
 0:5          No loop body
 0:?       Sequence
 0:6        Loop with condition tested first
 0:6          Loop Condition
-0:6          Compare Not Equal (temp bool)
-0:6            'input' (layout(location=0 ) in 4-component vector of float)
-0:6            'input' (layout(location=0 ) in 4-component vector of float)
+0:6          any (temp bool)
+0:6            NotEqual (temp 4-component vector of bool)
+0:6              'input' (layout(location=0 ) in 4-component vector of float)
+0:6              'input' (layout(location=0 ) in 4-component vector of float)
 0:6          Loop Body
 0:?           Sequence
 0:6            Sequence
@@ -164,9 +169,10 @@
 0:7          'input' (layout(location=0 ) in 4-component vector of float)
 0:7        Loop with condition tested first
 0:7          Loop Condition
-0:7          Compare Not Equal (temp bool)
-0:7            'input' (layout(location=0 ) in 4-component vector of float)
-0:7            'input' (layout(location=0 ) in 4-component vector of float)
+0:7          any (temp bool)
+0:7            NotEqual (temp 4-component vector of bool)
+0:7              'input' (layout(location=0 ) in 4-component vector of float)
+0:7              'input' (layout(location=0 ) in 4-component vector of float)
 0:7          Loop Body
 0:?           Sequence
 0:7            Sequence
diff --git a/Test/baseResults/hlsl.gather.array.dx10.frag.out b/Test/baseResults/hlsl.gather.array.dx10.frag.out
index a09b87c..ee550d1 100644
--- a/Test/baseResults/hlsl.gather.array.dx10.frag.out
+++ b/Test/baseResults/hlsl.gather.array.dx10.frag.out
@@ -8,7 +8,7 @@
 0:29      Sequence
 0:29        move second child to first child (temp 4-component vector of float)
 0:29          'txval20' (temp 4-component vector of float)
-0:29          textureGather (global 4-component vector of float)
+0:29          textureGather (temp 4-component vector of float)
 0:29            Construct combined texture-sampler (temp sampler2DArray)
 0:29              'g_tTex2df4a' (uniform texture2DArray)
 0:29              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -19,7 +19,7 @@
 0:30      Sequence
 0:30        move second child to first child (temp 4-component vector of int)
 0:30          'txval21' (temp 4-component vector of int)
-0:30          textureGather (global 4-component vector of int)
+0:30          textureGather (temp 4-component vector of int)
 0:30            Construct combined texture-sampler (temp isampler2DArray)
 0:30              'g_tTex2di4a' (uniform itexture2DArray)
 0:30              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -30,7 +30,7 @@
 0:31      Sequence
 0:31        move second child to first child (temp 4-component vector of uint)
 0:31          'txval22' (temp 4-component vector of uint)
-0:31          textureGather (global 4-component vector of uint)
+0:31          textureGather (temp 4-component vector of uint)
 0:31            Construct combined texture-sampler (temp usampler2DArray)
 0:31              'g_tTex2du4a' (uniform utexture2DArray)
 0:31              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -41,7 +41,7 @@
 0:35      Sequence
 0:35        move second child to first child (temp 4-component vector of float)
 0:35          'txval40' (temp 4-component vector of float)
-0:35          textureGather (global 4-component vector of float)
+0:35          textureGather (temp 4-component vector of float)
 0:35            Construct combined texture-sampler (temp samplerCubeArray)
 0:35              'g_tTexcdf4a' (uniform textureCubeArray)
 0:35              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -53,7 +53,7 @@
 0:36      Sequence
 0:36        move second child to first child (temp 4-component vector of int)
 0:36          'txval41' (temp 4-component vector of int)
-0:36          textureGather (global 4-component vector of int)
+0:36          textureGather (temp 4-component vector of int)
 0:36            Construct combined texture-sampler (temp isamplerCubeArray)
 0:36              'g_tTexcdi4a' (uniform itextureCubeArray)
 0:36              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -65,7 +65,7 @@
 0:37      Sequence
 0:37        move second child to first child (temp 4-component vector of uint)
 0:37          'txval42' (temp 4-component vector of uint)
-0:37          textureGather (global 4-component vector of uint)
+0:37          textureGather (temp 4-component vector of uint)
 0:37            Construct combined texture-sampler (temp usamplerCubeArray)
 0:37              'g_tTexcdu4a' (uniform utextureCubeArray)
 0:37              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -107,6 +107,8 @@
 0:42                1 (const int)
 0:42        Branch: Return
 0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'Depth' (out float FragDepth)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_tTex1df4a' (layout(binding=1 ) uniform texture1DArray)
 0:?     'g_tTex1df4' (layout(binding=0 ) uniform texture1DArray)
@@ -118,8 +120,6 @@
 0:?     'g_tTexcdf4a' (uniform textureCubeArray)
 0:?     'g_tTexcdi4a' (uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' (uniform utextureCubeArray)
-0:?     'Color' (layout(location=0 ) out 4-component vector of float)
-0:?     'Depth' (out float FragDepth)
 
 
 Linked fragment stage:
@@ -134,7 +134,7 @@
 0:29      Sequence
 0:29        move second child to first child (temp 4-component vector of float)
 0:29          'txval20' (temp 4-component vector of float)
-0:29          textureGather (global 4-component vector of float)
+0:29          textureGather (temp 4-component vector of float)
 0:29            Construct combined texture-sampler (temp sampler2DArray)
 0:29              'g_tTex2df4a' (uniform texture2DArray)
 0:29              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -145,7 +145,7 @@
 0:30      Sequence
 0:30        move second child to first child (temp 4-component vector of int)
 0:30          'txval21' (temp 4-component vector of int)
-0:30          textureGather (global 4-component vector of int)
+0:30          textureGather (temp 4-component vector of int)
 0:30            Construct combined texture-sampler (temp isampler2DArray)
 0:30              'g_tTex2di4a' (uniform itexture2DArray)
 0:30              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -156,7 +156,7 @@
 0:31      Sequence
 0:31        move second child to first child (temp 4-component vector of uint)
 0:31          'txval22' (temp 4-component vector of uint)
-0:31          textureGather (global 4-component vector of uint)
+0:31          textureGather (temp 4-component vector of uint)
 0:31            Construct combined texture-sampler (temp usampler2DArray)
 0:31              'g_tTex2du4a' (uniform utexture2DArray)
 0:31              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -167,7 +167,7 @@
 0:35      Sequence
 0:35        move second child to first child (temp 4-component vector of float)
 0:35          'txval40' (temp 4-component vector of float)
-0:35          textureGather (global 4-component vector of float)
+0:35          textureGather (temp 4-component vector of float)
 0:35            Construct combined texture-sampler (temp samplerCubeArray)
 0:35              'g_tTexcdf4a' (uniform textureCubeArray)
 0:35              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -179,7 +179,7 @@
 0:36      Sequence
 0:36        move second child to first child (temp 4-component vector of int)
 0:36          'txval41' (temp 4-component vector of int)
-0:36          textureGather (global 4-component vector of int)
+0:36          textureGather (temp 4-component vector of int)
 0:36            Construct combined texture-sampler (temp isamplerCubeArray)
 0:36              'g_tTexcdi4a' (uniform itextureCubeArray)
 0:36              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -191,7 +191,7 @@
 0:37      Sequence
 0:37        move second child to first child (temp 4-component vector of uint)
 0:37          'txval42' (temp 4-component vector of uint)
-0:37          textureGather (global 4-component vector of uint)
+0:37          textureGather (temp 4-component vector of uint)
 0:37            Construct combined texture-sampler (temp usamplerCubeArray)
 0:37              'g_tTexcdu4a' (uniform utextureCubeArray)
 0:37              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -233,6 +233,8 @@
 0:42                1 (const int)
 0:42        Branch: Return
 0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'Depth' (out float FragDepth)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_tTex1df4a' (layout(binding=1 ) uniform texture1DArray)
 0:?     'g_tTex1df4' (layout(binding=0 ) uniform texture1DArray)
@@ -244,8 +246,6 @@
 0:?     'g_tTexcdf4a' (uniform textureCubeArray)
 0:?     'g_tTexcdi4a' (uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' (uniform utextureCubeArray)
-0:?     'Color' (layout(location=0 ) out 4-component vector of float)
-0:?     'Depth' (out float FragDepth)
 
 // Module Version 10000
 // Generated by (magic number): 80001
diff --git a/Test/baseResults/hlsl.gather.basic.dx10.frag.out b/Test/baseResults/hlsl.gather.basic.dx10.frag.out
index 467ccf4..86e106c 100644
--- a/Test/baseResults/hlsl.gather.basic.dx10.frag.out
+++ b/Test/baseResults/hlsl.gather.basic.dx10.frag.out
@@ -8,7 +8,7 @@
 0:34      Sequence
 0:34        move second child to first child (temp 4-component vector of float)
 0:34          'txval20' (temp 4-component vector of float)
-0:34          textureGather (global 4-component vector of float)
+0:34          textureGather (temp 4-component vector of float)
 0:34            Construct combined texture-sampler (temp sampler2D)
 0:34              'g_tTex2df4' (uniform texture2D)
 0:34              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -18,7 +18,7 @@
 0:35      Sequence
 0:35        move second child to first child (temp 4-component vector of int)
 0:35          'txval21' (temp 4-component vector of int)
-0:35          textureGather (global 4-component vector of int)
+0:35          textureGather (temp 4-component vector of int)
 0:35            Construct combined texture-sampler (temp isampler2D)
 0:35              'g_tTex2di4' (uniform itexture2D)
 0:35              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -28,7 +28,7 @@
 0:36      Sequence
 0:36        move second child to first child (temp 4-component vector of uint)
 0:36          'txval22' (temp 4-component vector of uint)
-0:36          textureGather (global 4-component vector of uint)
+0:36          textureGather (temp 4-component vector of uint)
 0:36            Construct combined texture-sampler (temp usampler2D)
 0:36              'g_tTex2du4' (uniform utexture2D)
 0:36              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -38,7 +38,7 @@
 0:40      Sequence
 0:40        move second child to first child (temp 4-component vector of float)
 0:40          'txval40' (temp 4-component vector of float)
-0:40          textureGather (global 4-component vector of float)
+0:40          textureGather (temp 4-component vector of float)
 0:40            Construct combined texture-sampler (temp samplerCube)
 0:40              'g_tTexcdf4' (uniform textureCube)
 0:40              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -49,7 +49,7 @@
 0:41      Sequence
 0:41        move second child to first child (temp 4-component vector of int)
 0:41          'txval41' (temp 4-component vector of int)
-0:41          textureGather (global 4-component vector of int)
+0:41          textureGather (temp 4-component vector of int)
 0:41            Construct combined texture-sampler (temp isamplerCube)
 0:41              'g_tTexcdi4' (uniform itextureCube)
 0:41              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -60,7 +60,7 @@
 0:42      Sequence
 0:42        move second child to first child (temp 4-component vector of uint)
 0:42          'txval42' (temp 4-component vector of uint)
-0:42          textureGather (global 4-component vector of uint)
+0:42          textureGather (temp 4-component vector of uint)
 0:42            Construct combined texture-sampler (temp usamplerCube)
 0:42              'g_tTexcdu4' (uniform utextureCube)
 0:42              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -101,6 +101,8 @@
 0:47                1 (const int)
 0:47        Branch: Return
 0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'Depth' (out float FragDepth)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_sSamp2d' (uniform sampler)
 0:?     'g_tTex1df4a' (layout(binding=1 ) uniform texture1D)
@@ -116,8 +118,6 @@
 0:?     'g_tTexcdf4' (uniform textureCube)
 0:?     'g_tTexcdi4' (uniform itextureCube)
 0:?     'g_tTexcdu4' (uniform utextureCube)
-0:?     'Color' (layout(location=0 ) out 4-component vector of float)
-0:?     'Depth' (out float FragDepth)
 
 
 Linked fragment stage:
@@ -132,7 +132,7 @@
 0:34      Sequence
 0:34        move second child to first child (temp 4-component vector of float)
 0:34          'txval20' (temp 4-component vector of float)
-0:34          textureGather (global 4-component vector of float)
+0:34          textureGather (temp 4-component vector of float)
 0:34            Construct combined texture-sampler (temp sampler2D)
 0:34              'g_tTex2df4' (uniform texture2D)
 0:34              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -142,7 +142,7 @@
 0:35      Sequence
 0:35        move second child to first child (temp 4-component vector of int)
 0:35          'txval21' (temp 4-component vector of int)
-0:35          textureGather (global 4-component vector of int)
+0:35          textureGather (temp 4-component vector of int)
 0:35            Construct combined texture-sampler (temp isampler2D)
 0:35              'g_tTex2di4' (uniform itexture2D)
 0:35              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -152,7 +152,7 @@
 0:36      Sequence
 0:36        move second child to first child (temp 4-component vector of uint)
 0:36          'txval22' (temp 4-component vector of uint)
-0:36          textureGather (global 4-component vector of uint)
+0:36          textureGather (temp 4-component vector of uint)
 0:36            Construct combined texture-sampler (temp usampler2D)
 0:36              'g_tTex2du4' (uniform utexture2D)
 0:36              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -162,7 +162,7 @@
 0:40      Sequence
 0:40        move second child to first child (temp 4-component vector of float)
 0:40          'txval40' (temp 4-component vector of float)
-0:40          textureGather (global 4-component vector of float)
+0:40          textureGather (temp 4-component vector of float)
 0:40            Construct combined texture-sampler (temp samplerCube)
 0:40              'g_tTexcdf4' (uniform textureCube)
 0:40              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -173,7 +173,7 @@
 0:41      Sequence
 0:41        move second child to first child (temp 4-component vector of int)
 0:41          'txval41' (temp 4-component vector of int)
-0:41          textureGather (global 4-component vector of int)
+0:41          textureGather (temp 4-component vector of int)
 0:41            Construct combined texture-sampler (temp isamplerCube)
 0:41              'g_tTexcdi4' (uniform itextureCube)
 0:41              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -184,7 +184,7 @@
 0:42      Sequence
 0:42        move second child to first child (temp 4-component vector of uint)
 0:42          'txval42' (temp 4-component vector of uint)
-0:42          textureGather (global 4-component vector of uint)
+0:42          textureGather (temp 4-component vector of uint)
 0:42            Construct combined texture-sampler (temp usamplerCube)
 0:42              'g_tTexcdu4' (uniform utextureCube)
 0:42              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -225,6 +225,8 @@
 0:47                1 (const int)
 0:47        Branch: Return
 0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'Depth' (out float FragDepth)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_sSamp2d' (uniform sampler)
 0:?     'g_tTex1df4a' (layout(binding=1 ) uniform texture1D)
@@ -240,8 +242,6 @@
 0:?     'g_tTexcdf4' (uniform textureCube)
 0:?     'g_tTexcdi4' (uniform itextureCube)
 0:?     'g_tTexcdu4' (uniform utextureCube)
-0:?     'Color' (layout(location=0 ) out 4-component vector of float)
-0:?     'Depth' (out float FragDepth)
 
 // Module Version 10000
 // Generated by (magic number): 80001
diff --git a/Test/baseResults/hlsl.gather.basic.dx10.vert.out b/Test/baseResults/hlsl.gather.basic.dx10.vert.out
index d08a57e..a893675 100644
--- a/Test/baseResults/hlsl.gather.basic.dx10.vert.out
+++ b/Test/baseResults/hlsl.gather.basic.dx10.vert.out
@@ -7,7 +7,7 @@
 0:33      Sequence
 0:33        move second child to first child (temp 4-component vector of float)
 0:33          'txval20' (temp 4-component vector of float)
-0:33          textureGather (global 4-component vector of float)
+0:33          textureGather (temp 4-component vector of float)
 0:33            Construct combined texture-sampler (temp sampler2D)
 0:33              'g_tTex2df4' (uniform texture2D)
 0:33              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -17,7 +17,7 @@
 0:34      Sequence
 0:34        move second child to first child (temp 4-component vector of int)
 0:34          'txval21' (temp 4-component vector of int)
-0:34          textureGather (global 4-component vector of int)
+0:34          textureGather (temp 4-component vector of int)
 0:34            Construct combined texture-sampler (temp isampler2D)
 0:34              'g_tTex2di4' (uniform itexture2D)
 0:34              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -27,7 +27,7 @@
 0:35      Sequence
 0:35        move second child to first child (temp 4-component vector of uint)
 0:35          'txval22' (temp 4-component vector of uint)
-0:35          textureGather (global 4-component vector of uint)
+0:35          textureGather (temp 4-component vector of uint)
 0:35            Construct combined texture-sampler (temp usampler2D)
 0:35              'g_tTex2du4' (uniform utexture2D)
 0:35              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -37,7 +37,7 @@
 0:39      Sequence
 0:39        move second child to first child (temp 4-component vector of float)
 0:39          'txval40' (temp 4-component vector of float)
-0:39          textureGather (global 4-component vector of float)
+0:39          textureGather (temp 4-component vector of float)
 0:39            Construct combined texture-sampler (temp samplerCube)
 0:39              'g_tTexcdf4' (uniform textureCube)
 0:39              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -48,7 +48,7 @@
 0:40      Sequence
 0:40        move second child to first child (temp 4-component vector of int)
 0:40          'txval41' (temp 4-component vector of int)
-0:40          textureGather (global 4-component vector of int)
+0:40          textureGather (temp 4-component vector of int)
 0:40            Construct combined texture-sampler (temp isamplerCube)
 0:40              'g_tTexcdi4' (uniform itextureCube)
 0:40              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -59,7 +59,7 @@
 0:41      Sequence
 0:41        move second child to first child (temp 4-component vector of uint)
 0:41          'txval42' (temp 4-component vector of uint)
-0:41          textureGather (global 4-component vector of uint)
+0:41          textureGather (temp 4-component vector of uint)
 0:41            Construct combined texture-sampler (temp usamplerCube)
 0:41              'g_tTexcdu4' (uniform utextureCube)
 0:41              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -87,6 +87,7 @@
 0:45                0 (const int)
 0:45        Branch: Return
 0:?   Linker Objects
+0:?     'Pos' (out 4-component vector of float Position)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_sSamp2d' (uniform sampler)
 0:?     'g_tTex1df4a' (layout(binding=1 ) uniform texture1D)
@@ -102,7 +103,6 @@
 0:?     'g_tTexcdf4' (uniform textureCube)
 0:?     'g_tTexcdi4' (uniform itextureCube)
 0:?     'g_tTexcdu4' (uniform utextureCube)
-0:?     'Pos' (out 4-component vector of float Position)
 
 
 Linked vertex stage:
@@ -116,7 +116,7 @@
 0:33      Sequence
 0:33        move second child to first child (temp 4-component vector of float)
 0:33          'txval20' (temp 4-component vector of float)
-0:33          textureGather (global 4-component vector of float)
+0:33          textureGather (temp 4-component vector of float)
 0:33            Construct combined texture-sampler (temp sampler2D)
 0:33              'g_tTex2df4' (uniform texture2D)
 0:33              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -126,7 +126,7 @@
 0:34      Sequence
 0:34        move second child to first child (temp 4-component vector of int)
 0:34          'txval21' (temp 4-component vector of int)
-0:34          textureGather (global 4-component vector of int)
+0:34          textureGather (temp 4-component vector of int)
 0:34            Construct combined texture-sampler (temp isampler2D)
 0:34              'g_tTex2di4' (uniform itexture2D)
 0:34              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -136,7 +136,7 @@
 0:35      Sequence
 0:35        move second child to first child (temp 4-component vector of uint)
 0:35          'txval22' (temp 4-component vector of uint)
-0:35          textureGather (global 4-component vector of uint)
+0:35          textureGather (temp 4-component vector of uint)
 0:35            Construct combined texture-sampler (temp usampler2D)
 0:35              'g_tTex2du4' (uniform utexture2D)
 0:35              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -146,7 +146,7 @@
 0:39      Sequence
 0:39        move second child to first child (temp 4-component vector of float)
 0:39          'txval40' (temp 4-component vector of float)
-0:39          textureGather (global 4-component vector of float)
+0:39          textureGather (temp 4-component vector of float)
 0:39            Construct combined texture-sampler (temp samplerCube)
 0:39              'g_tTexcdf4' (uniform textureCube)
 0:39              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -157,7 +157,7 @@
 0:40      Sequence
 0:40        move second child to first child (temp 4-component vector of int)
 0:40          'txval41' (temp 4-component vector of int)
-0:40          textureGather (global 4-component vector of int)
+0:40          textureGather (temp 4-component vector of int)
 0:40            Construct combined texture-sampler (temp isamplerCube)
 0:40              'g_tTexcdi4' (uniform itextureCube)
 0:40              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -168,7 +168,7 @@
 0:41      Sequence
 0:41        move second child to first child (temp 4-component vector of uint)
 0:41          'txval42' (temp 4-component vector of uint)
-0:41          textureGather (global 4-component vector of uint)
+0:41          textureGather (temp 4-component vector of uint)
 0:41            Construct combined texture-sampler (temp usamplerCube)
 0:41              'g_tTexcdu4' (uniform utextureCube)
 0:41              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -196,6 +196,7 @@
 0:45                0 (const int)
 0:45        Branch: Return
 0:?   Linker Objects
+0:?     'Pos' (out 4-component vector of float Position)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_sSamp2d' (uniform sampler)
 0:?     'g_tTex1df4a' (layout(binding=1 ) uniform texture1D)
@@ -211,7 +212,6 @@
 0:?     'g_tTexcdf4' (uniform textureCube)
 0:?     'g_tTexcdi4' (uniform itextureCube)
 0:?     'g_tTexcdu4' (uniform utextureCube)
-0:?     'Pos' (out 4-component vector of float Position)
 
 // Module Version 10000
 // Generated by (magic number): 80001
diff --git a/Test/baseResults/hlsl.gather.offset.dx10.frag.out b/Test/baseResults/hlsl.gather.offset.dx10.frag.out
index ff7eb39..5b48bf3 100644
--- a/Test/baseResults/hlsl.gather.offset.dx10.frag.out
+++ b/Test/baseResults/hlsl.gather.offset.dx10.frag.out
@@ -8,7 +8,7 @@
 0:33      Sequence
 0:33        move second child to first child (temp 4-component vector of float)
 0:33          'txval20' (temp 4-component vector of float)
-0:33          textureGatherOffset (global 4-component vector of float)
+0:33          textureGatherOffset (temp 4-component vector of float)
 0:33            Construct combined texture-sampler (temp sampler2D)
 0:33              'g_tTex2df4' (uniform texture2D)
 0:33              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -21,7 +21,7 @@
 0:34      Sequence
 0:34        move second child to first child (temp 4-component vector of int)
 0:34          'txval21' (temp 4-component vector of int)
-0:34          textureGatherOffset (global 4-component vector of int)
+0:34          textureGatherOffset (temp 4-component vector of int)
 0:34            Construct combined texture-sampler (temp isampler2D)
 0:34              'g_tTex2di4' (uniform itexture2D)
 0:34              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -34,7 +34,7 @@
 0:35      Sequence
 0:35        move second child to first child (temp 4-component vector of uint)
 0:35          'txval22' (temp 4-component vector of uint)
-0:35          textureGatherOffset (global 4-component vector of uint)
+0:35          textureGatherOffset (temp 4-component vector of uint)
 0:35            Construct combined texture-sampler (temp usampler2D)
 0:35              'g_tTex2du4' (uniform utexture2D)
 0:35              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -77,6 +77,8 @@
 0:43                1 (const int)
 0:43        Branch: Return
 0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'Depth' (out float FragDepth)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_tTex1df4a' (layout(binding=1 ) uniform texture1D)
 0:?     'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
@@ -91,8 +93,6 @@
 0:?     'g_tTexcdf4' (uniform textureCube)
 0:?     'g_tTexcdi4' (uniform itextureCube)
 0:?     'g_tTexcdu4' (uniform utextureCube)
-0:?     'Color' (layout(location=0 ) out 4-component vector of float)
-0:?     'Depth' (out float FragDepth)
 
 
 Linked fragment stage:
@@ -107,7 +107,7 @@
 0:33      Sequence
 0:33        move second child to first child (temp 4-component vector of float)
 0:33          'txval20' (temp 4-component vector of float)
-0:33          textureGatherOffset (global 4-component vector of float)
+0:33          textureGatherOffset (temp 4-component vector of float)
 0:33            Construct combined texture-sampler (temp sampler2D)
 0:33              'g_tTex2df4' (uniform texture2D)
 0:33              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -120,7 +120,7 @@
 0:34      Sequence
 0:34        move second child to first child (temp 4-component vector of int)
 0:34          'txval21' (temp 4-component vector of int)
-0:34          textureGatherOffset (global 4-component vector of int)
+0:34          textureGatherOffset (temp 4-component vector of int)
 0:34            Construct combined texture-sampler (temp isampler2D)
 0:34              'g_tTex2di4' (uniform itexture2D)
 0:34              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -133,7 +133,7 @@
 0:35      Sequence
 0:35        move second child to first child (temp 4-component vector of uint)
 0:35          'txval22' (temp 4-component vector of uint)
-0:35          textureGatherOffset (global 4-component vector of uint)
+0:35          textureGatherOffset (temp 4-component vector of uint)
 0:35            Construct combined texture-sampler (temp usampler2D)
 0:35              'g_tTex2du4' (uniform utexture2D)
 0:35              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -176,6 +176,8 @@
 0:43                1 (const int)
 0:43        Branch: Return
 0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'Depth' (out float FragDepth)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_tTex1df4a' (layout(binding=1 ) uniform texture1D)
 0:?     'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
@@ -190,8 +192,6 @@
 0:?     'g_tTexcdf4' (uniform textureCube)
 0:?     'g_tTexcdi4' (uniform itextureCube)
 0:?     'g_tTexcdu4' (uniform utextureCube)
-0:?     'Color' (layout(location=0 ) out 4-component vector of float)
-0:?     'Depth' (out float FragDepth)
 
 // Module Version 10000
 // Generated by (magic number): 80001
diff --git a/Test/baseResults/hlsl.gather.offsetarray.dx10.frag.out b/Test/baseResults/hlsl.gather.offsetarray.dx10.frag.out
index dc64a80..a7589cd 100644
--- a/Test/baseResults/hlsl.gather.offsetarray.dx10.frag.out
+++ b/Test/baseResults/hlsl.gather.offsetarray.dx10.frag.out
@@ -8,7 +8,7 @@
 0:25      Sequence
 0:25        move second child to first child (temp 4-component vector of float)
 0:25          'txval20' (temp 4-component vector of float)
-0:25          textureGatherOffset (global 4-component vector of float)
+0:25          textureGatherOffset (temp 4-component vector of float)
 0:25            Construct combined texture-sampler (temp sampler2DArray)
 0:25              'g_tTex2df4' (uniform texture2DArray)
 0:25              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -22,7 +22,7 @@
 0:26      Sequence
 0:26        move second child to first child (temp 4-component vector of int)
 0:26          'txval21' (temp 4-component vector of int)
-0:26          textureGatherOffset (global 4-component vector of int)
+0:26          textureGatherOffset (temp 4-component vector of int)
 0:26            Construct combined texture-sampler (temp isampler2DArray)
 0:26              'g_tTex2di4' (uniform itexture2DArray)
 0:26              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -36,7 +36,7 @@
 0:27      Sequence
 0:27        move second child to first child (temp 4-component vector of uint)
 0:27          'txval22' (temp 4-component vector of uint)
-0:27          textureGatherOffset (global 4-component vector of uint)
+0:27          textureGatherOffset (temp 4-component vector of uint)
 0:27            Construct combined texture-sampler (temp usampler2DArray)
 0:27              'g_tTex2du4' (uniform utexture2DArray)
 0:27              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -80,6 +80,8 @@
 0:35                1 (const int)
 0:35        Branch: Return
 0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'Depth' (out float FragDepth)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_tTex1df4a' (layout(binding=1 ) uniform texture1DArray)
 0:?     'g_tTex1df4' (layout(binding=0 ) uniform texture1DArray)
@@ -88,8 +90,6 @@
 0:?     'g_tTex2df4' (uniform texture2DArray)
 0:?     'g_tTex2di4' (uniform itexture2DArray)
 0:?     'g_tTex2du4' (uniform utexture2DArray)
-0:?     'Color' (layout(location=0 ) out 4-component vector of float)
-0:?     'Depth' (out float FragDepth)
 
 
 Linked fragment stage:
@@ -104,7 +104,7 @@
 0:25      Sequence
 0:25        move second child to first child (temp 4-component vector of float)
 0:25          'txval20' (temp 4-component vector of float)
-0:25          textureGatherOffset (global 4-component vector of float)
+0:25          textureGatherOffset (temp 4-component vector of float)
 0:25            Construct combined texture-sampler (temp sampler2DArray)
 0:25              'g_tTex2df4' (uniform texture2DArray)
 0:25              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -118,7 +118,7 @@
 0:26      Sequence
 0:26        move second child to first child (temp 4-component vector of int)
 0:26          'txval21' (temp 4-component vector of int)
-0:26          textureGatherOffset (global 4-component vector of int)
+0:26          textureGatherOffset (temp 4-component vector of int)
 0:26            Construct combined texture-sampler (temp isampler2DArray)
 0:26              'g_tTex2di4' (uniform itexture2DArray)
 0:26              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -132,7 +132,7 @@
 0:27      Sequence
 0:27        move second child to first child (temp 4-component vector of uint)
 0:27          'txval22' (temp 4-component vector of uint)
-0:27          textureGatherOffset (global 4-component vector of uint)
+0:27          textureGatherOffset (temp 4-component vector of uint)
 0:27            Construct combined texture-sampler (temp usampler2DArray)
 0:27              'g_tTex2du4' (uniform utexture2DArray)
 0:27              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -176,6 +176,8 @@
 0:35                1 (const int)
 0:35        Branch: Return
 0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'Depth' (out float FragDepth)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_tTex1df4a' (layout(binding=1 ) uniform texture1DArray)
 0:?     'g_tTex1df4' (layout(binding=0 ) uniform texture1DArray)
@@ -184,8 +186,6 @@
 0:?     'g_tTex2df4' (uniform texture2DArray)
 0:?     'g_tTex2di4' (uniform itexture2DArray)
 0:?     'g_tTex2du4' (uniform utexture2DArray)
-0:?     'Color' (layout(location=0 ) out 4-component vector of float)
-0:?     'Depth' (out float FragDepth)
 
 // Module Version 10000
 // Generated by (magic number): 80001
diff --git a/Test/baseResults/hlsl.gatherRGBA.array.dx10.frag.out b/Test/baseResults/hlsl.gatherRGBA.array.dx10.frag.out
index 4e78cda..b04a857 100644
--- a/Test/baseResults/hlsl.gatherRGBA.array.dx10.frag.out
+++ b/Test/baseResults/hlsl.gatherRGBA.array.dx10.frag.out
@@ -8,7 +8,7 @@
 0:33      Sequence
 0:33        move second child to first child (temp 4-component vector of float)
 0:33          'txval00' (temp 4-component vector of float)
-0:33          textureGather (global 4-component vector of float)
+0:33          textureGather (temp 4-component vector of float)
 0:33            Construct combined texture-sampler (temp sampler2DArray)
 0:33              'g_tTex2df4a' (uniform texture2DArray)
 0:33              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -21,7 +21,7 @@
 0:34      Sequence
 0:34        move second child to first child (temp 4-component vector of int)
 0:34          'txval01' (temp 4-component vector of int)
-0:34          textureGather (global 4-component vector of int)
+0:34          textureGather (temp 4-component vector of int)
 0:34            Construct combined texture-sampler (temp isampler2DArray)
 0:34              'g_tTex2di4a' (uniform itexture2DArray)
 0:34              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -34,7 +34,7 @@
 0:35      Sequence
 0:35        move second child to first child (temp 4-component vector of uint)
 0:35          'txval02' (temp 4-component vector of uint)
-0:35          textureGather (global 4-component vector of uint)
+0:35          textureGather (temp 4-component vector of uint)
 0:35            Construct combined texture-sampler (temp usampler2DArray)
 0:35              'g_tTex2du4a' (uniform utexture2DArray)
 0:35              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -47,7 +47,7 @@
 0:37      Sequence
 0:37        move second child to first child (temp 4-component vector of float)
 0:37          'txval10' (temp 4-component vector of float)
-0:37          textureGather (global 4-component vector of float)
+0:37          textureGather (temp 4-component vector of float)
 0:37            Construct combined texture-sampler (temp sampler2DArray)
 0:37              'g_tTex2df4a' (uniform texture2DArray)
 0:37              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -60,7 +60,7 @@
 0:38      Sequence
 0:38        move second child to first child (temp 4-component vector of int)
 0:38          'txval11' (temp 4-component vector of int)
-0:38          textureGather (global 4-component vector of int)
+0:38          textureGather (temp 4-component vector of int)
 0:38            Construct combined texture-sampler (temp isampler2DArray)
 0:38              'g_tTex2di4a' (uniform itexture2DArray)
 0:38              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -73,7 +73,7 @@
 0:39      Sequence
 0:39        move second child to first child (temp 4-component vector of uint)
 0:39          'txval12' (temp 4-component vector of uint)
-0:39          textureGather (global 4-component vector of uint)
+0:39          textureGather (temp 4-component vector of uint)
 0:39            Construct combined texture-sampler (temp usampler2DArray)
 0:39              'g_tTex2du4a' (uniform utexture2DArray)
 0:39              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -86,7 +86,7 @@
 0:41      Sequence
 0:41        move second child to first child (temp 4-component vector of float)
 0:41          'txval20' (temp 4-component vector of float)
-0:41          textureGather (global 4-component vector of float)
+0:41          textureGather (temp 4-component vector of float)
 0:41            Construct combined texture-sampler (temp sampler2DArray)
 0:41              'g_tTex2df4a' (uniform texture2DArray)
 0:41              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -99,7 +99,7 @@
 0:42      Sequence
 0:42        move second child to first child (temp 4-component vector of int)
 0:42          'txval21' (temp 4-component vector of int)
-0:42          textureGather (global 4-component vector of int)
+0:42          textureGather (temp 4-component vector of int)
 0:42            Construct combined texture-sampler (temp isampler2DArray)
 0:42              'g_tTex2di4a' (uniform itexture2DArray)
 0:42              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -112,7 +112,7 @@
 0:43      Sequence
 0:43        move second child to first child (temp 4-component vector of uint)
 0:43          'txval22' (temp 4-component vector of uint)
-0:43          textureGather (global 4-component vector of uint)
+0:43          textureGather (temp 4-component vector of uint)
 0:43            Construct combined texture-sampler (temp usampler2DArray)
 0:43              'g_tTex2du4a' (uniform utexture2DArray)
 0:43              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -125,7 +125,7 @@
 0:45      Sequence
 0:45        move second child to first child (temp 4-component vector of float)
 0:45          'txval30' (temp 4-component vector of float)
-0:45          textureGather (global 4-component vector of float)
+0:45          textureGather (temp 4-component vector of float)
 0:45            Construct combined texture-sampler (temp sampler2DArray)
 0:45              'g_tTex2df4a' (uniform texture2DArray)
 0:45              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -138,7 +138,7 @@
 0:46      Sequence
 0:46        move second child to first child (temp 4-component vector of int)
 0:46          'txval31' (temp 4-component vector of int)
-0:46          textureGather (global 4-component vector of int)
+0:46          textureGather (temp 4-component vector of int)
 0:46            Construct combined texture-sampler (temp isampler2DArray)
 0:46              'g_tTex2di4a' (uniform itexture2DArray)
 0:46              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -151,7 +151,7 @@
 0:47      Sequence
 0:47        move second child to first child (temp 4-component vector of uint)
 0:47          'txval32' (temp 4-component vector of uint)
-0:47          textureGather (global 4-component vector of uint)
+0:47          textureGather (temp 4-component vector of uint)
 0:47            Construct combined texture-sampler (temp usampler2DArray)
 0:47              'g_tTex2du4a' (uniform utexture2DArray)
 0:47              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -164,7 +164,7 @@
 0:51      Sequence
 0:51        move second child to first child (temp 4-component vector of float)
 0:51          'txval40' (temp 4-component vector of float)
-0:51          textureGather (global 4-component vector of float)
+0:51          textureGather (temp 4-component vector of float)
 0:51            Construct combined texture-sampler (temp samplerCubeArray)
 0:51              'g_tTexcdf4a' (uniform textureCubeArray)
 0:51              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -177,7 +177,7 @@
 0:52      Sequence
 0:52        move second child to first child (temp 4-component vector of int)
 0:52          'txval41' (temp 4-component vector of int)
-0:52          textureGather (global 4-component vector of int)
+0:52          textureGather (temp 4-component vector of int)
 0:52            Construct combined texture-sampler (temp isamplerCubeArray)
 0:52              'g_tTexcdi4a' (uniform itextureCubeArray)
 0:52              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -190,7 +190,7 @@
 0:53      Sequence
 0:53        move second child to first child (temp 4-component vector of uint)
 0:53          'txval42' (temp 4-component vector of uint)
-0:53          textureGather (global 4-component vector of uint)
+0:53          textureGather (temp 4-component vector of uint)
 0:53            Construct combined texture-sampler (temp usamplerCubeArray)
 0:53              'g_tTexcdu4a' (uniform utextureCubeArray)
 0:53              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -203,7 +203,7 @@
 0:55      Sequence
 0:55        move second child to first child (temp 4-component vector of float)
 0:55          'txval50' (temp 4-component vector of float)
-0:55          textureGather (global 4-component vector of float)
+0:55          textureGather (temp 4-component vector of float)
 0:55            Construct combined texture-sampler (temp samplerCubeArray)
 0:55              'g_tTexcdf4a' (uniform textureCubeArray)
 0:55              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -216,7 +216,7 @@
 0:56      Sequence
 0:56        move second child to first child (temp 4-component vector of int)
 0:56          'txval51' (temp 4-component vector of int)
-0:56          textureGather (global 4-component vector of int)
+0:56          textureGather (temp 4-component vector of int)
 0:56            Construct combined texture-sampler (temp isamplerCubeArray)
 0:56              'g_tTexcdi4a' (uniform itextureCubeArray)
 0:56              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -229,7 +229,7 @@
 0:57      Sequence
 0:57        move second child to first child (temp 4-component vector of uint)
 0:57          'txval52' (temp 4-component vector of uint)
-0:57          textureGather (global 4-component vector of uint)
+0:57          textureGather (temp 4-component vector of uint)
 0:57            Construct combined texture-sampler (temp usamplerCubeArray)
 0:57              'g_tTexcdu4a' (uniform utextureCubeArray)
 0:57              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -242,7 +242,7 @@
 0:59      Sequence
 0:59        move second child to first child (temp 4-component vector of float)
 0:59          'txval60' (temp 4-component vector of float)
-0:59          textureGather (global 4-component vector of float)
+0:59          textureGather (temp 4-component vector of float)
 0:59            Construct combined texture-sampler (temp samplerCubeArray)
 0:59              'g_tTexcdf4a' (uniform textureCubeArray)
 0:59              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -255,7 +255,7 @@
 0:60      Sequence
 0:60        move second child to first child (temp 4-component vector of int)
 0:60          'txval61' (temp 4-component vector of int)
-0:60          textureGather (global 4-component vector of int)
+0:60          textureGather (temp 4-component vector of int)
 0:60            Construct combined texture-sampler (temp isamplerCubeArray)
 0:60              'g_tTexcdi4a' (uniform itextureCubeArray)
 0:60              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -268,7 +268,7 @@
 0:61      Sequence
 0:61        move second child to first child (temp 4-component vector of uint)
 0:61          'txval62' (temp 4-component vector of uint)
-0:61          textureGather (global 4-component vector of uint)
+0:61          textureGather (temp 4-component vector of uint)
 0:61            Construct combined texture-sampler (temp usamplerCubeArray)
 0:61              'g_tTexcdu4a' (uniform utextureCubeArray)
 0:61              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -281,7 +281,7 @@
 0:63      Sequence
 0:63        move second child to first child (temp 4-component vector of float)
 0:63          'txval70' (temp 4-component vector of float)
-0:63          textureGather (global 4-component vector of float)
+0:63          textureGather (temp 4-component vector of float)
 0:63            Construct combined texture-sampler (temp samplerCubeArray)
 0:63              'g_tTexcdf4a' (uniform textureCubeArray)
 0:63              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -294,7 +294,7 @@
 0:64      Sequence
 0:64        move second child to first child (temp 4-component vector of int)
 0:64          'txval71' (temp 4-component vector of int)
-0:64          textureGather (global 4-component vector of int)
+0:64          textureGather (temp 4-component vector of int)
 0:64            Construct combined texture-sampler (temp isamplerCubeArray)
 0:64              'g_tTexcdi4a' (uniform itextureCubeArray)
 0:64              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -307,7 +307,7 @@
 0:65      Sequence
 0:65        move second child to first child (temp 4-component vector of uint)
 0:65          'txval72' (temp 4-component vector of uint)
-0:65          textureGather (global 4-component vector of uint)
+0:65          textureGather (temp 4-component vector of uint)
 0:65            Construct combined texture-sampler (temp usamplerCubeArray)
 0:65              'g_tTexcdu4a' (uniform utextureCubeArray)
 0:65              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -350,6 +350,8 @@
 0:70                1 (const int)
 0:70        Branch: Return
 0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'Depth' (out float FragDepth)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_sSamp2d' (uniform sampler)
 0:?     'g_tTex1df4a' (layout(binding=0 ) uniform texture1DArray)
@@ -361,9 +363,7 @@
 0:?     'g_tTexcdf4a' (uniform textureCubeArray)
 0:?     'g_tTexcdi4a' (uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' (uniform utextureCubeArray)
-0:?     'Color' (layout(location=0 ) out 4-component vector of float)
-0:?     'Depth' (out float FragDepth)
-0:?     'anon@0' (uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4})
+0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4})
 
 
 Linked fragment stage:
@@ -378,7 +378,7 @@
 0:33      Sequence
 0:33        move second child to first child (temp 4-component vector of float)
 0:33          'txval00' (temp 4-component vector of float)
-0:33          textureGather (global 4-component vector of float)
+0:33          textureGather (temp 4-component vector of float)
 0:33            Construct combined texture-sampler (temp sampler2DArray)
 0:33              'g_tTex2df4a' (uniform texture2DArray)
 0:33              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -391,7 +391,7 @@
 0:34      Sequence
 0:34        move second child to first child (temp 4-component vector of int)
 0:34          'txval01' (temp 4-component vector of int)
-0:34          textureGather (global 4-component vector of int)
+0:34          textureGather (temp 4-component vector of int)
 0:34            Construct combined texture-sampler (temp isampler2DArray)
 0:34              'g_tTex2di4a' (uniform itexture2DArray)
 0:34              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -404,7 +404,7 @@
 0:35      Sequence
 0:35        move second child to first child (temp 4-component vector of uint)
 0:35          'txval02' (temp 4-component vector of uint)
-0:35          textureGather (global 4-component vector of uint)
+0:35          textureGather (temp 4-component vector of uint)
 0:35            Construct combined texture-sampler (temp usampler2DArray)
 0:35              'g_tTex2du4a' (uniform utexture2DArray)
 0:35              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -417,7 +417,7 @@
 0:37      Sequence
 0:37        move second child to first child (temp 4-component vector of float)
 0:37          'txval10' (temp 4-component vector of float)
-0:37          textureGather (global 4-component vector of float)
+0:37          textureGather (temp 4-component vector of float)
 0:37            Construct combined texture-sampler (temp sampler2DArray)
 0:37              'g_tTex2df4a' (uniform texture2DArray)
 0:37              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -430,7 +430,7 @@
 0:38      Sequence
 0:38        move second child to first child (temp 4-component vector of int)
 0:38          'txval11' (temp 4-component vector of int)
-0:38          textureGather (global 4-component vector of int)
+0:38          textureGather (temp 4-component vector of int)
 0:38            Construct combined texture-sampler (temp isampler2DArray)
 0:38              'g_tTex2di4a' (uniform itexture2DArray)
 0:38              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -443,7 +443,7 @@
 0:39      Sequence
 0:39        move second child to first child (temp 4-component vector of uint)
 0:39          'txval12' (temp 4-component vector of uint)
-0:39          textureGather (global 4-component vector of uint)
+0:39          textureGather (temp 4-component vector of uint)
 0:39            Construct combined texture-sampler (temp usampler2DArray)
 0:39              'g_tTex2du4a' (uniform utexture2DArray)
 0:39              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -456,7 +456,7 @@
 0:41      Sequence
 0:41        move second child to first child (temp 4-component vector of float)
 0:41          'txval20' (temp 4-component vector of float)
-0:41          textureGather (global 4-component vector of float)
+0:41          textureGather (temp 4-component vector of float)
 0:41            Construct combined texture-sampler (temp sampler2DArray)
 0:41              'g_tTex2df4a' (uniform texture2DArray)
 0:41              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -469,7 +469,7 @@
 0:42      Sequence
 0:42        move second child to first child (temp 4-component vector of int)
 0:42          'txval21' (temp 4-component vector of int)
-0:42          textureGather (global 4-component vector of int)
+0:42          textureGather (temp 4-component vector of int)
 0:42            Construct combined texture-sampler (temp isampler2DArray)
 0:42              'g_tTex2di4a' (uniform itexture2DArray)
 0:42              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -482,7 +482,7 @@
 0:43      Sequence
 0:43        move second child to first child (temp 4-component vector of uint)
 0:43          'txval22' (temp 4-component vector of uint)
-0:43          textureGather (global 4-component vector of uint)
+0:43          textureGather (temp 4-component vector of uint)
 0:43            Construct combined texture-sampler (temp usampler2DArray)
 0:43              'g_tTex2du4a' (uniform utexture2DArray)
 0:43              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -495,7 +495,7 @@
 0:45      Sequence
 0:45        move second child to first child (temp 4-component vector of float)
 0:45          'txval30' (temp 4-component vector of float)
-0:45          textureGather (global 4-component vector of float)
+0:45          textureGather (temp 4-component vector of float)
 0:45            Construct combined texture-sampler (temp sampler2DArray)
 0:45              'g_tTex2df4a' (uniform texture2DArray)
 0:45              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -508,7 +508,7 @@
 0:46      Sequence
 0:46        move second child to first child (temp 4-component vector of int)
 0:46          'txval31' (temp 4-component vector of int)
-0:46          textureGather (global 4-component vector of int)
+0:46          textureGather (temp 4-component vector of int)
 0:46            Construct combined texture-sampler (temp isampler2DArray)
 0:46              'g_tTex2di4a' (uniform itexture2DArray)
 0:46              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -521,7 +521,7 @@
 0:47      Sequence
 0:47        move second child to first child (temp 4-component vector of uint)
 0:47          'txval32' (temp 4-component vector of uint)
-0:47          textureGather (global 4-component vector of uint)
+0:47          textureGather (temp 4-component vector of uint)
 0:47            Construct combined texture-sampler (temp usampler2DArray)
 0:47              'g_tTex2du4a' (uniform utexture2DArray)
 0:47              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -534,7 +534,7 @@
 0:51      Sequence
 0:51        move second child to first child (temp 4-component vector of float)
 0:51          'txval40' (temp 4-component vector of float)
-0:51          textureGather (global 4-component vector of float)
+0:51          textureGather (temp 4-component vector of float)
 0:51            Construct combined texture-sampler (temp samplerCubeArray)
 0:51              'g_tTexcdf4a' (uniform textureCubeArray)
 0:51              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -547,7 +547,7 @@
 0:52      Sequence
 0:52        move second child to first child (temp 4-component vector of int)
 0:52          'txval41' (temp 4-component vector of int)
-0:52          textureGather (global 4-component vector of int)
+0:52          textureGather (temp 4-component vector of int)
 0:52            Construct combined texture-sampler (temp isamplerCubeArray)
 0:52              'g_tTexcdi4a' (uniform itextureCubeArray)
 0:52              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -560,7 +560,7 @@
 0:53      Sequence
 0:53        move second child to first child (temp 4-component vector of uint)
 0:53          'txval42' (temp 4-component vector of uint)
-0:53          textureGather (global 4-component vector of uint)
+0:53          textureGather (temp 4-component vector of uint)
 0:53            Construct combined texture-sampler (temp usamplerCubeArray)
 0:53              'g_tTexcdu4a' (uniform utextureCubeArray)
 0:53              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -573,7 +573,7 @@
 0:55      Sequence
 0:55        move second child to first child (temp 4-component vector of float)
 0:55          'txval50' (temp 4-component vector of float)
-0:55          textureGather (global 4-component vector of float)
+0:55          textureGather (temp 4-component vector of float)
 0:55            Construct combined texture-sampler (temp samplerCubeArray)
 0:55              'g_tTexcdf4a' (uniform textureCubeArray)
 0:55              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -586,7 +586,7 @@
 0:56      Sequence
 0:56        move second child to first child (temp 4-component vector of int)
 0:56          'txval51' (temp 4-component vector of int)
-0:56          textureGather (global 4-component vector of int)
+0:56          textureGather (temp 4-component vector of int)
 0:56            Construct combined texture-sampler (temp isamplerCubeArray)
 0:56              'g_tTexcdi4a' (uniform itextureCubeArray)
 0:56              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -599,7 +599,7 @@
 0:57      Sequence
 0:57        move second child to first child (temp 4-component vector of uint)
 0:57          'txval52' (temp 4-component vector of uint)
-0:57          textureGather (global 4-component vector of uint)
+0:57          textureGather (temp 4-component vector of uint)
 0:57            Construct combined texture-sampler (temp usamplerCubeArray)
 0:57              'g_tTexcdu4a' (uniform utextureCubeArray)
 0:57              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -612,7 +612,7 @@
 0:59      Sequence
 0:59        move second child to first child (temp 4-component vector of float)
 0:59          'txval60' (temp 4-component vector of float)
-0:59          textureGather (global 4-component vector of float)
+0:59          textureGather (temp 4-component vector of float)
 0:59            Construct combined texture-sampler (temp samplerCubeArray)
 0:59              'g_tTexcdf4a' (uniform textureCubeArray)
 0:59              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -625,7 +625,7 @@
 0:60      Sequence
 0:60        move second child to first child (temp 4-component vector of int)
 0:60          'txval61' (temp 4-component vector of int)
-0:60          textureGather (global 4-component vector of int)
+0:60          textureGather (temp 4-component vector of int)
 0:60            Construct combined texture-sampler (temp isamplerCubeArray)
 0:60              'g_tTexcdi4a' (uniform itextureCubeArray)
 0:60              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -638,7 +638,7 @@
 0:61      Sequence
 0:61        move second child to first child (temp 4-component vector of uint)
 0:61          'txval62' (temp 4-component vector of uint)
-0:61          textureGather (global 4-component vector of uint)
+0:61          textureGather (temp 4-component vector of uint)
 0:61            Construct combined texture-sampler (temp usamplerCubeArray)
 0:61              'g_tTexcdu4a' (uniform utextureCubeArray)
 0:61              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -651,7 +651,7 @@
 0:63      Sequence
 0:63        move second child to first child (temp 4-component vector of float)
 0:63          'txval70' (temp 4-component vector of float)
-0:63          textureGather (global 4-component vector of float)
+0:63          textureGather (temp 4-component vector of float)
 0:63            Construct combined texture-sampler (temp samplerCubeArray)
 0:63              'g_tTexcdf4a' (uniform textureCubeArray)
 0:63              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -664,7 +664,7 @@
 0:64      Sequence
 0:64        move second child to first child (temp 4-component vector of int)
 0:64          'txval71' (temp 4-component vector of int)
-0:64          textureGather (global 4-component vector of int)
+0:64          textureGather (temp 4-component vector of int)
 0:64            Construct combined texture-sampler (temp isamplerCubeArray)
 0:64              'g_tTexcdi4a' (uniform itextureCubeArray)
 0:64              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -677,7 +677,7 @@
 0:65      Sequence
 0:65        move second child to first child (temp 4-component vector of uint)
 0:65          'txval72' (temp 4-component vector of uint)
-0:65          textureGather (global 4-component vector of uint)
+0:65          textureGather (temp 4-component vector of uint)
 0:65            Construct combined texture-sampler (temp usamplerCubeArray)
 0:65              'g_tTexcdu4a' (uniform utextureCubeArray)
 0:65              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -720,6 +720,8 @@
 0:70                1 (const int)
 0:70        Branch: Return
 0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'Depth' (out float FragDepth)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_sSamp2d' (uniform sampler)
 0:?     'g_tTex1df4a' (layout(binding=0 ) uniform texture1DArray)
@@ -731,9 +733,7 @@
 0:?     'g_tTexcdf4a' (uniform textureCubeArray)
 0:?     'g_tTexcdi4a' (uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' (uniform utextureCubeArray)
-0:?     'Color' (layout(location=0 ) out 4-component vector of float)
-0:?     'Depth' (out float FragDepth)
-0:?     'anon@0' (uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4})
+0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4})
 
 // Module Version 10000
 // Generated by (magic number): 80001
diff --git a/Test/baseResults/hlsl.gatherRGBA.basic.dx10.frag.out b/Test/baseResults/hlsl.gatherRGBA.basic.dx10.frag.out
index ef1e7e0..d2fb0b1 100644
--- a/Test/baseResults/hlsl.gatherRGBA.basic.dx10.frag.out
+++ b/Test/baseResults/hlsl.gatherRGBA.basic.dx10.frag.out
@@ -8,7 +8,7 @@
 0:39      Sequence
 0:39        move second child to first child (temp 4-component vector of float)
 0:39          'txval00' (temp 4-component vector of float)
-0:39          textureGather (global 4-component vector of float)
+0:39          textureGather (temp 4-component vector of float)
 0:39            Construct combined texture-sampler (temp sampler2D)
 0:39              'g_tTex2df4' (uniform texture2D)
 0:39              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -21,7 +21,7 @@
 0:40      Sequence
 0:40        move second child to first child (temp 4-component vector of int)
 0:40          'txval01' (temp 4-component vector of int)
-0:40          textureGather (global 4-component vector of int)
+0:40          textureGather (temp 4-component vector of int)
 0:40            Construct combined texture-sampler (temp isampler2D)
 0:40              'g_tTex2di4' (uniform itexture2D)
 0:40              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -34,7 +34,7 @@
 0:41      Sequence
 0:41        move second child to first child (temp 4-component vector of uint)
 0:41          'txval02' (temp 4-component vector of uint)
-0:41          textureGather (global 4-component vector of uint)
+0:41          textureGather (temp 4-component vector of uint)
 0:41            Construct combined texture-sampler (temp usampler2D)
 0:41              'g_tTex2du4' (uniform utexture2D)
 0:41              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -47,7 +47,7 @@
 0:43      Sequence
 0:43        move second child to first child (temp 4-component vector of float)
 0:43          'txval10' (temp 4-component vector of float)
-0:43          textureGather (global 4-component vector of float)
+0:43          textureGather (temp 4-component vector of float)
 0:43            Construct combined texture-sampler (temp sampler2D)
 0:43              'g_tTex2df4' (uniform texture2D)
 0:43              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -60,7 +60,7 @@
 0:44      Sequence
 0:44        move second child to first child (temp 4-component vector of int)
 0:44          'txval11' (temp 4-component vector of int)
-0:44          textureGather (global 4-component vector of int)
+0:44          textureGather (temp 4-component vector of int)
 0:44            Construct combined texture-sampler (temp isampler2D)
 0:44              'g_tTex2di4' (uniform itexture2D)
 0:44              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -73,7 +73,7 @@
 0:45      Sequence
 0:45        move second child to first child (temp 4-component vector of uint)
 0:45          'txval12' (temp 4-component vector of uint)
-0:45          textureGather (global 4-component vector of uint)
+0:45          textureGather (temp 4-component vector of uint)
 0:45            Construct combined texture-sampler (temp usampler2D)
 0:45              'g_tTex2du4' (uniform utexture2D)
 0:45              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -86,7 +86,7 @@
 0:47      Sequence
 0:47        move second child to first child (temp 4-component vector of float)
 0:47          'txval20' (temp 4-component vector of float)
-0:47          textureGather (global 4-component vector of float)
+0:47          textureGather (temp 4-component vector of float)
 0:47            Construct combined texture-sampler (temp sampler2D)
 0:47              'g_tTex2df4' (uniform texture2D)
 0:47              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -99,7 +99,7 @@
 0:48      Sequence
 0:48        move second child to first child (temp 4-component vector of int)
 0:48          'txval21' (temp 4-component vector of int)
-0:48          textureGather (global 4-component vector of int)
+0:48          textureGather (temp 4-component vector of int)
 0:48            Construct combined texture-sampler (temp isampler2D)
 0:48              'g_tTex2di4' (uniform itexture2D)
 0:48              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -112,7 +112,7 @@
 0:49      Sequence
 0:49        move second child to first child (temp 4-component vector of uint)
 0:49          'txval22' (temp 4-component vector of uint)
-0:49          textureGather (global 4-component vector of uint)
+0:49          textureGather (temp 4-component vector of uint)
 0:49            Construct combined texture-sampler (temp usampler2D)
 0:49              'g_tTex2du4' (uniform utexture2D)
 0:49              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -125,7 +125,7 @@
 0:51      Sequence
 0:51        move second child to first child (temp 4-component vector of float)
 0:51          'txval30' (temp 4-component vector of float)
-0:51          textureGather (global 4-component vector of float)
+0:51          textureGather (temp 4-component vector of float)
 0:51            Construct combined texture-sampler (temp sampler2D)
 0:51              'g_tTex2df4' (uniform texture2D)
 0:51              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -138,7 +138,7 @@
 0:52      Sequence
 0:52        move second child to first child (temp 4-component vector of int)
 0:52          'txval31' (temp 4-component vector of int)
-0:52          textureGather (global 4-component vector of int)
+0:52          textureGather (temp 4-component vector of int)
 0:52            Construct combined texture-sampler (temp isampler2D)
 0:52              'g_tTex2di4' (uniform itexture2D)
 0:52              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -151,7 +151,7 @@
 0:53      Sequence
 0:53        move second child to first child (temp 4-component vector of uint)
 0:53          'txval32' (temp 4-component vector of uint)
-0:53          textureGather (global 4-component vector of uint)
+0:53          textureGather (temp 4-component vector of uint)
 0:53            Construct combined texture-sampler (temp usampler2D)
 0:53              'g_tTex2du4' (uniform utexture2D)
 0:53              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -164,7 +164,7 @@
 0:57      Sequence
 0:57        move second child to first child (temp 4-component vector of float)
 0:57          'txval40' (temp 4-component vector of float)
-0:57          textureGather (global 4-component vector of float)
+0:57          textureGather (temp 4-component vector of float)
 0:57            Construct combined texture-sampler (temp samplerCube)
 0:57              'g_tTexcdf4' (uniform textureCube)
 0:57              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -177,7 +177,7 @@
 0:58      Sequence
 0:58        move second child to first child (temp 4-component vector of int)
 0:58          'txval41' (temp 4-component vector of int)
-0:58          textureGather (global 4-component vector of int)
+0:58          textureGather (temp 4-component vector of int)
 0:58            Construct combined texture-sampler (temp isamplerCube)
 0:58              'g_tTexcdi4' (uniform itextureCube)
 0:58              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -190,7 +190,7 @@
 0:59      Sequence
 0:59        move second child to first child (temp 4-component vector of uint)
 0:59          'txval42' (temp 4-component vector of uint)
-0:59          textureGather (global 4-component vector of uint)
+0:59          textureGather (temp 4-component vector of uint)
 0:59            Construct combined texture-sampler (temp usamplerCube)
 0:59              'g_tTexcdu4' (uniform utextureCube)
 0:59              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -203,7 +203,7 @@
 0:61      Sequence
 0:61        move second child to first child (temp 4-component vector of float)
 0:61          'txval50' (temp 4-component vector of float)
-0:61          textureGather (global 4-component vector of float)
+0:61          textureGather (temp 4-component vector of float)
 0:61            Construct combined texture-sampler (temp samplerCube)
 0:61              'g_tTexcdf4' (uniform textureCube)
 0:61              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -216,7 +216,7 @@
 0:62      Sequence
 0:62        move second child to first child (temp 4-component vector of int)
 0:62          'txval51' (temp 4-component vector of int)
-0:62          textureGather (global 4-component vector of int)
+0:62          textureGather (temp 4-component vector of int)
 0:62            Construct combined texture-sampler (temp isamplerCube)
 0:62              'g_tTexcdi4' (uniform itextureCube)
 0:62              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -229,7 +229,7 @@
 0:63      Sequence
 0:63        move second child to first child (temp 4-component vector of uint)
 0:63          'txval52' (temp 4-component vector of uint)
-0:63          textureGather (global 4-component vector of uint)
+0:63          textureGather (temp 4-component vector of uint)
 0:63            Construct combined texture-sampler (temp usamplerCube)
 0:63              'g_tTexcdu4' (uniform utextureCube)
 0:63              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -242,7 +242,7 @@
 0:65      Sequence
 0:65        move second child to first child (temp 4-component vector of float)
 0:65          'txval60' (temp 4-component vector of float)
-0:65          textureGather (global 4-component vector of float)
+0:65          textureGather (temp 4-component vector of float)
 0:65            Construct combined texture-sampler (temp samplerCube)
 0:65              'g_tTexcdf4' (uniform textureCube)
 0:65              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -255,7 +255,7 @@
 0:66      Sequence
 0:66        move second child to first child (temp 4-component vector of int)
 0:66          'txval61' (temp 4-component vector of int)
-0:66          textureGather (global 4-component vector of int)
+0:66          textureGather (temp 4-component vector of int)
 0:66            Construct combined texture-sampler (temp isamplerCube)
 0:66              'g_tTexcdi4' (uniform itextureCube)
 0:66              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -268,7 +268,7 @@
 0:67      Sequence
 0:67        move second child to first child (temp 4-component vector of uint)
 0:67          'txval62' (temp 4-component vector of uint)
-0:67          textureGather (global 4-component vector of uint)
+0:67          textureGather (temp 4-component vector of uint)
 0:67            Construct combined texture-sampler (temp usamplerCube)
 0:67              'g_tTexcdu4' (uniform utextureCube)
 0:67              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -281,7 +281,7 @@
 0:69      Sequence
 0:69        move second child to first child (temp 4-component vector of float)
 0:69          'txval70' (temp 4-component vector of float)
-0:69          textureGather (global 4-component vector of float)
+0:69          textureGather (temp 4-component vector of float)
 0:69            Construct combined texture-sampler (temp samplerCube)
 0:69              'g_tTexcdf4' (uniform textureCube)
 0:69              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -294,7 +294,7 @@
 0:70      Sequence
 0:70        move second child to first child (temp 4-component vector of int)
 0:70          'txval71' (temp 4-component vector of int)
-0:70          textureGather (global 4-component vector of int)
+0:70          textureGather (temp 4-component vector of int)
 0:70            Construct combined texture-sampler (temp isamplerCube)
 0:70              'g_tTexcdi4' (uniform itextureCube)
 0:70              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -307,7 +307,7 @@
 0:71      Sequence
 0:71        move second child to first child (temp 4-component vector of uint)
 0:71          'txval72' (temp 4-component vector of uint)
-0:71          textureGather (global 4-component vector of uint)
+0:71          textureGather (temp 4-component vector of uint)
 0:71            Construct combined texture-sampler (temp usamplerCube)
 0:71              'g_tTexcdu4' (uniform utextureCube)
 0:71              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -350,6 +350,8 @@
 0:76                1 (const int)
 0:76        Branch: Return
 0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'Depth' (out float FragDepth)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_sSamp2d' (uniform sampler)
 0:?     'g_tTex1df4a' (layout(binding=1 ) uniform texture1D)
@@ -365,9 +367,7 @@
 0:?     'g_tTexcdf4' (uniform textureCube)
 0:?     'g_tTexcdi4' (uniform itextureCube)
 0:?     'g_tTexcdu4' (uniform utextureCube)
-0:?     'Color' (layout(location=0 ) out 4-component vector of float)
-0:?     'Depth' (out float FragDepth)
-0:?     'anon@0' (uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4})
+0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4})
 
 
 Linked fragment stage:
@@ -382,7 +382,7 @@
 0:39      Sequence
 0:39        move second child to first child (temp 4-component vector of float)
 0:39          'txval00' (temp 4-component vector of float)
-0:39          textureGather (global 4-component vector of float)
+0:39          textureGather (temp 4-component vector of float)
 0:39            Construct combined texture-sampler (temp sampler2D)
 0:39              'g_tTex2df4' (uniform texture2D)
 0:39              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -395,7 +395,7 @@
 0:40      Sequence
 0:40        move second child to first child (temp 4-component vector of int)
 0:40          'txval01' (temp 4-component vector of int)
-0:40          textureGather (global 4-component vector of int)
+0:40          textureGather (temp 4-component vector of int)
 0:40            Construct combined texture-sampler (temp isampler2D)
 0:40              'g_tTex2di4' (uniform itexture2D)
 0:40              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -408,7 +408,7 @@
 0:41      Sequence
 0:41        move second child to first child (temp 4-component vector of uint)
 0:41          'txval02' (temp 4-component vector of uint)
-0:41          textureGather (global 4-component vector of uint)
+0:41          textureGather (temp 4-component vector of uint)
 0:41            Construct combined texture-sampler (temp usampler2D)
 0:41              'g_tTex2du4' (uniform utexture2D)
 0:41              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -421,7 +421,7 @@
 0:43      Sequence
 0:43        move second child to first child (temp 4-component vector of float)
 0:43          'txval10' (temp 4-component vector of float)
-0:43          textureGather (global 4-component vector of float)
+0:43          textureGather (temp 4-component vector of float)
 0:43            Construct combined texture-sampler (temp sampler2D)
 0:43              'g_tTex2df4' (uniform texture2D)
 0:43              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -434,7 +434,7 @@
 0:44      Sequence
 0:44        move second child to first child (temp 4-component vector of int)
 0:44          'txval11' (temp 4-component vector of int)
-0:44          textureGather (global 4-component vector of int)
+0:44          textureGather (temp 4-component vector of int)
 0:44            Construct combined texture-sampler (temp isampler2D)
 0:44              'g_tTex2di4' (uniform itexture2D)
 0:44              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -447,7 +447,7 @@
 0:45      Sequence
 0:45        move second child to first child (temp 4-component vector of uint)
 0:45          'txval12' (temp 4-component vector of uint)
-0:45          textureGather (global 4-component vector of uint)
+0:45          textureGather (temp 4-component vector of uint)
 0:45            Construct combined texture-sampler (temp usampler2D)
 0:45              'g_tTex2du4' (uniform utexture2D)
 0:45              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -460,7 +460,7 @@
 0:47      Sequence
 0:47        move second child to first child (temp 4-component vector of float)
 0:47          'txval20' (temp 4-component vector of float)
-0:47          textureGather (global 4-component vector of float)
+0:47          textureGather (temp 4-component vector of float)
 0:47            Construct combined texture-sampler (temp sampler2D)
 0:47              'g_tTex2df4' (uniform texture2D)
 0:47              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -473,7 +473,7 @@
 0:48      Sequence
 0:48        move second child to first child (temp 4-component vector of int)
 0:48          'txval21' (temp 4-component vector of int)
-0:48          textureGather (global 4-component vector of int)
+0:48          textureGather (temp 4-component vector of int)
 0:48            Construct combined texture-sampler (temp isampler2D)
 0:48              'g_tTex2di4' (uniform itexture2D)
 0:48              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -486,7 +486,7 @@
 0:49      Sequence
 0:49        move second child to first child (temp 4-component vector of uint)
 0:49          'txval22' (temp 4-component vector of uint)
-0:49          textureGather (global 4-component vector of uint)
+0:49          textureGather (temp 4-component vector of uint)
 0:49            Construct combined texture-sampler (temp usampler2D)
 0:49              'g_tTex2du4' (uniform utexture2D)
 0:49              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -499,7 +499,7 @@
 0:51      Sequence
 0:51        move second child to first child (temp 4-component vector of float)
 0:51          'txval30' (temp 4-component vector of float)
-0:51          textureGather (global 4-component vector of float)
+0:51          textureGather (temp 4-component vector of float)
 0:51            Construct combined texture-sampler (temp sampler2D)
 0:51              'g_tTex2df4' (uniform texture2D)
 0:51              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -512,7 +512,7 @@
 0:52      Sequence
 0:52        move second child to first child (temp 4-component vector of int)
 0:52          'txval31' (temp 4-component vector of int)
-0:52          textureGather (global 4-component vector of int)
+0:52          textureGather (temp 4-component vector of int)
 0:52            Construct combined texture-sampler (temp isampler2D)
 0:52              'g_tTex2di4' (uniform itexture2D)
 0:52              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -525,7 +525,7 @@
 0:53      Sequence
 0:53        move second child to first child (temp 4-component vector of uint)
 0:53          'txval32' (temp 4-component vector of uint)
-0:53          textureGather (global 4-component vector of uint)
+0:53          textureGather (temp 4-component vector of uint)
 0:53            Construct combined texture-sampler (temp usampler2D)
 0:53              'g_tTex2du4' (uniform utexture2D)
 0:53              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -538,7 +538,7 @@
 0:57      Sequence
 0:57        move second child to first child (temp 4-component vector of float)
 0:57          'txval40' (temp 4-component vector of float)
-0:57          textureGather (global 4-component vector of float)
+0:57          textureGather (temp 4-component vector of float)
 0:57            Construct combined texture-sampler (temp samplerCube)
 0:57              'g_tTexcdf4' (uniform textureCube)
 0:57              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -551,7 +551,7 @@
 0:58      Sequence
 0:58        move second child to first child (temp 4-component vector of int)
 0:58          'txval41' (temp 4-component vector of int)
-0:58          textureGather (global 4-component vector of int)
+0:58          textureGather (temp 4-component vector of int)
 0:58            Construct combined texture-sampler (temp isamplerCube)
 0:58              'g_tTexcdi4' (uniform itextureCube)
 0:58              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -564,7 +564,7 @@
 0:59      Sequence
 0:59        move second child to first child (temp 4-component vector of uint)
 0:59          'txval42' (temp 4-component vector of uint)
-0:59          textureGather (global 4-component vector of uint)
+0:59          textureGather (temp 4-component vector of uint)
 0:59            Construct combined texture-sampler (temp usamplerCube)
 0:59              'g_tTexcdu4' (uniform utextureCube)
 0:59              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -577,7 +577,7 @@
 0:61      Sequence
 0:61        move second child to first child (temp 4-component vector of float)
 0:61          'txval50' (temp 4-component vector of float)
-0:61          textureGather (global 4-component vector of float)
+0:61          textureGather (temp 4-component vector of float)
 0:61            Construct combined texture-sampler (temp samplerCube)
 0:61              'g_tTexcdf4' (uniform textureCube)
 0:61              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -590,7 +590,7 @@
 0:62      Sequence
 0:62        move second child to first child (temp 4-component vector of int)
 0:62          'txval51' (temp 4-component vector of int)
-0:62          textureGather (global 4-component vector of int)
+0:62          textureGather (temp 4-component vector of int)
 0:62            Construct combined texture-sampler (temp isamplerCube)
 0:62              'g_tTexcdi4' (uniform itextureCube)
 0:62              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -603,7 +603,7 @@
 0:63      Sequence
 0:63        move second child to first child (temp 4-component vector of uint)
 0:63          'txval52' (temp 4-component vector of uint)
-0:63          textureGather (global 4-component vector of uint)
+0:63          textureGather (temp 4-component vector of uint)
 0:63            Construct combined texture-sampler (temp usamplerCube)
 0:63              'g_tTexcdu4' (uniform utextureCube)
 0:63              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -616,7 +616,7 @@
 0:65      Sequence
 0:65        move second child to first child (temp 4-component vector of float)
 0:65          'txval60' (temp 4-component vector of float)
-0:65          textureGather (global 4-component vector of float)
+0:65          textureGather (temp 4-component vector of float)
 0:65            Construct combined texture-sampler (temp samplerCube)
 0:65              'g_tTexcdf4' (uniform textureCube)
 0:65              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -629,7 +629,7 @@
 0:66      Sequence
 0:66        move second child to first child (temp 4-component vector of int)
 0:66          'txval61' (temp 4-component vector of int)
-0:66          textureGather (global 4-component vector of int)
+0:66          textureGather (temp 4-component vector of int)
 0:66            Construct combined texture-sampler (temp isamplerCube)
 0:66              'g_tTexcdi4' (uniform itextureCube)
 0:66              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -642,7 +642,7 @@
 0:67      Sequence
 0:67        move second child to first child (temp 4-component vector of uint)
 0:67          'txval62' (temp 4-component vector of uint)
-0:67          textureGather (global 4-component vector of uint)
+0:67          textureGather (temp 4-component vector of uint)
 0:67            Construct combined texture-sampler (temp usamplerCube)
 0:67              'g_tTexcdu4' (uniform utextureCube)
 0:67              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -655,7 +655,7 @@
 0:69      Sequence
 0:69        move second child to first child (temp 4-component vector of float)
 0:69          'txval70' (temp 4-component vector of float)
-0:69          textureGather (global 4-component vector of float)
+0:69          textureGather (temp 4-component vector of float)
 0:69            Construct combined texture-sampler (temp samplerCube)
 0:69              'g_tTexcdf4' (uniform textureCube)
 0:69              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -668,7 +668,7 @@
 0:70      Sequence
 0:70        move second child to first child (temp 4-component vector of int)
 0:70          'txval71' (temp 4-component vector of int)
-0:70          textureGather (global 4-component vector of int)
+0:70          textureGather (temp 4-component vector of int)
 0:70            Construct combined texture-sampler (temp isamplerCube)
 0:70              'g_tTexcdi4' (uniform itextureCube)
 0:70              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -681,7 +681,7 @@
 0:71      Sequence
 0:71        move second child to first child (temp 4-component vector of uint)
 0:71          'txval72' (temp 4-component vector of uint)
-0:71          textureGather (global 4-component vector of uint)
+0:71          textureGather (temp 4-component vector of uint)
 0:71            Construct combined texture-sampler (temp usamplerCube)
 0:71              'g_tTexcdu4' (uniform utextureCube)
 0:71              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -724,6 +724,8 @@
 0:76                1 (const int)
 0:76        Branch: Return
 0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'Depth' (out float FragDepth)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_sSamp2d' (uniform sampler)
 0:?     'g_tTex1df4a' (layout(binding=1 ) uniform texture1D)
@@ -739,9 +741,7 @@
 0:?     'g_tTexcdf4' (uniform textureCube)
 0:?     'g_tTexcdi4' (uniform itextureCube)
 0:?     'g_tTexcdu4' (uniform utextureCube)
-0:?     'Color' (layout(location=0 ) out 4-component vector of float)
-0:?     'Depth' (out float FragDepth)
-0:?     'anon@0' (uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4})
+0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4})
 
 // Module Version 10000
 // Generated by (magic number): 80001
diff --git a/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out b/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out
index f178c3b..4339574 100644
--- a/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out
+++ b/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out
@@ -8,7 +8,7 @@
 0:46      Sequence
 0:46        move second child to first child (temp 4-component vector of float)
 0:46          'txval001' (temp 4-component vector of float)
-0:46          textureGatherOffset (global 4-component vector of float)
+0:46          textureGatherOffset (temp 4-component vector of float)
 0:46            Construct combined texture-sampler (temp sampler2D)
 0:46              'g_tTex2df4' (uniform texture2D)
 0:46              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -25,7 +25,7 @@
 0:47      Sequence
 0:47        move second child to first child (temp 4-component vector of int)
 0:47          'txval011' (temp 4-component vector of int)
-0:47          textureGatherOffset (global 4-component vector of int)
+0:47          textureGatherOffset (temp 4-component vector of int)
 0:47            Construct combined texture-sampler (temp isampler2D)
 0:47              'g_tTex2di4' (uniform itexture2D)
 0:47              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -42,7 +42,7 @@
 0:48      Sequence
 0:48        move second child to first child (temp 4-component vector of uint)
 0:48          'txval021' (temp 4-component vector of uint)
-0:48          textureGatherOffset (global 4-component vector of uint)
+0:48          textureGatherOffset (temp 4-component vector of uint)
 0:48            Construct combined texture-sampler (temp usampler2D)
 0:48              'g_tTex2du4' (uniform utexture2D)
 0:48              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -59,7 +59,7 @@
 0:50      Sequence
 0:50        move second child to first child (temp 4-component vector of float)
 0:50          'txval004' (temp 4-component vector of float)
-0:50          textureGatherOffsets (global 4-component vector of float)
+0:50          textureGatherOffsets (temp 4-component vector of float)
 0:50            Construct combined texture-sampler (temp sampler2D)
 0:50              'g_tTex2df4' (uniform texture2D)
 0:50              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -89,7 +89,7 @@
 0:51      Sequence
 0:51        move second child to first child (temp 4-component vector of int)
 0:51          'txval014' (temp 4-component vector of int)
-0:51          textureGatherOffsets (global 4-component vector of int)
+0:51          textureGatherOffsets (temp 4-component vector of int)
 0:51            Construct combined texture-sampler (temp isampler2D)
 0:51              'g_tTex2di4' (uniform itexture2D)
 0:51              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -119,7 +119,7 @@
 0:52      Sequence
 0:52        move second child to first child (temp 4-component vector of uint)
 0:52          'txval024' (temp 4-component vector of uint)
-0:52          textureGatherOffsets (global 4-component vector of uint)
+0:52          textureGatherOffsets (temp 4-component vector of uint)
 0:52            Construct combined texture-sampler (temp usampler2D)
 0:52              'g_tTex2du4' (uniform utexture2D)
 0:52              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -149,7 +149,7 @@
 0:62      Sequence
 0:62        move second child to first child (temp 4-component vector of float)
 0:62          'txval101' (temp 4-component vector of float)
-0:62          textureGatherOffset (global 4-component vector of float)
+0:62          textureGatherOffset (temp 4-component vector of float)
 0:62            Construct combined texture-sampler (temp sampler2D)
 0:62              'g_tTex2df4' (uniform texture2D)
 0:62              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -166,7 +166,7 @@
 0:63      Sequence
 0:63        move second child to first child (temp 4-component vector of int)
 0:63          'txval111' (temp 4-component vector of int)
-0:63          textureGatherOffset (global 4-component vector of int)
+0:63          textureGatherOffset (temp 4-component vector of int)
 0:63            Construct combined texture-sampler (temp isampler2D)
 0:63              'g_tTex2di4' (uniform itexture2D)
 0:63              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -183,7 +183,7 @@
 0:64      Sequence
 0:64        move second child to first child (temp 4-component vector of uint)
 0:64          'txval121' (temp 4-component vector of uint)
-0:64          textureGatherOffset (global 4-component vector of uint)
+0:64          textureGatherOffset (temp 4-component vector of uint)
 0:64            Construct combined texture-sampler (temp usampler2D)
 0:64              'g_tTex2du4' (uniform utexture2D)
 0:64              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -200,7 +200,7 @@
 0:66      Sequence
 0:66        move second child to first child (temp 4-component vector of float)
 0:66          'txval104' (temp 4-component vector of float)
-0:66          textureGatherOffsets (global 4-component vector of float)
+0:66          textureGatherOffsets (temp 4-component vector of float)
 0:66            Construct combined texture-sampler (temp sampler2D)
 0:66              'g_tTex2df4' (uniform texture2D)
 0:66              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -230,7 +230,7 @@
 0:67      Sequence
 0:67        move second child to first child (temp 4-component vector of int)
 0:67          'txval114' (temp 4-component vector of int)
-0:67          textureGatherOffsets (global 4-component vector of int)
+0:67          textureGatherOffsets (temp 4-component vector of int)
 0:67            Construct combined texture-sampler (temp isampler2D)
 0:67              'g_tTex2di4' (uniform itexture2D)
 0:67              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -260,7 +260,7 @@
 0:68      Sequence
 0:68        move second child to first child (temp 4-component vector of uint)
 0:68          'txval124' (temp 4-component vector of uint)
-0:68          textureGatherOffsets (global 4-component vector of uint)
+0:68          textureGatherOffsets (temp 4-component vector of uint)
 0:68            Construct combined texture-sampler (temp usampler2D)
 0:68              'g_tTex2du4' (uniform utexture2D)
 0:68              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -290,7 +290,7 @@
 0:78      Sequence
 0:78        move second child to first child (temp 4-component vector of float)
 0:78          'txval201' (temp 4-component vector of float)
-0:78          textureGatherOffset (global 4-component vector of float)
+0:78          textureGatherOffset (temp 4-component vector of float)
 0:78            Construct combined texture-sampler (temp sampler2D)
 0:78              'g_tTex2df4' (uniform texture2D)
 0:78              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -307,7 +307,7 @@
 0:79      Sequence
 0:79        move second child to first child (temp 4-component vector of int)
 0:79          'txval211' (temp 4-component vector of int)
-0:79          textureGatherOffset (global 4-component vector of int)
+0:79          textureGatherOffset (temp 4-component vector of int)
 0:79            Construct combined texture-sampler (temp isampler2D)
 0:79              'g_tTex2di4' (uniform itexture2D)
 0:79              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -324,7 +324,7 @@
 0:80      Sequence
 0:80        move second child to first child (temp 4-component vector of uint)
 0:80          'txval221' (temp 4-component vector of uint)
-0:80          textureGatherOffset (global 4-component vector of uint)
+0:80          textureGatherOffset (temp 4-component vector of uint)
 0:80            Construct combined texture-sampler (temp usampler2D)
 0:80              'g_tTex2du4' (uniform utexture2D)
 0:80              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -341,7 +341,7 @@
 0:82      Sequence
 0:82        move second child to first child (temp 4-component vector of float)
 0:82          'txval204' (temp 4-component vector of float)
-0:82          textureGatherOffsets (global 4-component vector of float)
+0:82          textureGatherOffsets (temp 4-component vector of float)
 0:82            Construct combined texture-sampler (temp sampler2D)
 0:82              'g_tTex2df4' (uniform texture2D)
 0:82              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -371,7 +371,7 @@
 0:83      Sequence
 0:83        move second child to first child (temp 4-component vector of int)
 0:83          'txval214' (temp 4-component vector of int)
-0:83          textureGatherOffsets (global 4-component vector of int)
+0:83          textureGatherOffsets (temp 4-component vector of int)
 0:83            Construct combined texture-sampler (temp isampler2D)
 0:83              'g_tTex2di4' (uniform itexture2D)
 0:83              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -401,7 +401,7 @@
 0:84      Sequence
 0:84        move second child to first child (temp 4-component vector of uint)
 0:84          'txval224' (temp 4-component vector of uint)
-0:84          textureGatherOffsets (global 4-component vector of uint)
+0:84          textureGatherOffsets (temp 4-component vector of uint)
 0:84            Construct combined texture-sampler (temp usampler2D)
 0:84              'g_tTex2du4' (uniform utexture2D)
 0:84              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -431,7 +431,7 @@
 0:94      Sequence
 0:94        move second child to first child (temp 4-component vector of float)
 0:94          'txval301' (temp 4-component vector of float)
-0:94          textureGatherOffset (global 4-component vector of float)
+0:94          textureGatherOffset (temp 4-component vector of float)
 0:94            Construct combined texture-sampler (temp sampler2D)
 0:94              'g_tTex2df4' (uniform texture2D)
 0:94              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -448,7 +448,7 @@
 0:95      Sequence
 0:95        move second child to first child (temp 4-component vector of int)
 0:95          'txval311' (temp 4-component vector of int)
-0:95          textureGatherOffset (global 4-component vector of int)
+0:95          textureGatherOffset (temp 4-component vector of int)
 0:95            Construct combined texture-sampler (temp isampler2D)
 0:95              'g_tTex2di4' (uniform itexture2D)
 0:95              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -465,7 +465,7 @@
 0:96      Sequence
 0:96        move second child to first child (temp 4-component vector of uint)
 0:96          'txval321' (temp 4-component vector of uint)
-0:96          textureGatherOffset (global 4-component vector of uint)
+0:96          textureGatherOffset (temp 4-component vector of uint)
 0:96            Construct combined texture-sampler (temp usampler2D)
 0:96              'g_tTex2du4' (uniform utexture2D)
 0:96              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -482,7 +482,7 @@
 0:98      Sequence
 0:98        move second child to first child (temp 4-component vector of float)
 0:98          'txval304' (temp 4-component vector of float)
-0:98          textureGatherOffsets (global 4-component vector of float)
+0:98          textureGatherOffsets (temp 4-component vector of float)
 0:98            Construct combined texture-sampler (temp sampler2D)
 0:98              'g_tTex2df4' (uniform texture2D)
 0:98              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -512,7 +512,7 @@
 0:99      Sequence
 0:99        move second child to first child (temp 4-component vector of int)
 0:99          'txval314' (temp 4-component vector of int)
-0:99          textureGatherOffsets (global 4-component vector of int)
+0:99          textureGatherOffsets (temp 4-component vector of int)
 0:99            Construct combined texture-sampler (temp isampler2D)
 0:99              'g_tTex2di4' (uniform itexture2D)
 0:99              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -542,7 +542,7 @@
 0:100      Sequence
 0:100        move second child to first child (temp 4-component vector of uint)
 0:100          'txval324' (temp 4-component vector of uint)
-0:100          textureGatherOffsets (global 4-component vector of uint)
+0:100          textureGatherOffsets (temp 4-component vector of uint)
 0:100            Construct combined texture-sampler (temp usampler2D)
 0:100              'g_tTex2du4' (uniform utexture2D)
 0:100              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -602,6 +602,8 @@
 0:115                1 (const int)
 0:115        Branch: Return
 0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'Depth' (out float FragDepth)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_sSamp2d' (uniform sampler)
 0:?     'g_tTex1df4a' (layout(binding=1 ) uniform texture1D)
@@ -617,9 +619,7 @@
 0:?     'g_tTexcdf4' (uniform textureCube)
 0:?     'g_tTexcdi4' (uniform itextureCube)
 0:?     'g_tTexcdu4' (uniform utextureCube)
-0:?     'Color' (layout(location=0 ) out 4-component vector of float)
-0:?     'Depth' (out float FragDepth)
-0:?     'anon@0' (uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
+0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
 
 
 Linked fragment stage:
@@ -634,7 +634,7 @@
 0:46      Sequence
 0:46        move second child to first child (temp 4-component vector of float)
 0:46          'txval001' (temp 4-component vector of float)
-0:46          textureGatherOffset (global 4-component vector of float)
+0:46          textureGatherOffset (temp 4-component vector of float)
 0:46            Construct combined texture-sampler (temp sampler2D)
 0:46              'g_tTex2df4' (uniform texture2D)
 0:46              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -651,7 +651,7 @@
 0:47      Sequence
 0:47        move second child to first child (temp 4-component vector of int)
 0:47          'txval011' (temp 4-component vector of int)
-0:47          textureGatherOffset (global 4-component vector of int)
+0:47          textureGatherOffset (temp 4-component vector of int)
 0:47            Construct combined texture-sampler (temp isampler2D)
 0:47              'g_tTex2di4' (uniform itexture2D)
 0:47              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -668,7 +668,7 @@
 0:48      Sequence
 0:48        move second child to first child (temp 4-component vector of uint)
 0:48          'txval021' (temp 4-component vector of uint)
-0:48          textureGatherOffset (global 4-component vector of uint)
+0:48          textureGatherOffset (temp 4-component vector of uint)
 0:48            Construct combined texture-sampler (temp usampler2D)
 0:48              'g_tTex2du4' (uniform utexture2D)
 0:48              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -685,7 +685,7 @@
 0:50      Sequence
 0:50        move second child to first child (temp 4-component vector of float)
 0:50          'txval004' (temp 4-component vector of float)
-0:50          textureGatherOffsets (global 4-component vector of float)
+0:50          textureGatherOffsets (temp 4-component vector of float)
 0:50            Construct combined texture-sampler (temp sampler2D)
 0:50              'g_tTex2df4' (uniform texture2D)
 0:50              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -715,7 +715,7 @@
 0:51      Sequence
 0:51        move second child to first child (temp 4-component vector of int)
 0:51          'txval014' (temp 4-component vector of int)
-0:51          textureGatherOffsets (global 4-component vector of int)
+0:51          textureGatherOffsets (temp 4-component vector of int)
 0:51            Construct combined texture-sampler (temp isampler2D)
 0:51              'g_tTex2di4' (uniform itexture2D)
 0:51              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -745,7 +745,7 @@
 0:52      Sequence
 0:52        move second child to first child (temp 4-component vector of uint)
 0:52          'txval024' (temp 4-component vector of uint)
-0:52          textureGatherOffsets (global 4-component vector of uint)
+0:52          textureGatherOffsets (temp 4-component vector of uint)
 0:52            Construct combined texture-sampler (temp usampler2D)
 0:52              'g_tTex2du4' (uniform utexture2D)
 0:52              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -775,7 +775,7 @@
 0:62      Sequence
 0:62        move second child to first child (temp 4-component vector of float)
 0:62          'txval101' (temp 4-component vector of float)
-0:62          textureGatherOffset (global 4-component vector of float)
+0:62          textureGatherOffset (temp 4-component vector of float)
 0:62            Construct combined texture-sampler (temp sampler2D)
 0:62              'g_tTex2df4' (uniform texture2D)
 0:62              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -792,7 +792,7 @@
 0:63      Sequence
 0:63        move second child to first child (temp 4-component vector of int)
 0:63          'txval111' (temp 4-component vector of int)
-0:63          textureGatherOffset (global 4-component vector of int)
+0:63          textureGatherOffset (temp 4-component vector of int)
 0:63            Construct combined texture-sampler (temp isampler2D)
 0:63              'g_tTex2di4' (uniform itexture2D)
 0:63              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -809,7 +809,7 @@
 0:64      Sequence
 0:64        move second child to first child (temp 4-component vector of uint)
 0:64          'txval121' (temp 4-component vector of uint)
-0:64          textureGatherOffset (global 4-component vector of uint)
+0:64          textureGatherOffset (temp 4-component vector of uint)
 0:64            Construct combined texture-sampler (temp usampler2D)
 0:64              'g_tTex2du4' (uniform utexture2D)
 0:64              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -826,7 +826,7 @@
 0:66      Sequence
 0:66        move second child to first child (temp 4-component vector of float)
 0:66          'txval104' (temp 4-component vector of float)
-0:66          textureGatherOffsets (global 4-component vector of float)
+0:66          textureGatherOffsets (temp 4-component vector of float)
 0:66            Construct combined texture-sampler (temp sampler2D)
 0:66              'g_tTex2df4' (uniform texture2D)
 0:66              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -856,7 +856,7 @@
 0:67      Sequence
 0:67        move second child to first child (temp 4-component vector of int)
 0:67          'txval114' (temp 4-component vector of int)
-0:67          textureGatherOffsets (global 4-component vector of int)
+0:67          textureGatherOffsets (temp 4-component vector of int)
 0:67            Construct combined texture-sampler (temp isampler2D)
 0:67              'g_tTex2di4' (uniform itexture2D)
 0:67              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -886,7 +886,7 @@
 0:68      Sequence
 0:68        move second child to first child (temp 4-component vector of uint)
 0:68          'txval124' (temp 4-component vector of uint)
-0:68          textureGatherOffsets (global 4-component vector of uint)
+0:68          textureGatherOffsets (temp 4-component vector of uint)
 0:68            Construct combined texture-sampler (temp usampler2D)
 0:68              'g_tTex2du4' (uniform utexture2D)
 0:68              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -916,7 +916,7 @@
 0:78      Sequence
 0:78        move second child to first child (temp 4-component vector of float)
 0:78          'txval201' (temp 4-component vector of float)
-0:78          textureGatherOffset (global 4-component vector of float)
+0:78          textureGatherOffset (temp 4-component vector of float)
 0:78            Construct combined texture-sampler (temp sampler2D)
 0:78              'g_tTex2df4' (uniform texture2D)
 0:78              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -933,7 +933,7 @@
 0:79      Sequence
 0:79        move second child to first child (temp 4-component vector of int)
 0:79          'txval211' (temp 4-component vector of int)
-0:79          textureGatherOffset (global 4-component vector of int)
+0:79          textureGatherOffset (temp 4-component vector of int)
 0:79            Construct combined texture-sampler (temp isampler2D)
 0:79              'g_tTex2di4' (uniform itexture2D)
 0:79              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -950,7 +950,7 @@
 0:80      Sequence
 0:80        move second child to first child (temp 4-component vector of uint)
 0:80          'txval221' (temp 4-component vector of uint)
-0:80          textureGatherOffset (global 4-component vector of uint)
+0:80          textureGatherOffset (temp 4-component vector of uint)
 0:80            Construct combined texture-sampler (temp usampler2D)
 0:80              'g_tTex2du4' (uniform utexture2D)
 0:80              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -967,7 +967,7 @@
 0:82      Sequence
 0:82        move second child to first child (temp 4-component vector of float)
 0:82          'txval204' (temp 4-component vector of float)
-0:82          textureGatherOffsets (global 4-component vector of float)
+0:82          textureGatherOffsets (temp 4-component vector of float)
 0:82            Construct combined texture-sampler (temp sampler2D)
 0:82              'g_tTex2df4' (uniform texture2D)
 0:82              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -997,7 +997,7 @@
 0:83      Sequence
 0:83        move second child to first child (temp 4-component vector of int)
 0:83          'txval214' (temp 4-component vector of int)
-0:83          textureGatherOffsets (global 4-component vector of int)
+0:83          textureGatherOffsets (temp 4-component vector of int)
 0:83            Construct combined texture-sampler (temp isampler2D)
 0:83              'g_tTex2di4' (uniform itexture2D)
 0:83              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -1027,7 +1027,7 @@
 0:84      Sequence
 0:84        move second child to first child (temp 4-component vector of uint)
 0:84          'txval224' (temp 4-component vector of uint)
-0:84          textureGatherOffsets (global 4-component vector of uint)
+0:84          textureGatherOffsets (temp 4-component vector of uint)
 0:84            Construct combined texture-sampler (temp usampler2D)
 0:84              'g_tTex2du4' (uniform utexture2D)
 0:84              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -1057,7 +1057,7 @@
 0:94      Sequence
 0:94        move second child to first child (temp 4-component vector of float)
 0:94          'txval301' (temp 4-component vector of float)
-0:94          textureGatherOffset (global 4-component vector of float)
+0:94          textureGatherOffset (temp 4-component vector of float)
 0:94            Construct combined texture-sampler (temp sampler2D)
 0:94              'g_tTex2df4' (uniform texture2D)
 0:94              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -1074,7 +1074,7 @@
 0:95      Sequence
 0:95        move second child to first child (temp 4-component vector of int)
 0:95          'txval311' (temp 4-component vector of int)
-0:95          textureGatherOffset (global 4-component vector of int)
+0:95          textureGatherOffset (temp 4-component vector of int)
 0:95            Construct combined texture-sampler (temp isampler2D)
 0:95              'g_tTex2di4' (uniform itexture2D)
 0:95              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -1091,7 +1091,7 @@
 0:96      Sequence
 0:96        move second child to first child (temp 4-component vector of uint)
 0:96          'txval321' (temp 4-component vector of uint)
-0:96          textureGatherOffset (global 4-component vector of uint)
+0:96          textureGatherOffset (temp 4-component vector of uint)
 0:96            Construct combined texture-sampler (temp usampler2D)
 0:96              'g_tTex2du4' (uniform utexture2D)
 0:96              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -1108,7 +1108,7 @@
 0:98      Sequence
 0:98        move second child to first child (temp 4-component vector of float)
 0:98          'txval304' (temp 4-component vector of float)
-0:98          textureGatherOffsets (global 4-component vector of float)
+0:98          textureGatherOffsets (temp 4-component vector of float)
 0:98            Construct combined texture-sampler (temp sampler2D)
 0:98              'g_tTex2df4' (uniform texture2D)
 0:98              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -1138,7 +1138,7 @@
 0:99      Sequence
 0:99        move second child to first child (temp 4-component vector of int)
 0:99          'txval314' (temp 4-component vector of int)
-0:99          textureGatherOffsets (global 4-component vector of int)
+0:99          textureGatherOffsets (temp 4-component vector of int)
 0:99            Construct combined texture-sampler (temp isampler2D)
 0:99              'g_tTex2di4' (uniform itexture2D)
 0:99              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -1168,7 +1168,7 @@
 0:100      Sequence
 0:100        move second child to first child (temp 4-component vector of uint)
 0:100          'txval324' (temp 4-component vector of uint)
-0:100          textureGatherOffsets (global 4-component vector of uint)
+0:100          textureGatherOffsets (temp 4-component vector of uint)
 0:100            Construct combined texture-sampler (temp usampler2D)
 0:100              'g_tTex2du4' (uniform utexture2D)
 0:100              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -1228,6 +1228,8 @@
 0:115                1 (const int)
 0:115        Branch: Return
 0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'Depth' (out float FragDepth)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_sSamp2d' (uniform sampler)
 0:?     'g_tTex1df4a' (layout(binding=1 ) uniform texture1D)
@@ -1243,9 +1245,7 @@
 0:?     'g_tTexcdf4' (uniform textureCube)
 0:?     'g_tTexcdi4' (uniform itextureCube)
 0:?     'g_tTexcdu4' (uniform utextureCube)
-0:?     'Color' (layout(location=0 ) out 4-component vector of float)
-0:?     'Depth' (out float FragDepth)
-0:?     'anon@0' (uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
+0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
 
 // Module Version 10000
 // Generated by (magic number): 80001
diff --git a/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out b/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out
index f565379..4722cff 100644
--- a/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out
+++ b/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out
@@ -8,7 +8,7 @@
 0:40      Sequence
 0:40        move second child to first child (temp 4-component vector of float)
 0:40          'txval001' (temp 4-component vector of float)
-0:40          textureGatherOffset (global 4-component vector of float)
+0:40          textureGatherOffset (temp 4-component vector of float)
 0:40            Construct combined texture-sampler (temp sampler2DArray)
 0:40              'g_tTex2df4a' (uniform texture2DArray)
 0:40              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -25,7 +25,7 @@
 0:41      Sequence
 0:41        move second child to first child (temp 4-component vector of int)
 0:41          'txval011' (temp 4-component vector of int)
-0:41          textureGatherOffset (global 4-component vector of int)
+0:41          textureGatherOffset (temp 4-component vector of int)
 0:41            Construct combined texture-sampler (temp isampler2DArray)
 0:41              'g_tTex2di4a' (uniform itexture2DArray)
 0:41              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -42,7 +42,7 @@
 0:42      Sequence
 0:42        move second child to first child (temp 4-component vector of uint)
 0:42          'txval021' (temp 4-component vector of uint)
-0:42          textureGatherOffset (global 4-component vector of uint)
+0:42          textureGatherOffset (temp 4-component vector of uint)
 0:42            Construct combined texture-sampler (temp usampler2DArray)
 0:42              'g_tTex2du4a' (uniform utexture2DArray)
 0:42              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -59,7 +59,7 @@
 0:44      Sequence
 0:44        move second child to first child (temp 4-component vector of float)
 0:44          'txval004' (temp 4-component vector of float)
-0:44          textureGatherOffsets (global 4-component vector of float)
+0:44          textureGatherOffsets (temp 4-component vector of float)
 0:44            Construct combined texture-sampler (temp sampler2DArray)
 0:44              'g_tTex2df4a' (uniform texture2DArray)
 0:44              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -89,7 +89,7 @@
 0:45      Sequence
 0:45        move second child to first child (temp 4-component vector of int)
 0:45          'txval014' (temp 4-component vector of int)
-0:45          textureGatherOffsets (global 4-component vector of int)
+0:45          textureGatherOffsets (temp 4-component vector of int)
 0:45            Construct combined texture-sampler (temp isampler2DArray)
 0:45              'g_tTex2di4a' (uniform itexture2DArray)
 0:45              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -119,7 +119,7 @@
 0:46      Sequence
 0:46        move second child to first child (temp 4-component vector of uint)
 0:46          'txval024' (temp 4-component vector of uint)
-0:46          textureGatherOffsets (global 4-component vector of uint)
+0:46          textureGatherOffsets (temp 4-component vector of uint)
 0:46            Construct combined texture-sampler (temp usampler2DArray)
 0:46              'g_tTex2du4a' (uniform utexture2DArray)
 0:46              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -149,7 +149,7 @@
 0:56      Sequence
 0:56        move second child to first child (temp 4-component vector of float)
 0:56          'txval101' (temp 4-component vector of float)
-0:56          textureGatherOffset (global 4-component vector of float)
+0:56          textureGatherOffset (temp 4-component vector of float)
 0:56            Construct combined texture-sampler (temp sampler2DArray)
 0:56              'g_tTex2df4a' (uniform texture2DArray)
 0:56              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -166,7 +166,7 @@
 0:57      Sequence
 0:57        move second child to first child (temp 4-component vector of int)
 0:57          'txval111' (temp 4-component vector of int)
-0:57          textureGatherOffset (global 4-component vector of int)
+0:57          textureGatherOffset (temp 4-component vector of int)
 0:57            Construct combined texture-sampler (temp isampler2DArray)
 0:57              'g_tTex2di4a' (uniform itexture2DArray)
 0:57              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -183,7 +183,7 @@
 0:58      Sequence
 0:58        move second child to first child (temp 4-component vector of uint)
 0:58          'txval121' (temp 4-component vector of uint)
-0:58          textureGatherOffset (global 4-component vector of uint)
+0:58          textureGatherOffset (temp 4-component vector of uint)
 0:58            Construct combined texture-sampler (temp usampler2DArray)
 0:58              'g_tTex2du4a' (uniform utexture2DArray)
 0:58              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -200,7 +200,7 @@
 0:60      Sequence
 0:60        move second child to first child (temp 4-component vector of float)
 0:60          'txval104' (temp 4-component vector of float)
-0:60          textureGatherOffsets (global 4-component vector of float)
+0:60          textureGatherOffsets (temp 4-component vector of float)
 0:60            Construct combined texture-sampler (temp sampler2DArray)
 0:60              'g_tTex2df4a' (uniform texture2DArray)
 0:60              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -230,7 +230,7 @@
 0:61      Sequence
 0:61        move second child to first child (temp 4-component vector of int)
 0:61          'txval114' (temp 4-component vector of int)
-0:61          textureGatherOffsets (global 4-component vector of int)
+0:61          textureGatherOffsets (temp 4-component vector of int)
 0:61            Construct combined texture-sampler (temp isampler2DArray)
 0:61              'g_tTex2di4a' (uniform itexture2DArray)
 0:61              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -260,7 +260,7 @@
 0:62      Sequence
 0:62        move second child to first child (temp 4-component vector of uint)
 0:62          'txval124' (temp 4-component vector of uint)
-0:62          textureGatherOffsets (global 4-component vector of uint)
+0:62          textureGatherOffsets (temp 4-component vector of uint)
 0:62            Construct combined texture-sampler (temp usampler2DArray)
 0:62              'g_tTex2du4a' (uniform utexture2DArray)
 0:62              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -290,7 +290,7 @@
 0:72      Sequence
 0:72        move second child to first child (temp 4-component vector of float)
 0:72          'txval201' (temp 4-component vector of float)
-0:72          textureGatherOffset (global 4-component vector of float)
+0:72          textureGatherOffset (temp 4-component vector of float)
 0:72            Construct combined texture-sampler (temp sampler2DArray)
 0:72              'g_tTex2df4a' (uniform texture2DArray)
 0:72              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -307,7 +307,7 @@
 0:73      Sequence
 0:73        move second child to first child (temp 4-component vector of int)
 0:73          'txval211' (temp 4-component vector of int)
-0:73          textureGatherOffset (global 4-component vector of int)
+0:73          textureGatherOffset (temp 4-component vector of int)
 0:73            Construct combined texture-sampler (temp isampler2DArray)
 0:73              'g_tTex2di4a' (uniform itexture2DArray)
 0:73              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -324,7 +324,7 @@
 0:74      Sequence
 0:74        move second child to first child (temp 4-component vector of uint)
 0:74          'txval221' (temp 4-component vector of uint)
-0:74          textureGatherOffset (global 4-component vector of uint)
+0:74          textureGatherOffset (temp 4-component vector of uint)
 0:74            Construct combined texture-sampler (temp usampler2DArray)
 0:74              'g_tTex2du4a' (uniform utexture2DArray)
 0:74              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -341,7 +341,7 @@
 0:76      Sequence
 0:76        move second child to first child (temp 4-component vector of float)
 0:76          'txval204' (temp 4-component vector of float)
-0:76          textureGatherOffsets (global 4-component vector of float)
+0:76          textureGatherOffsets (temp 4-component vector of float)
 0:76            Construct combined texture-sampler (temp sampler2DArray)
 0:76              'g_tTex2df4a' (uniform texture2DArray)
 0:76              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -371,7 +371,7 @@
 0:77      Sequence
 0:77        move second child to first child (temp 4-component vector of int)
 0:77          'txval214' (temp 4-component vector of int)
-0:77          textureGatherOffsets (global 4-component vector of int)
+0:77          textureGatherOffsets (temp 4-component vector of int)
 0:77            Construct combined texture-sampler (temp isampler2DArray)
 0:77              'g_tTex2di4a' (uniform itexture2DArray)
 0:77              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -401,7 +401,7 @@
 0:78      Sequence
 0:78        move second child to first child (temp 4-component vector of uint)
 0:78          'txval224' (temp 4-component vector of uint)
-0:78          textureGatherOffsets (global 4-component vector of uint)
+0:78          textureGatherOffsets (temp 4-component vector of uint)
 0:78            Construct combined texture-sampler (temp usampler2DArray)
 0:78              'g_tTex2du4a' (uniform utexture2DArray)
 0:78              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -431,7 +431,7 @@
 0:88      Sequence
 0:88        move second child to first child (temp 4-component vector of float)
 0:88          'txval301' (temp 4-component vector of float)
-0:88          textureGatherOffset (global 4-component vector of float)
+0:88          textureGatherOffset (temp 4-component vector of float)
 0:88            Construct combined texture-sampler (temp sampler2DArray)
 0:88              'g_tTex2df4a' (uniform texture2DArray)
 0:88              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -448,7 +448,7 @@
 0:89      Sequence
 0:89        move second child to first child (temp 4-component vector of int)
 0:89          'txval311' (temp 4-component vector of int)
-0:89          textureGatherOffset (global 4-component vector of int)
+0:89          textureGatherOffset (temp 4-component vector of int)
 0:89            Construct combined texture-sampler (temp isampler2DArray)
 0:89              'g_tTex2di4a' (uniform itexture2DArray)
 0:89              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -465,7 +465,7 @@
 0:90      Sequence
 0:90        move second child to first child (temp 4-component vector of uint)
 0:90          'txval321' (temp 4-component vector of uint)
-0:90          textureGatherOffset (global 4-component vector of uint)
+0:90          textureGatherOffset (temp 4-component vector of uint)
 0:90            Construct combined texture-sampler (temp usampler2DArray)
 0:90              'g_tTex2du4a' (uniform utexture2DArray)
 0:90              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -482,7 +482,7 @@
 0:92      Sequence
 0:92        move second child to first child (temp 4-component vector of float)
 0:92          'txval304' (temp 4-component vector of float)
-0:92          textureGatherOffsets (global 4-component vector of float)
+0:92          textureGatherOffsets (temp 4-component vector of float)
 0:92            Construct combined texture-sampler (temp sampler2DArray)
 0:92              'g_tTex2df4a' (uniform texture2DArray)
 0:92              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -512,7 +512,7 @@
 0:93      Sequence
 0:93        move second child to first child (temp 4-component vector of int)
 0:93          'txval314' (temp 4-component vector of int)
-0:93          textureGatherOffsets (global 4-component vector of int)
+0:93          textureGatherOffsets (temp 4-component vector of int)
 0:93            Construct combined texture-sampler (temp isampler2DArray)
 0:93              'g_tTex2di4a' (uniform itexture2DArray)
 0:93              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -542,7 +542,7 @@
 0:94      Sequence
 0:94        move second child to first child (temp 4-component vector of uint)
 0:94          'txval324' (temp 4-component vector of uint)
-0:94          textureGatherOffsets (global 4-component vector of uint)
+0:94          textureGatherOffsets (temp 4-component vector of uint)
 0:94            Construct combined texture-sampler (temp usampler2DArray)
 0:94              'g_tTex2du4a' (uniform utexture2DArray)
 0:94              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -602,6 +602,8 @@
 0:109                1 (const int)
 0:109        Branch: Return
 0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'Depth' (out float FragDepth)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_sSamp2d' (uniform sampler)
 0:?     'g_tTex1df4a' (layout(binding=0 ) uniform texture1DArray)
@@ -613,9 +615,7 @@
 0:?     'g_tTexcdf4a' (uniform textureCubeArray)
 0:?     'g_tTexcdi4a' (uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' (uniform utextureCubeArray)
-0:?     'Color' (layout(location=0 ) out 4-component vector of float)
-0:?     'Depth' (out float FragDepth)
-0:?     'anon@0' (uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
+0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
 
 
 Linked fragment stage:
@@ -630,7 +630,7 @@
 0:40      Sequence
 0:40        move second child to first child (temp 4-component vector of float)
 0:40          'txval001' (temp 4-component vector of float)
-0:40          textureGatherOffset (global 4-component vector of float)
+0:40          textureGatherOffset (temp 4-component vector of float)
 0:40            Construct combined texture-sampler (temp sampler2DArray)
 0:40              'g_tTex2df4a' (uniform texture2DArray)
 0:40              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -647,7 +647,7 @@
 0:41      Sequence
 0:41        move second child to first child (temp 4-component vector of int)
 0:41          'txval011' (temp 4-component vector of int)
-0:41          textureGatherOffset (global 4-component vector of int)
+0:41          textureGatherOffset (temp 4-component vector of int)
 0:41            Construct combined texture-sampler (temp isampler2DArray)
 0:41              'g_tTex2di4a' (uniform itexture2DArray)
 0:41              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -664,7 +664,7 @@
 0:42      Sequence
 0:42        move second child to first child (temp 4-component vector of uint)
 0:42          'txval021' (temp 4-component vector of uint)
-0:42          textureGatherOffset (global 4-component vector of uint)
+0:42          textureGatherOffset (temp 4-component vector of uint)
 0:42            Construct combined texture-sampler (temp usampler2DArray)
 0:42              'g_tTex2du4a' (uniform utexture2DArray)
 0:42              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -681,7 +681,7 @@
 0:44      Sequence
 0:44        move second child to first child (temp 4-component vector of float)
 0:44          'txval004' (temp 4-component vector of float)
-0:44          textureGatherOffsets (global 4-component vector of float)
+0:44          textureGatherOffsets (temp 4-component vector of float)
 0:44            Construct combined texture-sampler (temp sampler2DArray)
 0:44              'g_tTex2df4a' (uniform texture2DArray)
 0:44              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -711,7 +711,7 @@
 0:45      Sequence
 0:45        move second child to first child (temp 4-component vector of int)
 0:45          'txval014' (temp 4-component vector of int)
-0:45          textureGatherOffsets (global 4-component vector of int)
+0:45          textureGatherOffsets (temp 4-component vector of int)
 0:45            Construct combined texture-sampler (temp isampler2DArray)
 0:45              'g_tTex2di4a' (uniform itexture2DArray)
 0:45              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -741,7 +741,7 @@
 0:46      Sequence
 0:46        move second child to first child (temp 4-component vector of uint)
 0:46          'txval024' (temp 4-component vector of uint)
-0:46          textureGatherOffsets (global 4-component vector of uint)
+0:46          textureGatherOffsets (temp 4-component vector of uint)
 0:46            Construct combined texture-sampler (temp usampler2DArray)
 0:46              'g_tTex2du4a' (uniform utexture2DArray)
 0:46              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -771,7 +771,7 @@
 0:56      Sequence
 0:56        move second child to first child (temp 4-component vector of float)
 0:56          'txval101' (temp 4-component vector of float)
-0:56          textureGatherOffset (global 4-component vector of float)
+0:56          textureGatherOffset (temp 4-component vector of float)
 0:56            Construct combined texture-sampler (temp sampler2DArray)
 0:56              'g_tTex2df4a' (uniform texture2DArray)
 0:56              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -788,7 +788,7 @@
 0:57      Sequence
 0:57        move second child to first child (temp 4-component vector of int)
 0:57          'txval111' (temp 4-component vector of int)
-0:57          textureGatherOffset (global 4-component vector of int)
+0:57          textureGatherOffset (temp 4-component vector of int)
 0:57            Construct combined texture-sampler (temp isampler2DArray)
 0:57              'g_tTex2di4a' (uniform itexture2DArray)
 0:57              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -805,7 +805,7 @@
 0:58      Sequence
 0:58        move second child to first child (temp 4-component vector of uint)
 0:58          'txval121' (temp 4-component vector of uint)
-0:58          textureGatherOffset (global 4-component vector of uint)
+0:58          textureGatherOffset (temp 4-component vector of uint)
 0:58            Construct combined texture-sampler (temp usampler2DArray)
 0:58              'g_tTex2du4a' (uniform utexture2DArray)
 0:58              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -822,7 +822,7 @@
 0:60      Sequence
 0:60        move second child to first child (temp 4-component vector of float)
 0:60          'txval104' (temp 4-component vector of float)
-0:60          textureGatherOffsets (global 4-component vector of float)
+0:60          textureGatherOffsets (temp 4-component vector of float)
 0:60            Construct combined texture-sampler (temp sampler2DArray)
 0:60              'g_tTex2df4a' (uniform texture2DArray)
 0:60              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -852,7 +852,7 @@
 0:61      Sequence
 0:61        move second child to first child (temp 4-component vector of int)
 0:61          'txval114' (temp 4-component vector of int)
-0:61          textureGatherOffsets (global 4-component vector of int)
+0:61          textureGatherOffsets (temp 4-component vector of int)
 0:61            Construct combined texture-sampler (temp isampler2DArray)
 0:61              'g_tTex2di4a' (uniform itexture2DArray)
 0:61              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -882,7 +882,7 @@
 0:62      Sequence
 0:62        move second child to first child (temp 4-component vector of uint)
 0:62          'txval124' (temp 4-component vector of uint)
-0:62          textureGatherOffsets (global 4-component vector of uint)
+0:62          textureGatherOffsets (temp 4-component vector of uint)
 0:62            Construct combined texture-sampler (temp usampler2DArray)
 0:62              'g_tTex2du4a' (uniform utexture2DArray)
 0:62              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -912,7 +912,7 @@
 0:72      Sequence
 0:72        move second child to first child (temp 4-component vector of float)
 0:72          'txval201' (temp 4-component vector of float)
-0:72          textureGatherOffset (global 4-component vector of float)
+0:72          textureGatherOffset (temp 4-component vector of float)
 0:72            Construct combined texture-sampler (temp sampler2DArray)
 0:72              'g_tTex2df4a' (uniform texture2DArray)
 0:72              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -929,7 +929,7 @@
 0:73      Sequence
 0:73        move second child to first child (temp 4-component vector of int)
 0:73          'txval211' (temp 4-component vector of int)
-0:73          textureGatherOffset (global 4-component vector of int)
+0:73          textureGatherOffset (temp 4-component vector of int)
 0:73            Construct combined texture-sampler (temp isampler2DArray)
 0:73              'g_tTex2di4a' (uniform itexture2DArray)
 0:73              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -946,7 +946,7 @@
 0:74      Sequence
 0:74        move second child to first child (temp 4-component vector of uint)
 0:74          'txval221' (temp 4-component vector of uint)
-0:74          textureGatherOffset (global 4-component vector of uint)
+0:74          textureGatherOffset (temp 4-component vector of uint)
 0:74            Construct combined texture-sampler (temp usampler2DArray)
 0:74              'g_tTex2du4a' (uniform utexture2DArray)
 0:74              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -963,7 +963,7 @@
 0:76      Sequence
 0:76        move second child to first child (temp 4-component vector of float)
 0:76          'txval204' (temp 4-component vector of float)
-0:76          textureGatherOffsets (global 4-component vector of float)
+0:76          textureGatherOffsets (temp 4-component vector of float)
 0:76            Construct combined texture-sampler (temp sampler2DArray)
 0:76              'g_tTex2df4a' (uniform texture2DArray)
 0:76              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -993,7 +993,7 @@
 0:77      Sequence
 0:77        move second child to first child (temp 4-component vector of int)
 0:77          'txval214' (temp 4-component vector of int)
-0:77          textureGatherOffsets (global 4-component vector of int)
+0:77          textureGatherOffsets (temp 4-component vector of int)
 0:77            Construct combined texture-sampler (temp isampler2DArray)
 0:77              'g_tTex2di4a' (uniform itexture2DArray)
 0:77              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -1023,7 +1023,7 @@
 0:78      Sequence
 0:78        move second child to first child (temp 4-component vector of uint)
 0:78          'txval224' (temp 4-component vector of uint)
-0:78          textureGatherOffsets (global 4-component vector of uint)
+0:78          textureGatherOffsets (temp 4-component vector of uint)
 0:78            Construct combined texture-sampler (temp usampler2DArray)
 0:78              'g_tTex2du4a' (uniform utexture2DArray)
 0:78              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -1053,7 +1053,7 @@
 0:88      Sequence
 0:88        move second child to first child (temp 4-component vector of float)
 0:88          'txval301' (temp 4-component vector of float)
-0:88          textureGatherOffset (global 4-component vector of float)
+0:88          textureGatherOffset (temp 4-component vector of float)
 0:88            Construct combined texture-sampler (temp sampler2DArray)
 0:88              'g_tTex2df4a' (uniform texture2DArray)
 0:88              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -1070,7 +1070,7 @@
 0:89      Sequence
 0:89        move second child to first child (temp 4-component vector of int)
 0:89          'txval311' (temp 4-component vector of int)
-0:89          textureGatherOffset (global 4-component vector of int)
+0:89          textureGatherOffset (temp 4-component vector of int)
 0:89            Construct combined texture-sampler (temp isampler2DArray)
 0:89              'g_tTex2di4a' (uniform itexture2DArray)
 0:89              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -1087,7 +1087,7 @@
 0:90      Sequence
 0:90        move second child to first child (temp 4-component vector of uint)
 0:90          'txval321' (temp 4-component vector of uint)
-0:90          textureGatherOffset (global 4-component vector of uint)
+0:90          textureGatherOffset (temp 4-component vector of uint)
 0:90            Construct combined texture-sampler (temp usampler2DArray)
 0:90              'g_tTex2du4a' (uniform utexture2DArray)
 0:90              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -1104,7 +1104,7 @@
 0:92      Sequence
 0:92        move second child to first child (temp 4-component vector of float)
 0:92          'txval304' (temp 4-component vector of float)
-0:92          textureGatherOffsets (global 4-component vector of float)
+0:92          textureGatherOffsets (temp 4-component vector of float)
 0:92            Construct combined texture-sampler (temp sampler2DArray)
 0:92              'g_tTex2df4a' (uniform texture2DArray)
 0:92              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -1134,7 +1134,7 @@
 0:93      Sequence
 0:93        move second child to first child (temp 4-component vector of int)
 0:93          'txval314' (temp 4-component vector of int)
-0:93          textureGatherOffsets (global 4-component vector of int)
+0:93          textureGatherOffsets (temp 4-component vector of int)
 0:93            Construct combined texture-sampler (temp isampler2DArray)
 0:93              'g_tTex2di4a' (uniform itexture2DArray)
 0:93              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -1164,7 +1164,7 @@
 0:94      Sequence
 0:94        move second child to first child (temp 4-component vector of uint)
 0:94          'txval324' (temp 4-component vector of uint)
-0:94          textureGatherOffsets (global 4-component vector of uint)
+0:94          textureGatherOffsets (temp 4-component vector of uint)
 0:94            Construct combined texture-sampler (temp usampler2DArray)
 0:94              'g_tTex2du4a' (uniform utexture2DArray)
 0:94              'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -1224,6 +1224,8 @@
 0:109                1 (const int)
 0:109        Branch: Return
 0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'Depth' (out float FragDepth)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_sSamp2d' (uniform sampler)
 0:?     'g_tTex1df4a' (layout(binding=0 ) uniform texture1DArray)
@@ -1235,9 +1237,7 @@
 0:?     'g_tTexcdf4a' (uniform textureCubeArray)
 0:?     'g_tTexcdi4a' (uniform itextureCubeArray)
 0:?     'g_tTexcdu4a' (uniform utextureCubeArray)
-0:?     'Color' (layout(location=0 ) out 4-component vector of float)
-0:?     'Depth' (out float FragDepth)
-0:?     'anon@0' (uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
+0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform float c1, layout(offset=8 ) uniform 2-component vector of float c2, layout(offset=16 ) uniform 3-component vector of float c3, layout(offset=32 ) uniform 4-component vector of float c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
 
 // Module Version 10000
 // Generated by (magic number): 80001
diff --git a/Test/baseResults/hlsl.getdimensions.dx10.frag.out b/Test/baseResults/hlsl.getdimensions.dx10.frag.out
index 3a55d68..0c488cf 100644
--- a/Test/baseResults/hlsl.getdimensions.dx10.frag.out
+++ b/Test/baseResults/hlsl.getdimensions.dx10.frag.out
@@ -1076,6 +1076,8 @@
 0:279                1 (const int)
 0:279        Branch: Return
 0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'Depth' (out float FragDepth)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
 0:?     'g_tTex1di4' (uniform itexture1D)
@@ -1104,8 +1106,6 @@
 0:?     'g_tTex2dmsf4a' (uniform texture2DMSArray)
 0:?     'g_tTex2dmsi4a' (uniform itexture2DMSArray)
 0:?     'g_tTex2dmsu4a' (uniform utexture2DMSArray)
-0:?     'Color' (layout(location=0 ) out 4-component vector of float)
-0:?     'Depth' (out float FragDepth)
 
 
 Linked fragment stage:
@@ -2188,6 +2188,8 @@
 0:279                1 (const int)
 0:279        Branch: Return
 0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'Depth' (out float FragDepth)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
 0:?     'g_tTex1di4' (uniform itexture1D)
@@ -2216,8 +2218,6 @@
 0:?     'g_tTex2dmsf4a' (uniform texture2DMSArray)
 0:?     'g_tTex2dmsi4a' (uniform itexture2DMSArray)
 0:?     'g_tTex2dmsu4a' (uniform utexture2DMSArray)
-0:?     'Color' (layout(location=0 ) out 4-component vector of float)
-0:?     'Depth' (out float FragDepth)
 
 // Module Version 10000
 // Generated by (magic number): 80001
diff --git a/Test/baseResults/hlsl.getdimensions.dx10.vert.out b/Test/baseResults/hlsl.getdimensions.dx10.vert.out
index 3a05bca..c1c90f4 100644
--- a/Test/baseResults/hlsl.getdimensions.dx10.vert.out
+++ b/Test/baseResults/hlsl.getdimensions.dx10.vert.out
@@ -46,9 +46,9 @@
 0:26                0 (const int)
 0:26        Branch: Return
 0:?   Linker Objects
+0:?     'Pos' (out 4-component vector of float Position)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
-0:?     'Pos' (out 4-component vector of float Position)
 
 
 Linked vertex stage:
@@ -101,9 +101,9 @@
 0:26                0 (const int)
 0:26        Branch: Return
 0:?   Linker Objects
+0:?     'Pos' (out 4-component vector of float Position)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
-0:?     'Pos' (out 4-component vector of float Position)
 
 // Module Version 10000
 // Generated by (magic number): 80001
diff --git a/Test/baseResults/hlsl.getdimensions.rw.dx10.frag.out b/Test/baseResults/hlsl.getdimensions.rw.dx10.frag.out
index 717c376..918246b 100644
--- a/Test/baseResults/hlsl.getdimensions.rw.dx10.frag.out
+++ b/Test/baseResults/hlsl.getdimensions.rw.dx10.frag.out
@@ -326,6 +326,8 @@
 0:95                1 (const int)
 0:95        Branch: Return
 0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'Depth' (out float FragDepth)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_tTex1df4' (layout(binding=0 rgba32f ) uniform image1D)
 0:?     'g_tTex1di4' (layout(rgba32i ) uniform iimage1D)
@@ -345,9 +347,7 @@
 0:?     'g_tBuffF' (layout(rgba32f ) uniform imageBuffer)
 0:?     'g_tBuffI' (layout(rgba32i ) uniform iimageBuffer)
 0:?     'g_tBuffU' (layout(rgba32ui ) uniform uimageBuffer)
-0:?     'Color' (layout(location=0 ) out 4-component vector of float)
-0:?     'Depth' (out float FragDepth)
-0:?     'anon@0' (uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
+0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
 
 
 Linked fragment stage:
@@ -680,6 +680,8 @@
 0:95                1 (const int)
 0:95        Branch: Return
 0:?   Linker Objects
+0:?     'Color' (layout(location=0 ) out 4-component vector of float)
+0:?     'Depth' (out float FragDepth)
 0:?     'g_sSamp' (layout(binding=0 ) uniform sampler)
 0:?     'g_tTex1df4' (layout(binding=0 rgba32f ) uniform image1D)
 0:?     'g_tTex1di4' (layout(rgba32i ) uniform iimage1D)
@@ -699,9 +701,7 @@
 0:?     'g_tBuffF' (layout(rgba32f ) uniform imageBuffer)
 0:?     'g_tBuffI' (layout(rgba32i ) uniform iimageBuffer)
 0:?     'g_tBuffU' (layout(rgba32ui ) uniform uimageBuffer)
-0:?     'Color' (layout(location=0 ) out 4-component vector of float)
-0:?     'Depth' (out float FragDepth)
-0:?     'anon@0' (uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
+0:?     'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
 
 // Module Version 10000
 // Generated by (magic number): 80001
@@ -796,6 +796,14 @@
                               Decorate 214(Depth) BuiltIn FragDepth
                               Decorate 220(g_sSamp) DescriptorSet 0
                               Decorate 220(g_sSamp) Binding 0
+                              MemberDecorate 222($Global) 0 Offset 0
+                              MemberDecorate 222($Global) 1 Offset 8
+                              MemberDecorate 222($Global) 2 Offset 16
+                              MemberDecorate 222($Global) 3 Offset 32
+                              MemberDecorate 222($Global) 4 Offset 48
+                              MemberDecorate 222($Global) 5 Offset 56
+                              MemberDecorate 222($Global) 6 Offset 64
+                              MemberDecorate 222($Global) 7 Offset 80
                               Decorate 222($Global) Block