SKIP: FAILED

../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: buf0 = struct @align(4) {
  zero:i32 @offset(0)
}

Array = struct @align(4) {
  values:array<i32, 2> @offset(0)
}

main_out = struct @align(16) {
  x_GLF_color_1:vec4<f32> @offset(0), @location(0)
}

$B1: {  # root
  %x_8:ptr<uniform, buf0, read> = var @binding_point(0, 0)
  %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
}

%main_1 = func():void {
  $B2: {
    %x_50:ptr<function, bool, read_write> = var, false
    %x_15:ptr<function, i32, read_write> = var
    %x_16:ptr<function, i32, read_write> = var
    %param:ptr<function, Array, read_write> = var
    %x_19:ptr<function, i32, read_write> = var
    %x_20:ptr<function, i32, read_write> = var
    store %param, Array(array<i32, 2>(0i))
    store %x_50, false
    loop [b: $B3] {  # loop_1
      $B3: {  # body
        %x_63:ptr<function, bool, read_write> = var
        loop [b: $B4] {  # loop_2
          $B4: {  # body
            %11:ptr<uniform, i32, read> = access %x_8, 0u
            %12:i32 = load %11
            %13:ptr<function, i32, read_write> = access %param, 0u, %12
            %14:i32 = load %13
            %15:bool = eq %14, 1i
            if %15 [t: $B5] {  # if_1
              $B5: {  # true
                store %x_50, true
                store %x_15, 1i
                store %x_19, 1i
                store %x_63, true
                exit_loop  # loop_2
              }
            }
            store %x_19, 0i
            store %x_63, false
            exit_loop  # loop_2
          }
        }
        %16:i32 = load %x_19
        store %x_20, %16
        %17:bool = load %x_63
        if %17 [t: $B6] {  # if_2
          $B6: {  # true
            exit_loop  # loop_1
          }
        }
        store %x_50, true
        store %x_15, 1i
        store %x_20, 1i
        exit_loop  # loop_1
      }
    }
    %18:i32 = load %x_20
    store %x_16, %18
    %19:i32 = load %x_20
    %20:bool = eq %19, 1i
    if %20 [t: $B7, f: $B8] {  # if_3
      $B7: {  # true
        store %x_GLF_color, vec4<f32>(1.0f, 0.0f, 0.0f, 1.0f)
        exit_if  # if_3
      }
      $B8: {  # false
        store %x_GLF_color, vec4<f32>(0.0f)
        exit_if  # if_3
      }
    }
    ret
  }
}
%tint_symbol = @fragment func():main_out {
  $B9: {
    %22:void = call %main_1
    %23:vec4<f32> = load %x_GLF_color
    %24:main_out = construct %23
    ret %24
  }
}
%func_struct_Array_i1_2_1_ = func(%a:ptr<function, Array, read_write>):i32 {
  $B10: {
    %x_70:ptr<function, bool, read_write> = var, false
    %x_12:ptr<function, i32, read_write> = var
    %x_72:ptr<function, bool, read_write> = var
    %x_13:ptr<function, i32, read_write> = var
    %x_14:ptr<function, i32, read_write> = var
    store %x_72, false
    loop [b: $B11] {  # loop_3
      $B11: {  # body
        %x_77:ptr<function, bool, read_write> = var
        %x_87:ptr<function, bool, read_write> = var
        %34:bool = load %x_72
        store %x_77, %34
        loop [b: $B12] {  # loop_4
          $B12: {  # body
            %35:ptr<uniform, i32, read> = access %x_8, 0u
            %36:i32 = load %35
            %37:ptr<function, i32, read_write> = access %a, 0u, %36
            %38:i32 = load %37
            %39:bool = eq %38, 1i
            if %39 [t: $B13] {  # if_4
              $B13: {  # true
                store %x_70, true
                store %x_12, 1i
                store %x_13, 1i
                store %x_87, true
                exit_loop  # loop_4
              }
            }
            store %x_13, 0i
            %40:bool = load %x_77
            store %x_87, %40
            exit_loop  # loop_4
          }
        }
        %41:i32 = load %x_13
        store %x_14, %41
        %42:bool = load %x_87
        if %42 [t: $B14] {  # if_5
          $B14: {  # true
            exit_loop  # loop_3
          }
        }
        store %x_70, true
        store %x_12, 1i
        store %x_14, 1i
        exit_loop  # loop_3
      }
    }
    %43:i32 = load %x_14
    ret %43
  }
}

unhandled variable address space
********************************************************************
*  The tint shader compiler has encountered an unexpected error.   *
*                                                                  *
*  Please help us fix this issue by submitting a bug report at     *
*  crbug.com/tint with the source program that triggered the bug.  *
********************************************************************
