diff --git a/Test/array100.frag b/Test/array100.frag index beedfeca94b67dc65f7d98cf6582333a0b063fd2..b77aedf6e54a6b7beee83da79498689e3cf6ec60 100644 --- a/Test/array100.frag +++ b/Test/array100.frag @@ -66,4 +66,5 @@ void bar11() s1 = s2; // ERROR bar10(s1); s2 = bar9(); // ERROR + SB initSb = s1; // ERROR } diff --git a/Test/baseResults/100.frag.out b/Test/baseResults/100.frag.out index 1c08f355f3a2abd82929a9b97db717419258de11..9a5c37e50e5eb62a4db9b53a8b37f9d4da704569 100644 --- a/Test/baseResults/100.frag.out +++ b/Test/baseResults/100.frag.out @@ -1,5 +1,6 @@ ERROR: 0:3: '{ } style initializers' : not supported with this profile: es ERROR: 0:3: 'initializer' : not supported for this version or the enabled extensions +ERROR: 0:3: 'array initializer' : not supported for this version or the enabled extensions ERROR: 0:7: 'attribute' : not supported in this stage: fragment ERROR: 0:7: 'float' : type requires declaration of default precision qualifier ERROR: 0:9: '=' : cannot convert from 'const int' to 'mediump float' @@ -60,7 +61,7 @@ ERROR: 0:144: 'a' : redefinition ERROR: 0:149: 'floating-point suffix' : not supported for this version or the enabled extensions ERROR: 0:150: 'floating-point suffix' : not supported for this version or the enabled extensions ERROR: 0:152: '' : syntax error -ERROR: 55 compilation errors. No code generated. +ERROR: 56 compilation errors. No code generated. ERROR: node is still EOpNull! 0:3 Sequence diff --git a/Test/baseResults/array100.frag.out b/Test/baseResults/array100.frag.out index 5302806a668baadfdd01d394d9af1ec84c5b4c2b..8223f4b45a4c6127a74608c42d3e3106b9cae1d8 100644 --- a/Test/baseResults/array100.frag.out +++ b/Test/baseResults/array100.frag.out @@ -19,7 +19,8 @@ ERROR: 0:39: '[' : index out of range '-1' ERROR: 0:53: 'array in function return type' : not supported for this version or the enabled extensions ERROR: 0:66: 'array assignment' : not supported for this version or the enabled extensions ERROR: 0:68: 'array assignment' : not supported for this version or the enabled extensions -ERROR: 21 compilation errors. No code generated. +ERROR: 0:69: 'array initializer' : not supported for this version or the enabled extensions +ERROR: 22 compilation errors. No code generated. ERROR: node is still EOpNull! 0:9 Function Definition: foo(f1[5]; (4-element array of mediump float) @@ -143,6 +144,10 @@ ERROR: node is still EOpNull! 0:68 move second child to first child (structure{v4,sa}) 0:68 's2' (structure{v4,sa}) 0:68 Function Call: bar9( (structure{v4,sa}) +0:69 Sequence +0:69 move second child to first child (structure{v4,sa}) +0:69 'initSb' (structure{v4,sa}) +0:69 's1' (structure{v4,sa}) 0:? Linker Objects 0:? 'gu' (unsized array of mediump float) 0:? 'g4' (4-element array of mediump float) diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp index f23b37e9f628df582038c96000afcc4a968df542..765c8858d1286ba82a52e0ed8c2b67a2eda24ab5 100644 --- a/glslang/MachineIndependent/ParseHelper.cpp +++ b/glslang/MachineIndependent/ParseHelper.cpp @@ -2927,6 +2927,7 @@ TIntermNode* TParseContext::executeInitializer(TSourceLoc loc, TString& identifi error(loc, " cannot initialize this type of qualifier ", variable->getType().getStorageQualifierString(), ""); return 0; } + arrayObjectCheck(loc, variable->getType(), "array initializer"); // // If the initializer was from braces { ... }, we convert the whole subtree to a