blob: 5a6429dfe01d3451acb2091cf6a5b8f3f0d092dc [file] [log] [blame]
SKIP: FAILED
#include <metal_stdlib>
using namespace metal;
threadgroup int i;
kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]]) {
if ((tint_local_index == 0u)) {
i = 0;
}
threadgroup_barrier(mem_flags::mem_threadgroup);
i = 123;
threadgroup int* const p = i;
int const u = (p + 1);
}
program_source:4:17: error: program scope variable must reside in constant address space
threadgroup int i;
^
program_source:6:25: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
if ((tint_local_index == 0u)) {
~~~~~~~~~~~~~~~~~^~~~~
program_source:6:25: note: remove extraneous parentheses around the comparison to silence this warning
if ((tint_local_index == 0u)) {
~ ^ ~
program_source:6:25: note: use '=' to turn this equality comparison into an assignment
if ((tint_local_index == 0u)) {
^~
=
program_source:12:13: error: cannot initialize a variable of type 'const int' with an rvalue of type 'threadgroup int *'
int const u = (p + 1);
^ ~~~~~~~