| SKIP: FAILED |
| |
| #include <metal_stdlib> |
| using namespace metal; |
| |
| thread int P = 0; |
| int func(thread int* const pointer) { |
| return pointer; |
| } |
| kernel void tint_symbol() { |
| int const r = func(P); |
| } |
| program_source:4:12: error: program scope variable must reside in constant address space |
| thread int P = 0; |
| ^ |
| program_source:6:10: error: cannot initialize return object of type 'int' with an lvalue of type 'int *const' |
| return pointer; |
| ^~~~~~~ |
| program_source:9:13: warning: unused variable 'r' [-Wunused-variable] |
| int const r = func(P); |
| ^ |
| |