blob: 6866579cb94308e4b406a088618a6383781d1bf4 [file] [log] [blame]
SKIP: FAILED
#include <metal_stdlib>
using namespace metal;
threadgroup float2x2 S;
float2 func(threadgroup float2* const pointer) {
return pointer;
}
kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]]) {
if ((tint_local_index == 0u)) {
S = float2x2(float2(0.0f), float2(0.0f));
}
threadgroup_barrier(mem_flags::mem_threadgroup);
float2 const r = func(S[1]);
}
program_source:4:22: error: program scope variable must reside in constant address space
threadgroup float2x2 S;
^
program_source:6:10: error: cannot initialize return object of type 'float2' (vector of 2 'float' values) with an lvalue of type 'threadgroup float2 *const'
return pointer;
^~~~~~~
program_source:9:25: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
if ((tint_local_index == 0u)) {
~~~~~~~~~~~~~~~~~^~~~~
program_source:9:25: note: remove extraneous parentheses around the comparison to silence this warning
if ((tint_local_index == 0u)) {
~ ^ ~
program_source:9:25: note: use '=' to turn this equality comparison into an assignment
if ((tint_local_index == 0u)) {
^~
=
program_source:13:16: warning: unused variable 'r' [-Wunused-variable]
float2 const r = func(S[1]);
^