| SKIP: FAILED |
| |
| #include <metal_stdlib> |
| using namespace metal; |
| |
| thread int P = 0; |
| void func(thread int* const pointer) { |
| pointer = 42; |
| } |
| kernel void tint_symbol() { |
| func(P); |
| } |
| program_source:4:12: error: program scope variable must reside in constant address space |
| thread int P = 0; |
| ^ |
| program_source:6:11: error: cannot assign to variable 'pointer' with const-qualified type 'int *const' |
| pointer = 42; |
| ~~~~~~~ ^ |
| program_source:5:29: note: variable 'pointer' declared const here |
| void func(thread int* const pointer) { |
| ~~~~~~~~~~~~~~~~~~^~~~~~~ |
| |