diff --git a/Install/Windows/glslangValidator.exe b/Install/Windows/glslangValidator.exe
index 41819bcc0a65fec7c69ad1566619230f87e0ad98..248a1e4ffc51d0c8599c60ae77c5b9afb6118d37 100644
Binary files a/Install/Windows/glslangValidator.exe and b/Install/Windows/glslangValidator.exe differ
diff --git a/Test/420.geom b/Test/420.geom
index 9740799cf3491725df1bbb6bda37da4f76456ebd..49c6fccf8fd913a2feda53ceae2ae80d228ecfaa 100644
--- a/Test/420.geom
+++ b/Test/420.geom
@@ -1,4 +1,4 @@
-#version 150 core
+#version 420 core
 
 // testing input arrays without a gl_in[] block redeclaration, see 400.geom for with
 
@@ -21,3 +21,25 @@ void foo3()
     gl_in[i].gl_Position;
     color3.length();
 }
+
+uniform sampler2D s2D;
+in vec2 coord;
+uniform vec4 v4;
+
+void foo4()
+{
+    const ivec2 offsets[5] =
+    {
+        ivec2(0,1),
+        ivec2(1,-2),
+        ivec2(0,3),
+        ivec2(-3,0),
+        ivec2(2,1)
+    };
+
+    vec4 v = textureGatherOffset(s2D, coord, offsets[i].xy);
+
+    offsets[i].xy = ivec2(3);  // ERROR
+    v4.x = 3.2;                // ERROR
+    v4.xy;   // should have non-uniform type
+}
diff --git a/Test/baseResults/100Limits.vert.out b/Test/baseResults/100Limits.vert.out
index 4ee83d13722582bf2d327719a6d58928ed7d8177..e8a297b636a1e2b64bf6998142742bf0ee6ad509 100644
--- a/Test/baseResults/100Limits.vert.out
+++ b/Test/baseResults/100Limits.vert.out
@@ -288,32 +288,32 @@
 0:43            'a' (highp float)
 0:43            Constant:
 0:43              2.000000
-0:47      indirect index (uniform lowp sampler2D)
+0:47      indirect index (lowp sampler2D)
 0:47        'fsa' (uniform 3-element array of lowp sampler2D)
 0:47        'ga' (highp int)
-0:48      indirect index (uniform highp float)
+0:48      indirect index (highp float)
 0:48        'fua' (uniform 10-element array of highp float)
 0:48        'ga' (highp int)
-0:49      indirect index (in highp 3-component vector of float)
+0:49      indirect index (highp 3-component vector of float)
 0:49        'am3' (in highp 3X3 matrix of float)
 0:49        'ga' (highp int)
-0:50      indirect index (in highp float)
+0:50      indirect index (highp float)
 0:50        'av2' (in highp 2-component vector of float)
 0:50        'ga' (highp int)
-0:51      indirect index (smooth out highp 4-component vector of float)
+0:51      indirect index (smooth highp 4-component vector of float)
 0:51        'va' (smooth out 4-element array of highp 4-component vector of float)
 0:51        add (highp int)
 0:51          Constant:
 0:51            2 (const int)
 0:51          'ga' (highp int)
-0:52      indirect index (const highp 2-component vector of float)
+0:52      indirect index (highp 2-component vector of float)
 0:52        Constant:
 0:52          1.000000
 0:52          0.000000
 0:52          0.000000
 0:52          1.000000
 0:52        'ga' (highp int)
-0:53      indirect index (const highp float)
+0:53      indirect index (highp float)
 0:53        Constant:
 0:53          2.000000
 0:53          2.000000
@@ -339,34 +339,34 @@
 0:56              0 (const int)
 0:56          Loop Body
 0:57          Sequence
-0:57            indirect index (uniform lowp sampler2D)
+0:57            indirect index (lowp sampler2D)
 0:57              'fsa' (uniform 3-element array of lowp sampler2D)
 0:57              'a' (highp int)
-0:58            indirect index (uniform highp float)
+0:58            indirect index (highp float)
 0:58              'fua' (uniform 10-element array of highp float)
 0:58              add (highp int)
 0:58                'a' (highp int)
 0:58                Constant:
 0:58                  2 (const int)
-0:59            indirect index (in highp 3-component vector of float)
+0:59            indirect index (highp 3-component vector of float)
 0:59              'am3' (in highp 3X3 matrix of float)
 0:59              component-wise multiply (highp int)
 0:59                Constant:
 0:59                  3 (const int)
 0:59                'a' (highp int)
-0:60            indirect index (in highp float)
+0:60            indirect index (highp float)
 0:60              'av2' (in highp 2-component vector of float)
 0:60              component-wise multiply (highp int)
 0:60                Constant:
 0:60                  3 (const int)
 0:60                'a' (highp int)
-0:61            indirect index (smooth out highp 4-component vector of float)
+0:61            indirect index (smooth highp 4-component vector of float)
 0:61              'va' (smooth out 4-element array of highp 4-component vector of float)
 0:61              subtract (highp int)
 0:61                'a' (highp int)
 0:61                Constant:
 0:61                  1 (const int)
-0:62            indirect index (const highp 2-component vector of float)
+0:62            indirect index (highp 2-component vector of float)
 0:62              Constant:
 0:62                1.000000
 0:62                0.000000
@@ -376,7 +376,7 @@
 0:62                'a' (highp int)
 0:62                Constant:
 0:62                  2 (const int)
-0:63            indirect index (const highp float)
+0:63            indirect index (highp float)
 0:63              Constant:
 0:63                2.000000
 0:63                2.000000
@@ -391,23 +391,23 @@
 0:56          Loop Terminal Expression
 0:56          Post-Decrement (highp int)
 0:56            'a' (highp int)
-0:68      direct index (uniform lowp sampler2D)
+0:68      direct index (lowp sampler2D)
 0:68        'fsa' (uniform 3-element array of lowp sampler2D)
 0:68        Constant:
 0:68          2 (const int)
-0:69      direct index (uniform highp float)
+0:69      direct index (highp float)
 0:69        'fua' (uniform 10-element array of highp float)
 0:69        Constant:
 0:69          3 (const int)
-0:70      direct index (in highp 3-component vector of float)
+0:70      direct index (highp 3-component vector of float)
 0:70        'am3' (in highp 3X3 matrix of float)
 0:70        Constant:
 0:70          2 (const int)
-0:71      direct index (in highp float)
+0:71      direct index (highp float)
 0:71        'av2' (in highp 2-component vector of float)
 0:71        Constant:
 0:71          1 (const int)
-0:72      direct index (smooth out highp 4-component vector of float)
+0:72      direct index (smooth highp 4-component vector of float)
 0:72        'va' (smooth out 4-element array of highp 4-component vector of float)
 0:72        Constant:
 0:72          1 (const int)
diff --git a/Test/baseResults/120.frag.out b/Test/baseResults/120.frag.out
index 5691aec8aafe2e3aaad0fa26c3614bead83518a1..a550fee2ed127657e83859ae56cb6f0116ced57f 100644
--- a/Test/baseResults/120.frag.out
+++ b/Test/baseResults/120.frag.out
@@ -262,7 +262,7 @@ ERROR: node is still EOpNull!
 0:105        logical-and (bool)
 0:105          Compare Less Than (bool)
 0:105            Absolute value (float)
-0:105              direct index (in float)
+0:105              direct index (float)
 0:105                'v' (in 3-component vector of float)
 0:105                Constant:
 0:105                  0 (const int)
@@ -270,7 +270,7 @@ ERROR: node is still EOpNull!
 0:105              0.000100
 0:105          Compare Less Than (bool)
 0:105            Absolute value (float)
-0:105              direct index (in float)
+0:105              direct index (float)
 0:105                'v' (in 3-component vector of float)
 0:105                Constant:
 0:105                  1 (const int)
@@ -293,13 +293,13 @@ ERROR: node is still EOpNull!
 0:120      Sequence
 0:120        move second child to first child (4-component vector of float)
 0:120          'v' (4-component vector of float)
-0:120          direct index (smooth in 4-component vector of float)
+0:120          direct index (smooth 4-component vector of float)
 0:120            'gl_TexCoord' (smooth in unsized array of 4-component vector of float)
 0:120            Constant:
 0:120              1 (const int)
 0:121      add second child into first child (4-component vector of float)
 0:121        'v' (4-component vector of float)
-0:121        direct index (smooth in 4-component vector of float)
+0:121        direct index (smooth 4-component vector of float)
 0:121          'gl_TexCoord' (smooth in 6-element array of 4-component vector of float)
 0:121          Constant:
 0:121            3 (const int)
diff --git a/Test/baseResults/130.frag.out b/Test/baseResults/130.frag.out
index e26427567c2e3dc9b6a50a944f68f7d1c8eafca7..f6120e9b4e7477fbc55e8e4edb1ae9d6a1facead 100644
--- a/Test/baseResults/130.frag.out
+++ b/Test/baseResults/130.frag.out
@@ -9,7 +9,7 @@ ERROR: node is still EOpNull!
 0:18      Sequence
 0:18        move second child to first child (float)
 0:18          'clip' (float)
-0:18          direct index (smooth in float)
+0:18          direct index (smooth float)
 0:18            'gl_ClipDistance' (smooth in unsized array of float)
 0:18            Constant:
 0:18              3 (const int)
diff --git a/Test/baseResults/140.frag.out b/Test/baseResults/140.frag.out
index 1660a16c4d15d744c1b39bbcb96a63b4b70815ce..d548dd0987dc3645c9641affa9e84b4a9c821429 100644
--- a/Test/baseResults/140.frag.out
+++ b/Test/baseResults/140.frag.out
@@ -10,7 +10,7 @@ ERROR: node is still EOpNull!
 0:12      Sequence
 0:12        move second child to first child (float)
 0:12          'clip' (float)
-0:12          direct index (smooth in float)
+0:12          direct index (smooth float)
 0:12            'gl_ClipDistance' (smooth in 5-element array of float)
 0:12            Constant:
 0:12              2 (const int)
diff --git a/Test/baseResults/150.geom.out b/Test/baseResults/150.geom.out
index 57bbecd19532c01357207bb1e5d958a6a552d2c7..186e4a492753af4f888e407104f8491b1b7297e7 100644
--- a/Test/baseResults/150.geom.out
+++ b/Test/baseResults/150.geom.out
@@ -62,7 +62,7 @@ ERROR: node is still EOpNull!
 0:33            3 (const int)
 0:33        direct index (float)
 0:33          gl_ClipDistance: direct index for structure (unsized array of float)
-0:33            direct index (in block{gl_Position,gl_PointSize,gl_ClipDistance})
+0:33            direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
 0:33              'gl_in' (in 4-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
 0:33              Constant:
 0:33                1 (const int)
@@ -76,7 +76,7 @@ ERROR: node is still EOpNull!
 0:34          Constant:
 0:34            0 (const uint)
 0:34        gl_Position: direct index for structure (4-component vector of float)
-0:34          direct index (in block{gl_Position,gl_PointSize,gl_ClipDistance})
+0:34          direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
 0:34            'gl_in' (in 4-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
 0:34            Constant:
 0:34              0 (const int)
@@ -88,7 +88,7 @@ ERROR: node is still EOpNull!
 0:35          Constant:
 0:35            1 (const uint)
 0:35        gl_PointSize: direct index for structure (float)
-0:35          direct index (in block{gl_Position,gl_PointSize,gl_ClipDistance})
+0:35          direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
 0:35            'gl_in' (in 4-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
 0:35            Constant:
 0:35              3 (const int)
diff --git a/Test/baseResults/300.frag.out b/Test/baseResults/300.frag.out
index 6c08d7431d864e906f78bae297ac8e055a7f9a01..670ce24daf1f3216063f00126c2caa555c18262c 100644
--- a/Test/baseResults/300.frag.out
+++ b/Test/baseResults/300.frag.out
@@ -58,7 +58,7 @@ ERROR: node is still EOpNull!
 0:62      move second child to first child (lowp 4-component vector of float)
 0:62        'v' (lowp 4-component vector of float)
 0:62        Function Call: texelFetchOffset(s21;vi2;i1;vi2; (lowp 4-component vector of float)
-0:62          direct index (uniform lowp sampler2D)
+0:62          direct index (lowp sampler2D)
 0:62            'arrayedSampler' (uniform 5-element array of lowp sampler2D)
 0:62            Constant:
 0:62              2 (const int)
@@ -113,7 +113,7 @@ ERROR: node is still EOpNull!
 0:69      move second child to first child (lowp 4-component vector of float)
 0:69        'v' (lowp 4-component vector of float)
 0:69        Function Call: texture(s21;vf2; (lowp 4-component vector of float)
-0:69          indirect index (uniform lowp sampler2D)
+0:69          indirect index (lowp sampler2D)
 0:69            'arrayedSampler' (uniform 5-element array of lowp sampler2D)
 0:69            'ic1D' (flat in mediump int)
 0:69          'c2D' (smooth in lowp 2-component vector of float)
diff --git a/Test/baseResults/300.vert.out b/Test/baseResults/300.vert.out
index 934b6cd6e86e3d801706bbefadc4b17070eb59ff..38826088ce03082c703339e75366342f7b8bfabd 100644
--- a/Test/baseResults/300.vert.out
+++ b/Test/baseResults/300.vert.out
@@ -108,7 +108,7 @@ ERROR: node is still EOpNull!
 0:47            'v3' (in highp 3-component vector of float)
 0:49      move second child to first child (highp 4-component vector of float)
 0:49        'gl_Position' (gl_Position highp 4-component vector of float)
-0:49        direct index (uniform highp 4-component vector of float)
+0:49        direct index (highp 4-component vector of float)
 0:49          'm44' (uniform highp 4X4 matrix of float)
 0:49          Constant:
 0:49            2 (const int)
diff --git a/Test/baseResults/300block.frag.out b/Test/baseResults/300block.frag.out
index a64693b2b7046b1ffe9b3a950ad3445a30b746a1..6f2e670fcf41ca7b73c4e9149fcf6b29fd359ad6 100644
--- a/Test/baseResults/300block.frag.out
+++ b/Test/baseResults/300block.frag.out
@@ -30,7 +30,7 @@ ERROR: node is still EOpNull!
 0:44          Convert uint to float (float)
 0:44            direct index (mediump uint)
 0:44              nbv: direct index for structure (layout(column_major shared ) mediump 4-component vector of uint)
-0:44                direct index (layout(column_major shared ) uniform block{nbv,ni})
+0:44                direct index (layout(column_major shared ) block{nbv,ni})
 0:44                  'insts' (layout(column_major shared ) uniform 4-element array of block{nbv,ni})
 0:44                  Constant:
 0:44                    2 (const int)
@@ -38,7 +38,7 @@ ERROR: node is still EOpNull!
 0:44                  0 (const int)
 0:44              Constant:
 0:44                2 (const int)
-0:45      indirect index (layout(column_major shared ) uniform block{nbv,ni})
+0:45      indirect index (layout(column_major shared ) block{nbv,ni})
 0:45        'insts' (layout(column_major shared ) uniform 4-element array of block{nbv,ni})
 0:45        direct index (mediump uint)
 0:45          v: direct index for structure (mediump 4-component vector of uint)
diff --git a/Test/baseResults/300layout.frag.out b/Test/baseResults/300layout.frag.out
index 814e3d12c46090fd0f84197e210c2a235226036b..2992d2e292daa240f615924137663f343d9ce075 100644
--- a/Test/baseResults/300layout.frag.out
+++ b/Test/baseResults/300layout.frag.out
@@ -12,7 +12,7 @@ ERROR: node is still EOpNull!
 0:13        'p' (layout(location=3 ) out mediump 4-component vector of float)
 0:13        'pos' (smooth in mediump 4-component vector of float)
 0:14      move second child to first child (mediump 4-component vector of float)
-0:14        direct index (layout(location=4 ) out mediump 4-component vector of float)
+0:14        direct index (layout(location=4 ) mediump 4-component vector of float)
 0:14          'q' (layout(location=4 ) out 2-element array of mediump 4-component vector of float)
 0:14          Constant:
 0:14            1 (const int)
diff --git a/Test/baseResults/330.frag.out b/Test/baseResults/330.frag.out
index 435cc0836ad26e081257624471da3baa097bf28e..6de5fef597ec049789dcac00cad2b6aa2c6bca5e 100644
--- a/Test/baseResults/330.frag.out
+++ b/Test/baseResults/330.frag.out
@@ -7,7 +7,7 @@ Warning, version 330 is not yet complete; some version-specific features are pre
 0:10        'gl_FragColor' (fragColor 4-component vector of float)
 0:10        'varyingVar' (smooth in 4-component vector of float)
 0:11      move second child to first child (4-component vector of float)
-0:11        direct index (fragColor 4-component vector of float)
+0:11        direct index (4-component vector of float)
 0:11          'gl_FragData' (fragColor 32-element array of 4-component vector of float)
 0:11          Constant:
 0:11            1 (const int)
diff --git a/Test/baseResults/330comp.frag.out b/Test/baseResults/330comp.frag.out
index d9c163c9edbd5335b5507ac9d5b0def4f6966231..dfe8dc74e16938d6bd98b0b170e6a6b72cc434b0 100644
--- a/Test/baseResults/330comp.frag.out
+++ b/Test/baseResults/330comp.frag.out
@@ -7,7 +7,7 @@ Warning, version 330 is not yet complete; some version-specific features are pre
 0:10        'gl_FragColor' (fragColor 4-component vector of float)
 0:10        'varyingVar' (smooth in 4-component vector of float)
 0:11      move second child to first child (4-component vector of float)
-0:11        direct index (fragColor 4-component vector of float)
+0:11        direct index (4-component vector of float)
 0:11          'gl_FragData' (fragColor 32-element array of 4-component vector of float)
 0:11          Constant:
 0:11            1 (const int)
diff --git a/Test/baseResults/400.frag.out b/Test/baseResults/400.frag.out
index 2a1b4186692aa8d9048bf85d0ba9ba0304912219..89396d2728a5c4461950c975f68280ce909ef238 100644
--- a/Test/baseResults/400.frag.out
+++ b/Test/baseResults/400.frag.out
@@ -12,7 +12,7 @@ ERROR: node is still EOpNull!
 0:13      move second child to first child (4-component vector of float)
 0:13        'v' (4-component vector of float)
 0:13        Function Call: texture(s21;vf2; (4-component vector of float)
-0:13          indirect index (uniform sampler2D)
+0:13          indirect index (sampler2D)
 0:13            'arrayedSampler' (uniform 5-element array of sampler2D)
 0:13            'i' (flat in int)
 0:13          'c2D' (smooth in 2-component vector of float)
@@ -21,7 +21,7 @@ ERROR: node is still EOpNull!
 0:14          'outp' (out 4-component vector of float)
 0:14          Constant:
 0:14            0 (const int)
-0:14        direct index (smooth in float)
+0:14        direct index (smooth float)
 0:14          'gl_ClipDistance' (smooth in unsized array of float)
 0:14          Constant:
 0:14            1 (const int)
@@ -38,7 +38,7 @@ ERROR: node is still EOpNull!
 0:18        move second child to first child (4-component vector of float)
 0:18          'v4' (4-component vector of float)
 0:18          Function Call: textureGather(s21;vf2; (4-component vector of float)
-0:18            direct index (uniform sampler2D)
+0:18            direct index (sampler2D)
 0:18              'arrayedSampler' (uniform 5-element array of sampler2D)
 0:18              Constant:
 0:18                0 (const int)
diff --git a/Test/baseResults/400.geom.out b/Test/baseResults/400.geom.out
index 2bbac98d29979a00f104c1d8051faba14feb3b6c..9bef66271fc0c999789f71a92d69c0542a868a4b 100644
--- a/Test/baseResults/400.geom.out
+++ b/Test/baseResults/400.geom.out
@@ -32,7 +32,7 @@ ERROR: node is still EOpNull!
 0:24      Constant:
 0:24        1 (const int)
 0:25      gl_Position: direct index for structure (4-component vector of float)
-0:25        direct index (in block{gl_Position})
+0:25        direct index (block{gl_Position})
 0:25          'gl_in' (in 3-element array of block{gl_Position})
 0:25          Constant:
 0:25            1 (const int)
diff --git a/Test/baseResults/410.geom.out b/Test/baseResults/410.geom.out
index a9a3c5efba5395fed36e287a24556348cae7b955..5a01691c79ca2fc810a76cece61c1f5c7fe19ddd 100644
--- a/Test/baseResults/410.geom.out
+++ b/Test/baseResults/410.geom.out
@@ -25,7 +25,7 @@ ERROR: node is still EOpNull!
 0:30        move second child to first child (float)
 0:30          'p' (float)
 0:30          gl_PointSize: direct index for structure (float)
-0:30            direct index (in block{gl_PointSize})
+0:30            direct index (block{gl_PointSize})
 0:30              'gl_in' (in unsized array of block{gl_PointSize})
 0:30              Constant:
 0:30                1 (const int)
diff --git a/Test/baseResults/420.geom.out b/Test/baseResults/420.geom.out
index 1c2907f63edde0f9e9619f976f97d9dfc6afd3e4..d06a7d6dbafbd88fd4420493ceacd409848399d7 100644
--- a/Test/baseResults/420.geom.out
+++ b/Test/baseResults/420.geom.out
@@ -1,7 +1,9 @@
-Warning, version 150 is not yet complete; some version-specific features are present, but many are missing.
+Warning, version 420 is not yet complete; some version-specific features are present, but many are missing.
 ERROR: 0:9: 'length' :  array must be declared with a size before using this method
 ERROR: 0:11: '[' :  array must be redeclared with a size before being indexed with a variable
-ERROR: 2 compilation errors.  No code generated.
+ERROR: 0:42: 'assign' :  l-value required (can't modify a const)
+ERROR: 0:43: 'assign' :  l-value required "v4" (can't modify a uniform)
+ERROR: 4 compilation errors.  No code generated.
 
 invocations = 0
 max_vertices = 0
@@ -14,14 +16,14 @@ ERROR: node is still EOpNull!
 0:9      Constant:
 0:9        1 (const int)
 0:10      gl_Position: direct index for structure (4-component vector of float)
-0:10        direct index (in block{gl_Position,gl_PointSize,gl_ClipDistance})
+0:10        direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
 0:10          'gl_in' (in 3-element array of block{gl_Position,gl_PointSize,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 (4-component vector of float)
-0:11        indirect index (in block{gl_Position,gl_PointSize,gl_ClipDistance})
+0:11        indirect index (block{gl_Position,gl_PointSize,gl_ClipDistance})
 0:11          'gl_in' (in 3-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
 0:11          'i' (int)
 0:11        Constant:
@@ -32,15 +34,83 @@ ERROR: node is still EOpNull!
 0:20      Constant:
 0:20        3 (const int)
 0:21      gl_Position: direct index for structure (4-component vector of float)
-0:21        indirect index (in block{gl_Position,gl_PointSize,gl_ClipDistance})
+0:21        indirect index (block{gl_Position,gl_PointSize,gl_ClipDistance})
 0:21          'gl_in' (in 3-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
 0:21          'i' (int)
 0:21        Constant:
 0:21          0 (const int)
 0:22      Constant:
 0:22        3 (const int)
+0:29  Function Definition: foo4( (void)
+0:29    Function Parameters: 
+0:?     Sequence
+0:40      Sequence
+0:40        move second child to first child (4-component vector of float)
+0:40          'v' (4-component vector of float)
+0:40          Function Call: textureGatherOffset(s21;vf2;vi2; (4-component vector of float)
+0:40            's2D' (uniform sampler2D)
+0:40            'coord' (in 2-component vector of float)
+0:40            vector swizzle (2-component vector of int)
+0:40              indirect index (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' (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 (2-component vector of int)
+0:42        vector swizzle (2-component vector of int)
+0:42          indirect index (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' (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 (float)
+0:43        direct index (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 (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:?   Linker Objects
 0:?     'i' (int)
 0:?     'gl_in' (in 3-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
 0:?     'color3' (in 3-element array of 4-component vector of float)
+0:?     's2D' (uniform sampler2D)
+0:?     'coord' (in 2-component vector of float)
+0:?     'v4' (uniform 4-component vector of float)
 
diff --git a/Test/baseResults/420.vert.out b/Test/baseResults/420.vert.out
index e76430e27a341689239be1e8e19b86cc69833e04..7af5abb72d74042f772e9b03e9aedaa47698d275 100644
--- a/Test/baseResults/420.vert.out
+++ b/Test/baseResults/420.vert.out
@@ -69,7 +69,7 @@ ERROR: node is still EOpNull!
 0:55        Condition
 0:55        Compare Equal (bool)
 0:55          direct index (float)
-0:55            direct index (in 4-component vector of float)
+0:55            direct index (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)
@@ -85,7 +85,7 @@ ERROR: node is still EOpNull!
 0:57        true case
 0:58        move second child to first child (4-component vector of float)
 0:58          'badorder3' (flat out 4-component vector of float)
-0:58          direct index (in 4-component vector of float)
+0:58          direct index (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)
diff --git a/Test/baseResults/array.frag.out b/Test/baseResults/array.frag.out
index 3640184404062cc355a21c640a538d3bb85b7083..dd3fab12e90b3711be2f4b6cbf849beaaa8a0f7c 100644
--- a/Test/baseResults/array.frag.out
+++ b/Test/baseResults/array.frag.out
@@ -22,19 +22,19 @@ ERROR: node is still EOpNull!
 0:11    Sequence
 0:11      Branch: Return with expression
 0:11        Construct float (4-element array of float)
-0:11          direct index (in float)
+0:11          direct index (float)
 0:11            'a' (in 5-element array of float)
 0:11            Constant:
 0:11              0 (const int)
-0:11          direct index (in float)
+0:11          direct index (float)
 0:11            'a' (in 5-element array of float)
 0:11            Constant:
 0:11              1 (const int)
-0:11          direct index (in float)
+0:11          direct index (float)
 0:11            'a' (in 5-element array of float)
 0:11            Constant:
 0:11              2 (const int)
-0:11          direct index (in float)
+0:11          direct index (float)
 0:11            'a' (in 5-element array of float)
 0:11            Constant:
 0:11              3 (const int)
@@ -116,7 +116,7 @@ ERROR: node is still EOpNull!
 0:43      Function Call: foo(f1[5]; (4-element array of float)
 0:43        'u' (5-element array of float)
 0:45      move second child to first child (4-component vector of float)
-0:45        direct index (fragColor 4-component vector of float)
+0:45        direct index (4-component vector of float)
 0:45          'gl_FragData' (fragColor 32-element array of 4-component vector of float)
 0:45          Constant:
 0:45            1000 (const int)
@@ -126,7 +126,7 @@ ERROR: node is still EOpNull!
 0:45          1.000000
 0:45          1.000000
 0:46      move second child to first child (4-component vector of float)
-0:46        direct index (fragColor 4-component vector of float)
+0:46        direct index (4-component vector of float)
 0:46          'gl_FragData' (fragColor 32-element array of 4-component vector of float)
 0:46          Constant:
 0:46            -1 (const int)
@@ -136,7 +136,7 @@ ERROR: node is still EOpNull!
 0:46          1.000000
 0:46          1.000000
 0:47      move second child to first child (4-component vector of float)
-0:47        direct index (fragColor 4-component vector of float)
+0:47        direct index (4-component vector of float)
 0:47          'gl_FragData' (fragColor 32-element array of 4-component vector of float)
 0:47          Constant:
 0:47            3 (const int)
diff --git a/Test/baseResults/array100.frag.out b/Test/baseResults/array100.frag.out
index ce9072b7f4a21fc41b00451417aa493856c98137..400b097e3de9ca69e9791cd31abb0654d4cc6ad8 100644
--- a/Test/baseResults/array100.frag.out
+++ b/Test/baseResults/array100.frag.out
@@ -24,19 +24,19 @@ ERROR: node is still EOpNull!
 0:11    Sequence
 0:11      Branch: Return with expression
 0:11        Construct float (4-element array of float)
-0:11          direct index (in mediump float)
+0:11          direct index (mediump float)
 0:11            'a' (in 5-element array of mediump float)
 0:11            Constant:
 0:11              0 (const int)
-0:11          direct index (in mediump float)
+0:11          direct index (mediump float)
 0:11            'a' (in 5-element array of mediump float)
 0:11            Constant:
 0:11              1 (const int)
-0:11          direct index (in mediump float)
+0:11          direct index (mediump float)
 0:11            'a' (in 5-element array of mediump float)
 0:11            Constant:
 0:11              2 (const int)
-0:11          direct index (in mediump float)
+0:11          direct index (mediump float)
 0:11            'a' (in 5-element array of mediump float)
 0:11            Constant:
 0:11              3 (const int)
@@ -91,7 +91,7 @@ ERROR: node is still EOpNull!
 0:36      Function Call: foo(f1[5]; (4-element array of mediump float)
 0:36        'u' (5-element array of mediump float)
 0:38      move second child to first child (mediump 4-component vector of float)
-0:38        direct index (fragColor mediump 4-component vector of float)
+0:38        direct index (mediump 4-component vector of float)
 0:38          'gl_FragData' (fragColor 32-element array of mediump 4-component vector of float)
 0:38          Constant:
 0:38            1000 (const int)
@@ -101,7 +101,7 @@ ERROR: node is still EOpNull!
 0:38          1.000000
 0:38          1.000000
 0:39      move second child to first child (mediump 4-component vector of float)
-0:39        direct index (fragColor mediump 4-component vector of float)
+0:39        direct index (mediump 4-component vector of float)
 0:39          'gl_FragData' (fragColor 32-element array of mediump 4-component vector of float)
 0:39          Constant:
 0:39            -1 (const int)
@@ -111,7 +111,7 @@ ERROR: node is still EOpNull!
 0:39          1.000000
 0:39          1.000000
 0:40      move second child to first child (mediump 4-component vector of float)
-0:40        direct index (fragColor mediump 4-component vector of float)
+0:40        direct index (mediump 4-component vector of float)
 0:40          'gl_FragData' (fragColor 32-element array of mediump 4-component vector of float)
 0:40          Constant:
 0:40            3 (const int)
diff --git a/Test/baseResults/dataOut.frag.out b/Test/baseResults/dataOut.frag.out
index a57aec36fd39eb299059589186890521c3b26727..dbceed656917c2cb52def30c9db0193706cd6c93 100644
--- a/Test/baseResults/dataOut.frag.out
+++ b/Test/baseResults/dataOut.frag.out
@@ -5,7 +5,7 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas
 0:5    Function Parameters: 
 0:7    Sequence
 0:7      move second child to first child (4-component vector of float)
-0:7        direct index (fragColor 4-component vector of float)
+0:7        direct index (4-component vector of float)
 0:7          'gl_FragData' (fragColor 32-element array of 4-component vector of float)
 0:7          Constant:
 0:7            1 (const int)
diff --git a/Test/baseResults/dataOutIndirect.frag.out b/Test/baseResults/dataOutIndirect.frag.out
index 5e18a6a60e84ccf48ba6d687a7bc4581abb73623..b6e1c09bfc3f0b8e9edcdec848a8e542533c975a 100644
--- a/Test/baseResults/dataOutIndirect.frag.out
+++ b/Test/baseResults/dataOutIndirect.frag.out
@@ -5,7 +5,7 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas
 0:7    Function Parameters: 
 0:9    Sequence
 0:9      move second child to first child (4-component vector of float)
-0:9        indirect index (fragColor 4-component vector of float)
+0:9        indirect index (4-component vector of float)
 0:9          'gl_FragData' (fragColor 32-element array of 4-component vector of float)
 0:9          'i' (uniform int)
 0:9        'Color' (smooth in 4-component vector of float)
diff --git a/Test/baseResults/length.frag.out b/Test/baseResults/length.frag.out
index c4438c5540a3b5869b37576005ef101e252dff42..b51af1706333a9557e43c6359f59dac25be3bea9 100644
--- a/Test/baseResults/length.frag.out
+++ b/Test/baseResults/length.frag.out
@@ -7,11 +7,11 @@ Warning, version 120 is not yet complete; most features are present, but a few a
 0:15        move second child to first child (2-component vector of float)
 0:15          't' (2-component vector of float)
 0:15          add (2-component vector of float)
-0:15            direct index (smooth in 2-component vector of float)
+0:15            direct index (smooth 2-component vector of float)
 0:15              'v' (smooth in 2-element array of 2-component vector of float)
 0:15              Constant:
 0:15                0 (const int)
-0:15            direct index (smooth in 2-component vector of float)
+0:15            direct index (smooth 2-component vector of float)
 0:15              'v' (smooth in 2-element array of 2-component vector of float)
 0:15              Constant:
 0:15                1 (const int)
diff --git a/Test/baseResults/link1.frag.out b/Test/baseResults/link1.frag.out
index 6827be30557bd3cdca116e2d7469bce41cc8b88c..65c7fc6c1b8fb7a65a8859c6093984a89f8ab5c5 100644
--- a/Test/baseResults/link1.frag.out
+++ b/Test/baseResults/link1.frag.out
@@ -24,7 +24,7 @@ Warning, version 130 is not yet complete; most features are present, but a few a
 0:21    Sequence
 0:21      Branch: Return with expression
 0:21        Convert float to int (2-component vector of int)
-0:21          direct index (in 2-component vector of float)
+0:21          direct index (2-component vector of float)
 0:21            'm' (in 2X2 matrix of float)
 0:21            Constant:
 0:21              0 (const int)
@@ -197,7 +197,7 @@ ERROR: Linking fragment stage: Precision qualifiers must match:
 0:21    Sequence
 0:21      Branch: Return with expression
 0:21        Convert float to int (2-component vector of int)
-0:21          direct index (in 2-component vector of float)
+0:21          direct index (2-component vector of float)
 0:21            'm' (in 2X2 matrix of float)
 0:21            Constant:
 0:21              0 (const int)
diff --git a/Test/baseResults/matrix.frag.out b/Test/baseResults/matrix.frag.out
index e3613eca7da39f7221a2e290d9720f7e09d783db..2d794cf6879a83517ec301822fdeca2f3064be90 100644
--- a/Test/baseResults/matrix.frag.out
+++ b/Test/baseResults/matrix.frag.out
@@ -9,7 +9,7 @@ WARNING: 0:22: varying deprecated in version 130; may be removed in future relea
 0:27      move second child to first child (4-component vector of float)
 0:27        'gl_FragColor' (fragColor 4-component vector of float)
 0:27        Construct vec4 (4-component vector of float)
-0:27          direct index (uniform 4-component vector of float)
+0:27          direct index (4-component vector of float)
 0:27            'un34' (uniform 4X4 matrix of float)
 0:27            Constant:
 0:27              1 (const int)
diff --git a/Test/baseResults/structure.frag.out b/Test/baseResults/structure.frag.out
index 1c5f9fde10d4001cbcf38b14beb7e08084efd189..53c7e96e94a65ea9a25484a926925ea749df8665 100644
--- a/Test/baseResults/structure.frag.out
+++ b/Test/baseResults/structure.frag.out
@@ -14,7 +14,7 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas
 0:24        Compare Greater Than (bool)
 0:24          direct index (int)
 0:24            i: direct index for structure (5-element array of int)
-0:24              direct index (uniform structure{i,f,s1_1})
+0:24              direct index (structure{i,f,s1_1})
 0:24                'foo2' (uniform 5-element array of structure{i,f,s1_1})
 0:24                Constant:
 0:24                  3 (const int)
@@ -32,7 +32,7 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas
 0:25              color: direct index for structure (5-element array of 4-component vector of float)
 0:25                direct index (structure{i,f,color})
 0:25                  s1_1: direct index for structure (7-element array of structure{i,f,color})
-0:25                    direct index (uniform structure{i,f,s1_1})
+0:25                    direct index (structure{i,f,s1_1})
 0:25                      'foo2' (uniform 5-element array of structure{i,f,s1_1})
 0:25                      Constant:
 0:25                        3 (const int)
@@ -53,7 +53,7 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas
 0:27            f: direct index for structure (4-element array of float)
 0:27              direct index (structure{i,f,color})
 0:27                s1_1: direct index for structure (7-element array of structure{i,f,color})
-0:27                  direct index (uniform structure{i,f,s1_1})
+0:27                  direct index (structure{i,f,s1_1})
 0:27                    'foo2' (uniform 5-element array of structure{i,f,s1_1})
 0:27                    Constant:
 0:27                      3 (const int)
diff --git a/Test/baseResults/uniformArray.frag.out b/Test/baseResults/uniformArray.frag.out
index c71228da1722f45749c851ae2a973d616b87fda5..e455809ac5e99cd9cfe185af854600d1ad9d9f85 100644
--- a/Test/baseResults/uniformArray.frag.out
+++ b/Test/baseResults/uniformArray.frag.out
@@ -7,11 +7,11 @@ Warning, version 130 is not yet complete; most features are present, but a few a
 0:9        move second child to first child (4-component vector of float)
 0:9          'texColor' (4-component vector of float)
 0:9          add (4-component vector of float)
-0:9            direct index (uniform 4-component vector of float)
+0:9            direct index (4-component vector of float)
 0:9              'color' (uniform 6-element array of 4-component vector of float)
 0:9              Constant:
 0:9                1 (const int)
-0:9            direct index (uniform 4-component vector of float)
+0:9            direct index (4-component vector of float)
 0:9              'color' (uniform 6-element array of 4-component vector of float)
 0:9              Constant:
 0:9                1 (const int)
@@ -31,7 +31,7 @@ Warning, version 130 is not yet complete; most features are present, but a few a
 0:13          'texColor' (4-component vector of float)
 0:13          Constant:
 0:13            3 (const int)
-0:13        direct index (uniform float)
+0:13        direct index (float)
 0:13          'alpha' (uniform 16-element array of float)
 0:13          Constant:
 0:13            12 (const int)
diff --git a/Test/baseResults/variableArrayIndex.frag.out b/Test/baseResults/variableArrayIndex.frag.out
index 7f32727fb40b7d69818681913fd29324310597a1..e7d2d2a1ab96358fbc513d76772e61364f8ef8fd 100644
--- a/Test/baseResults/variableArrayIndex.frag.out
+++ b/Test/baseResults/variableArrayIndex.frag.out
@@ -28,7 +28,7 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas
 0:35          'scale' (float)
 0:35          f: direct index for structure (float)
 0:35            s1_1: direct index for structure (structure{i,f})
-0:35              indirect index (uniform structure{i,f,s1_1})
+0:35              indirect index (structure{i,f,s1_1})
 0:35                'foo2' (uniform 5-element array of structure{i,f,s1_1})
 0:35                add (int)
 0:35                  add (int)
diff --git a/Test/baseResults/varyingArray.frag.out b/Test/baseResults/varyingArray.frag.out
index d8d0cdca36a651b73440e3bd11fa7350633915a4..8ea2a0189e939e4abc40b3b53db7659fcbbf5232 100644
--- a/Test/baseResults/varyingArray.frag.out
+++ b/Test/baseResults/varyingArray.frag.out
@@ -14,11 +14,11 @@ WARNING: 0:8: varying deprecated in version 130; may be removed in future releas
 0:12            'texSampler2D' (uniform sampler2D)
 0:12            Construct vec2 (2-component vector of float)
 0:12              add (4-component vector of float)
-0:12                direct index (smooth in 4-component vector of float)
+0:12                direct index (smooth 4-component vector of float)
 0:12                  'gl_TexCoord' (smooth in 6-element array of 4-component vector of float)
 0:12                  Constant:
 0:12                    4 (const int)
-0:12                direct index (smooth in 4-component vector of float)
+0:12                direct index (smooth 4-component vector of float)
 0:12                  'gl_TexCoord' (smooth in 6-element array of 4-component vector of float)
 0:12                  Constant:
 0:12                    5 (const int)
@@ -36,15 +36,15 @@ WARNING: 0:8: varying deprecated in version 130; may be removed in future releas
 0:18        add (4-component vector of float)
 0:18          add (4-component vector of float)
 0:18            add (4-component vector of float)
-0:18              direct index (smooth in 4-component vector of float)
+0:18              direct index (smooth 4-component vector of float)
 0:18                'foo' (smooth in 3-element array of 4-component vector of float)
 0:18                Constant:
 0:18                  1 (const int)
-0:18              direct index (smooth in 4-component vector of float)
+0:18              direct index (smooth 4-component vector of float)
 0:18                'gl_TexCoord' (smooth in 6-element array of 4-component vector of float)
 0:18                Constant:
 0:18                  0 (const int)
-0:18            direct index (smooth in 4-component vector of float)
+0:18            direct index (smooth 4-component vector of float)
 0:18              'gl_TexCoord' (smooth in 6-element array of 4-component vector of float)
 0:18              Constant:
 0:18                4 (const int)
diff --git a/Test/baseResults/varyingArrayIndirect.frag.out b/Test/baseResults/varyingArrayIndirect.frag.out
index 311638f673e8e9dcd61360882b110e2f028fce77..087c6a59052caafd619a2853a496d920854b60a2 100644
--- a/Test/baseResults/varyingArrayIndirect.frag.out
+++ b/Test/baseResults/varyingArrayIndirect.frag.out
@@ -15,13 +15,13 @@ WARNING: 0:8: varying deprecated in version 130; may be removed in future releas
 0:14            Construct vec2 (2-component vector of float)
 0:14              add (4-component vector of float)
 0:14                add (4-component vector of float)
-0:14                  indirect index (smooth in 4-component vector of float)
+0:14                  indirect index (smooth 4-component vector of float)
 0:14                    'userIn' (smooth in 2-element array of 4-component vector of float)
 0:14                    'b' (uniform int)
-0:14                  indirect index (smooth in 4-component vector of float)
+0:14                  indirect index (smooth 4-component vector of float)
 0:14                    'gl_TexCoord' (smooth in 6-element array of 4-component vector of float)
 0:14                    'a' (uniform int)
-0:14                direct index (smooth in 4-component vector of float)
+0:14                direct index (smooth 4-component vector of float)
 0:14                  'gl_TexCoord' (smooth in 6-element array of 4-component vector of float)
 0:14                  Constant:
 0:14                    5 (const int)
@@ -39,15 +39,15 @@ WARNING: 0:8: varying deprecated in version 130; may be removed in future releas
 0:20        add (4-component vector of float)
 0:20          add (4-component vector of float)
 0:20            add (4-component vector of float)
-0:20              direct index (smooth in 4-component vector of float)
+0:20              direct index (smooth 4-component vector of float)
 0:20                'gl_TexCoord' (smooth in 6-element array of 4-component vector of float)
 0:20                Constant:
 0:20                  0 (const int)
-0:20              indirect index (smooth in 4-component vector of float)
+0:20              indirect index (smooth 4-component vector of float)
 0:20                'gl_TexCoord' (smooth in 6-element array of 4-component vector of float)
 0:20                'b' (uniform int)
 0:20            'texColor' (4-component vector of float)
-0:20          indirect index (smooth in 4-component vector of float)
+0:20          indirect index (smooth 4-component vector of float)
 0:20            'userIn' (smooth in 2-element array of 4-component vector of float)
 0:20            'a' (uniform int)
 0:?   Linker Objects
diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp
index 77100a86fac03a7f0b6b8caa4c2e8a7b4b66d4b2..14c92a5f80e9a2938a9a2613f480178943c91a1b 100644
--- a/glslang/MachineIndependent/ParseHelper.cpp
+++ b/glslang/MachineIndependent/ParseHelper.cpp
@@ -492,6 +492,8 @@ TIntermTyped* TParseContext::handleBracketDereference(TSourceLoc loc, TIntermTyp
         newType.shallowCopy(base->getType());
         if (base->getType().getQualifier().storage == EvqConst && index->getQualifier().storage == EvqConst)
             newType.getQualifier().storage = EvqConst;
+        else
+            newType.getQualifier().storage = EvqTemporary;
         newType.dereference();
         result->setType(newType);
 
@@ -3383,8 +3385,10 @@ TIntermNode* TParseContext::addSwitch(TSourceLoc loc, TIntermTyped* expression,
     return switchNode;
 }
 
+// TODO: constant folding: these should use a follow a fully folded model now, and probably move to Constant.cpp scheme.
+
 //
-// This function returns the tree representation for the vector field(s) being accessed from contant vector.
+// This function returns the tree representation for the vector field(s) being accessed from a constant vector.
 // If only one component of vector is accessed (v.x or v[0] where v is a contant vector), then a contant node is
 // returned, else an aggregate node is returned (for v.xy). The input to this function could either be the symbol
 // node or it could be the intermediate tree representation of accessing fields in a constant structure or column of