-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #114672 - lenawanel:master, r=compiler-errors
make `typeid::typeid_itanium_cxx_abi::transform_ty` evaluate length in array types the ICE in #114275 was caused by `transform_ty` in compiler/rustc_symbol_mangling/src/typeid/typeid_itanium_cxx_abi.rs encountering an unevaluated const, while expecting it to already be evaluated.
- Loading branch information
Showing
2 changed files
with
17 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
tests/ui/sanitize/issue-114275-cfi-const-expr-in-arry-len.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 {} | ||
} |