blob: 37f69a0900d763aec273eec09815295e227e3aa5 [file] [log] [blame]
SKIP: FAILED
#include <metal_stdlib>
using namespace metal;
thread float v = 0.0f;
void x(thread float* const p) {
p = 0.0f;
}
void g() {
x(v);
}
fragment void f() {
g();
}
program_source:4:14: error: program scope variable must reside in constant address space
thread float v = 0.0f;
^
program_source:6:5: error: cannot assign to variable 'p' with const-qualified type 'float *const'
p = 0.0f;
~ ^
program_source:5:28: note: variable 'p' declared const here
void x(thread float* const p) {
~~~~~~~~~~~~~~~~~~~~^