-
Notifications
You must be signed in to change notification settings - Fork 13.4k
ICE: feat(generic_const_exprs) + debug assertions #104040
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
F-generic_const_exprs
`#![feature(generic_const_exprs)]`
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
requires-debug-assertions
This issue requires a build of rustc or tooling with debug-assertions in some way
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
|
another example: #![crate_type = "lib"]
#![feature(portable_simd)]
use std::simd::Simd;
const N: usize = 8;
#[no_mangle]
// CHECK-LABEL: @wider_reduce_into_iter
pub fn wider_reduce_into_iter(x: Simd<u8, N>) -> u16 {
// CHECK: zext <8 x i8>
// CHECK-SAME: to <8 x i16>
// CHECK: call i16 @llvm.vector.reduce.add.v8i16(<8 x i16>
x.to_array().into_iter().map(u16::from).sum()
} |
another one // run-pass
#![allow(dead_code)]
fn foo<T>(t: T) -> impl Into<[T; { const FOO: usize = 1; FOO }]> {
[t]
}
fn bar() -> impl Into<[u8; { const FOO: usize = 1; FOO }]> {
[99]
}
fn main() {
println!("{:?}", foo(42).into());
println!("{:?}", bar().into());
} |
None of these seem to crash anymore, probably fixed by #105561 🎉 |
Which example should I choose to add as a regression test ? |
@rustbot claim Also put this in my to-do list. |
@rustbot release-assignment I think the tests were already added in the PR. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
F-generic_const_exprs
`#![feature(generic_const_exprs)]`
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
requires-debug-assertions
This issue requires a build of rustc or tooling with debug-assertions in some way
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Uh oh!
There was an error while loading. Please reload this page.
Code
Needs rust built with debug assertions!
Meta
rustc --version --verbose
:Error output
rustc ./102124.rs "-Zcrate-attr=feature(generic_const_exprs)" -Zunstable-options
Backtrace
The text was updated successfully, but these errors were encountered: