1 2out vec4 sk_FragColor; 3uniform vec4 colorGreen; 4uniform vec4 colorRed; 5bool flatten_compound_constructor_b() { 6 ivec4 x = ivec4(ivec3(ivec2(1, 2), 3), 4); 7 ivec4 y = ivec4(1, ivec3(2, ivec2(3, 4))); 8 return x == y; 9} 10bool flatten_known_if_b() { 11 int value; 12 if (true) { 13 value = 1; 14 } else { 15 value = 2; 16 } 17 return value == 1; 18} 19bool eliminate_empty_if_else_b() { 20 bool check = false; 21 if (check = !check) { 22 } else { 23 } 24 return check; 25} 26bool eliminate_empty_else_b() { 27 bool check = true; 28 if (check) { 29 return true; 30 } else { 31 } 32 return false; 33} 34bool flatten_matching_ternary_b() { 35 bool check = true; 36 return check ? true : true; 37} 38bool flatten_expr_without_side_effects_b() { 39 bool check = true; 40 check; 41 return check; 42} 43bool eliminate_no_op_arithmetic_b() { 44 const int ONE = 1; 45 int a1[1]; 46 int a2[1]; 47 int x = ONE; 48 x = x + 0; 49 x *= 1; 50 return x == 1; 51} 52bool flatten_switch_b() { 53 switch (1) { 54 case 0: 55 return false; 56 case 1: 57 return true; 58 case 2: 59 return false; 60 } 61 return false; 62} 63vec4 main() { 64 return ((((((flatten_compound_constructor_b() && flatten_known_if_b()) && eliminate_empty_if_else_b()) && eliminate_empty_else_b()) && flatten_matching_ternary_b()) && flatten_expr_without_side_effects_b()) && eliminate_no_op_arithmetic_b()) && flatten_switch_b() ? colorGreen : colorRed; 65} 66