blob: 9fad9aa6d2fd6fa822980c975a5b5916a26015a6 [file] [log] [blame] [edit]
fn deref() {
var a : vec3<i32>;
let p = &(a);
(*(p))[0] += 42;
}
fn no_deref() {
var a : vec3<i32>;
let p = &(a);
p[0] += 42;
}
fn deref_inc() {
var a : vec3<i32>;
let p = &(a);
(*(p))[0]++;
}
fn no_deref_inc() {
var a : vec3<i32>;
let p = &(a);
p[0]++;
}
@compute @workgroup_size(1)
fn main() {
deref();
no_deref();
deref_inc();
no_deref_inc();
}