diff --git a/Test/310implicitSizeArrayError.vert b/Test/310implicitSizeArrayError.vert
index 72c403e83445714b87556aa5ce9e2f8d4f011e9f..7aa0ee1b729a5fbc6db5fb2656fd0bf0b22da49e 100644
--- a/Test/310implicitSizeArrayError.vert
+++ b/Test/310implicitSizeArrayError.vert
@@ -1,5 +1,5 @@
 #version 310 es
-layout (location=0) uniform Block {
+layout (binding=0) uniform Block {
   highp int a[];
 } uni;
 layout (location=0) out highp int o;
diff --git a/Test/450.vert b/Test/450.vert
index 51e9b100430fd2879141ddad920baaa1d932d1e6..e99a133c1346e4ce952db4b3e40fb8b1a5ab3e0f 100644
--- a/Test/450.vert
+++ b/Test/450.vert
@@ -46,3 +46,11 @@ void foo()
     allInvocationsEqual(b1);  // ERROR, need 4.6
 }
 ; // ERROR: no extraneous semicolons
+
+layout(location = 0) uniform locBlock {        // ERROR, no location uniform block
+    int a;
+};
+
+layout(location = 0) buffer locBuffBlock {     // ERROR, no location on buffer block
+    int b;
+};
diff --git a/Test/baseResults/310implicitSizeArrayError.vert.out b/Test/baseResults/310implicitSizeArrayError.vert.out
index 1eed457dbae4c8b1a1121dbd84a546ac9c4691f6..982634871e145fb6f3c3218bdab906ca5a540584 100644
--- a/Test/baseResults/310implicitSizeArrayError.vert.out
+++ b/Test/baseResults/310implicitSizeArrayError.vert.out
@@ -12,13 +12,13 @@ ERROR: node is still EOpNull!
 0:7        'o' (layout( location=0) smooth out highp int)
 0:7        direct index (layout( column_major shared) temp highp int)
 0:7          a: direct index for structure (layout( column_major shared) uniform implicitly-sized array of highp int)
-0:7            'uni' (layout( location=0 column_major shared) uniform block{layout( column_major shared) uniform implicitly-sized array of highp int a})
+0:7            'uni' (layout( binding=0 column_major shared) uniform block{layout( column_major shared) uniform implicitly-sized array of highp int a})
 0:7            Constant:
 0:7              0 (const int)
 0:7          Constant:
 0:7            2 (const int)
 0:?   Linker Objects
-0:?     'uni' (layout( location=0 column_major shared) uniform block{layout( column_major shared) uniform implicitly-sized array of highp int a})
+0:?     'uni' (layout( binding=0 column_major shared) uniform block{layout( column_major shared) uniform implicitly-sized array of highp int a})
 0:?     'o' (layout( location=0) smooth out highp int)
 0:?     'gl_VertexID' ( gl_VertexId highp int VertexId)
 0:?     'gl_InstanceID' ( gl_InstanceId highp int InstanceId)
@@ -36,13 +36,13 @@ ERROR: node is still EOpNull!
 0:7        'o' (layout( location=0) smooth out highp int)
 0:7        direct index (layout( column_major shared) temp highp int)
 0:7          a: direct index for structure (layout( column_major shared) uniform 1-element array of highp int)
-0:7            'uni' (layout( location=0 column_major shared) uniform block{layout( column_major shared) uniform 1-element array of highp int a})
+0:7            'uni' (layout( binding=0 column_major shared) uniform block{layout( column_major shared) uniform 1-element array of highp int a})
 0:7            Constant:
 0:7              0 (const int)
 0:7          Constant:
 0:7            2 (const int)
 0:?   Linker Objects
-0:?     'uni' (layout( location=0 column_major shared) uniform block{layout( column_major shared) uniform 1-element array of highp int a})
+0:?     'uni' (layout( binding=0 column_major shared) uniform block{layout( column_major shared) uniform 1-element array of highp int a})
 0:?     'o' (layout( location=0) smooth out highp int)
 0:?     'gl_VertexID' ( gl_VertexId highp int VertexId)
 0:?     'gl_InstanceID' ( gl_InstanceId highp int InstanceId)
diff --git a/Test/baseResults/330.frag.out b/Test/baseResults/330.frag.out
index 5919c76afbe8f9318111162d5ac39629eca80bc1..774563125ceea0e6cef97b6e8d21a2a039b9c2ea 100644
--- a/Test/baseResults/330.frag.out
+++ b/Test/baseResults/330.frag.out
@@ -16,6 +16,7 @@ ERROR: 0:57: 'location on block member' : not supported for this version or the
 ERROR: 0:62: 'location on block member' : can only use in an in/out block 
 ERROR: 0:62: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions 
 ERROR: 0:60: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions 
+ERROR: 0:60: 'location' : cannot apply to uniform or buffer block 
 ERROR: 0:68: 'layout-id value' : cannot be negative 
 ERROR: 0:69: 'layout-id value' : cannot be negative 
 ERROR: 0:76: 'f2' : cannot use layout qualifiers on structure members 
@@ -23,6 +24,7 @@ ERROR: 0:91: 'location on block member' : can only use in an in/out block
 ERROR: 0:91: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions 
 ERROR: 0:91: 'location' : overlapping use of location 3
 ERROR: 0:89: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions 
+ERROR: 0:89: 'location' : cannot apply to uniform or buffer block 
 ERROR: 0:94: 'location' : either the block needs a location, or all members need a location, or no members have a location 
 ERROR: 0:108: 'A' : cannot use layout qualifiers on structure members 
 ERROR: 0:119: 'location' : overlapping use of location 44
@@ -38,7 +40,7 @@ ERROR: 0:140: 'assign' :  cannot convert from ' const float' to ' temp 2-compone
 ERROR: 0:141: 'textureQueryLod' : no matching overloaded function found 
 ERROR: 0:141: 'assign' :  cannot convert from ' const float' to ' temp 2-component vector of float'
 ERROR: 0:152: 'index' : value must be 0 or 1 
-ERROR: 39 compilation errors.  No code generated.
+ERROR: 41 compilation errors.  No code generated.
 
 
 Shader version: 330
diff --git a/Test/baseResults/450.vert.out b/Test/baseResults/450.vert.out
index 64143de566024b5fb9c770e5eb808629c07fc840..0f5f23136e7cf2231a55797a9018e22d543f19f1 100644
--- a/Test/baseResults/450.vert.out
+++ b/Test/baseResults/450.vert.out
@@ -19,7 +19,9 @@ ERROR: 0:44: 'anyInvocation' : no matching overloaded function found
 ERROR: 0:45: 'allInvocations' : no matching overloaded function found 
 ERROR: 0:46: 'allInvocationsEqual' : no matching overloaded function found 
 ERROR: 0:48: 'extraneous semicolon' : not supported for this version or the enabled extensions 
-ERROR: 20 compilation errors.  No code generated.
+ERROR: 0:50: 'location' : cannot apply to uniform or buffer block 
+ERROR: 0:54: 'location' : cannot apply to uniform or buffer block 
+ERROR: 22 compilation errors.  No code generated.
 
 
 Shader version: 450
@@ -77,6 +79,8 @@ ERROR: node is still EOpNull!
 0:?     'outSS' ( smooth out structure{ global float f,  global structure{ global float f} s})
 0:?     'aui' (layout( binding=0 offset=0) uniform atomic_uint)
 0:?     'ui' ( global uint)
+0:?     'anon@1' (layout( location=0 column_major shared) uniform block{layout( column_major shared) uniform int a})
+0:?     'anon@2' (layout( location=0 column_major shared) buffer block{layout( column_major shared) buffer int b})
 0:?     'gl_VertexID' ( gl_VertexId int VertexId)
 0:?     'gl_InstanceID' ( gl_InstanceId int InstanceId)
 
@@ -112,6 +116,8 @@ ERROR: node is still EOpNull!
 0:?     'outSS' ( smooth out structure{ global float f,  global structure{ global float f} s})
 0:?     'aui' (layout( binding=0 offset=0) uniform atomic_uint)
 0:?     'ui' ( global uint)
+0:?     'anon@1' (layout( location=0 column_major shared) uniform block{layout( column_major shared) uniform int a})
+0:?     'anon@2' (layout( location=0 column_major shared) buffer block{layout( column_major shared) buffer int b})
 0:?     'gl_VertexID' ( gl_VertexId int VertexId)
 0:?     'gl_InstanceID' ( gl_InstanceId int InstanceId)
 
diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp
index 228909c0ecdfb73b943f456cdbb624aff7e15f9a..d662be1556fb657450bc61fb279e427f5824b226 100644
--- a/glslang/MachineIndependent/ParseHelper.cpp
+++ b/glslang/MachineIndependent/ParseHelper.cpp
@@ -4569,6 +4569,8 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
             break;
         case EvqUniform:
         case EvqBuffer:
+            if (type.getBasicType() == EbtBlock)
+                error(loc, "cannot apply to uniform or buffer block", "location", "");
             break;
         default:
             error(loc, "can only apply to uniform, buffer, in, or out storage qualifiers", "location", "");