Debian Codegraph @

gcc/testsuite/rust/compile/const5.rs

raw
1 // { dg-options "-w -O0 -fdump-tree-gimple" }
2 const A: usize = 123;
3 const B: [i32; 5] = [1, 2, 3, 4, 5];
4 const C: i32 = B[A];
5 // { dg-error "array subscript value .123. is outside the bounds of array" "" { target *-*-* } .-1 }