/* [config]
 * expect_result: pass
 * glsl_version: 4.00
 * require_extensions: GL_ARB_gpu_shader_int64
 * [end config]
 *
 * Check that the following test vectors are constant folded correctly:
 * min(20ul, 20ul) => 20ul
 * min(20ul, 43ul) => 20ul
 * min(20ul, 66ul) => 20ul
 * min(20ul, 90ul) => 20ul
 * min(43ul, 20ul) => 20ul
 * min(43ul, 43ul) => 43ul
 * min(43ul, 66ul) => 43ul
 * min(43ul, 90ul) => 43ul
 * min(66ul, 20ul) => 20ul
 * min(66ul, 43ul) => 43ul
 * min(66ul, 66ul) => 66ul
 * min(66ul, 90ul) => 66ul
 * min(90ul, 20ul) => 20ul
 * min(90ul, 43ul) => 43ul
 * min(90ul, 66ul) => 66ul
 * min(90ul, 90ul) => 90ul
 */
#version 400
#extension GL_ARB_gpu_shader_int64 : require

void main()
{
  float[min(20ul, 20ul) == 20ul ? 1 : -1] array0;
  float[min(20ul, 43ul) == 20ul ? 1 : -1] array1;
  float[min(20ul, 66ul) == 20ul ? 1 : -1] array2;
  float[min(20ul, 90ul) == 20ul ? 1 : -1] array3;
  float[min(43ul, 20ul) == 20ul ? 1 : -1] array4;
  float[min(43ul, 43ul) == 43ul ? 1 : -1] array5;
  float[min(43ul, 66ul) == 43ul ? 1 : -1] array6;
  float[min(43ul, 90ul) == 43ul ? 1 : -1] array7;
  float[min(66ul, 20ul) == 20ul ? 1 : -1] array8;
  float[min(66ul, 43ul) == 43ul ? 1 : -1] array9;
  float[min(66ul, 66ul) == 66ul ? 1 : -1] array10;
  float[min(66ul, 90ul) == 66ul ? 1 : -1] array11;
  float[min(90ul, 20ul) == 20ul ? 1 : -1] array12;
  float[min(90ul, 43ul) == 43ul ? 1 : -1] array13;
  float[min(90ul, 66ul) == 66ul ? 1 : -1] array14;
  float[min(90ul, 90ul) == 90ul ? 1 : -1] array15;
  gl_Position = vec4(array0.length() + array1.length() + array2.length() + array3.length() + array4.length() + array5.length() + array6.length() + array7.length() + array8.length() + array9.length() + array10.length() + array11.length() + array12.length() + array13.length() + array14.length() + array15.length());
}
