summaryrefslogtreecommitdiffstats
path: root/tests/ui/sanitize/issue-114275-cfi-const-expr-in-arry-len.rs
blob: 8f870be13725f5545a74de1a38e8d712491d3de4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Regression test for issue 114275 `typeid::typeid_itanium_cxx_abi::transform_ty`
// was expecting array type lengths to be evaluated, this was causing an ICE.
//
// build-pass
// compile-flags: -Ccodegen-units=1 -Clto -Zsanitizer=cfi -Ctarget-feature=-crt-static
// needs-sanitizer-cfi

#![crate_type = "lib"]

#[repr(transparent)]
pub struct Array([u8; 1 * 1]);

pub extern "C" fn array() -> Array {
    loop {}
}