blob: 644f07b09cf0a655b037d0ed8fcb1b77876817d6 [file] [log] [blame]
SKIP: FAILED
#include <metal_stdlib>
using namespace metal;
threadgroup int a;
threadgroup int b;
void foo() {
{
int i = 0;
while(true) {
int const v = i;
threadgroup_barrier(mem_flags::mem_threadgroup);
int const v_1 = a;
threadgroup_barrier(mem_flags::mem_threadgroup);
if ((v < v_1)) {
} else {
break;
}
threadgroup_barrier(mem_flags::mem_threadgroup);
int const v_2 = b;
threadgroup_barrier(mem_flags::mem_threadgroup);
i = (i + v_2);
continue;
}
}
}
program_source:4:17: error: program scope variable must reside in constant address space
threadgroup int a;
^
program_source:5:17: error: program scope variable must reside in constant address space
threadgroup int b;
^