1#include <metal_stdlib> 2#include <simd/simd.h> 3using namespace metal; 4struct S { 5 int i; 6}; 7struct Uniforms { 8 half4 colorGreen; 9 half4 colorRed; 10}; 11struct Inputs { 12}; 13struct Outputs { 14 half4 sk_FragColor [[color(0)]]; 15}; 16struct Globals { 17 int glob; 18}; 19bool block_variable_hides_global_variable_b(thread Globals& _globals) { 20 return _globals.glob == 2; 21} 22bool local_variable_hides_struct_b() { 23 bool S = true; 24 return S; 25} 26bool local_struct_variable_hides_struct_type_b() { 27 S S = S{1}; 28 return S.i == 1; 29} 30bool local_variable_hides_global_variable_b() { 31 int glob = 1; 32 return glob == 1; 33} 34fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { 35 Globals _globals{{}}; 36 (void)_globals; 37 Outputs _out; 38 (void)_out; 39 _globals.glob = 2; 40 bool _0_var = true; 41 _out.sk_FragColor = (((_0_var && block_variable_hides_global_variable_b(_globals)) && local_variable_hides_struct_b()) && local_struct_variable_hides_struct_type_b()) && local_variable_hides_global_variable_b() ? _uniforms.colorGreen : _uniforms.colorRed; 42 return _out; 43} 44