forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
this ICE 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. add a regression test Update tests/ui/sanitize/issue-114275-cfi-const-expr-in-arry-len.rs Co-authored-by: Michael Goulet <michael@errs.io> Update tests/ui/sanitize/issue-114275-cfi-const-expr-in-arry-len.rs Co-authored-by: Michael Goulet <michael@errs.io>
- Loading branch information
1 parent
27a43f0
commit 6394d88
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 | ||
// needs-sanitizer-cfi | ||
|
||
#![crate_type = "lib"] | ||
|
||
#[repr(transparent)] | ||
pub struct Array([u8; 1 * 1]); | ||
|
||
pub extern "C" fn array() -> Array { | ||
loop {} | ||
} |