Skip to content

Commit d42ae60

Browse files
committed
const folding: compiletest div by 0 causes ICE
1 parent d6913d8 commit d42ae60

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// build-pass
2+
3+
#![allow(unconditional_panic)]
4+
5+
use spirv_std::spirv;
6+
7+
#[spirv(fragment)]
8+
pub fn const_fold_div(
9+
#[spirv(descriptor_set = 0, binding = 0, storage_buffer)] buffer: &u8,
10+
out: &mut u8,
11+
) {
12+
*out = 7 / 0;
13+
}

0 commit comments

Comments
 (0)