fix the wrong generated code when a non-constant array is declared with its size derived from spec constant operations

This commit is contained in:
qining
2016-04-01 10:35:16 -04:00
parent aa0298bfde
commit 4c9126153d
3 changed files with 133 additions and 112 deletions

View File

@@ -86,5 +86,10 @@ const ivec2 iv_yx = iv.yx;
const ivec3 iv_zyx = iv.zyx;
const ivec4 iv_yzxw = iv.yzxw;
int non_const_array_size_from_spec_const() {
int array[sp_int + 2];
return array[sp_int + 1];
}
void main() {}