blob: e1f46e9e2ff6b1efe79e348913dec6bbf1f5af3d [file] [log] [blame]
SKIP: FAILED
#include <metal_stdlib>
using namespace metal;
threadgroup int v;
kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]]) {
if ((tint_local_index == 0u)) {
v = 0;
}
threadgroup_barrier(mem_flags::mem_threadgroup);
int const i = v;
}
program_source:4:17: error: program scope variable must reside in constant address space
threadgroup int v;
^
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:10:13: warning: unused variable 'i' [-Wunused-variable]
int const i = v;
^