blob: bc66999168386e7cbfa8a9114af8e89feee50ae0 [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
struct S {
int x;
};
void deref() {
S a = {};
thread S* const p = (&a);
int b = (*p).x;
(*p).x = 42;
}
void no_deref() {
S a = {};
thread S* const p = (&a);
int b = (*p).x;
(*p).x = 42;
}
kernel void v() {
deref();
no_deref();
}