SKIP: INVALID


enable subgroups;

@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;

fn subgroupExclusiveMul_a23002() -> i32 {
  var res : i32 = subgroupExclusiveMul(1i);
  return res;
}

@fragment
fn fragment_main() {
  prevent_dce = subgroupExclusiveMul_a23002();
}

@compute @workgroup_size(1)
fn compute_main() {
  prevent_dce = subgroupExclusiveMul_a23002();
}

Failed to generate: <dawn>/test/tint/builtins/gen/literal/subgroupExclusiveMul/a23002.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
enable subgroups;
       ^^^^^^^^^


enable subgroups;

@group(0) @binding(0) var<storage, read_write> prevent_dce : i32;

fn subgroupExclusiveMul_a23002() -> i32 {
  var res : i32 = subgroupExclusiveMul(1i);
  return res;
}

@fragment
fn fragment_main() {
  prevent_dce = subgroupExclusiveMul_a23002();
}

@compute @workgroup_size(1)
fn compute_main() {
  prevent_dce = subgroupExclusiveMul_a23002();
}

Failed to generate: <dawn>/test/tint/builtins/gen/literal/subgroupExclusiveMul/a23002.wgsl:41:8 error: GLSL backend does not support extension 'subgroups'
enable subgroups;
       ^^^^^^^^^


tint executable returned error: exit status 1
