[BUG] Compile error: "non constant expression in initialization"

Bug report and files:
https://github.com/mc-imperial/shader-compiler-bugs/issues/13

Fragment shader:

#version 440

void main(void)
{
  vec4 A[2] = vec4[2](vec4(1.0), vec4((vec2(1.0) * mat2(1.0)).x));
  int x = 1;
  vec4 y = vec4(A[x].z);
}

Link error log:

Fragment info
-------------
0(7) : error C1059: non constant expression in initialization

Note that the shader is accepted by glslangValidator.

  1. Operating system version.

Windows 10

  1. Graphics hardware.

GeForce GTX 770. Driver: 373.06

  1. Reproducer project.
    We have provided the fragment shader at the above link.

  2. Description of single steps to reproduce the problem.
    Compile and link the fragment shader.

  3. Description of the expected result.
    No link error.

Thanks for the report. We have filed an internal bug to track this issue. It should be fixed in newer drivers.