-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
ICE when returning an repr(i8) enum from an extern c function #80556
Labels
A-codegen
Area: Code generation
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
P-medium
Medium priority
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
GabeRealB
added
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Dec 31, 2020
jonas-schievink
added
A-codegen
Area: Code generation
I-prioritize
Issue: Indicates that prioritization has been requested for this issue.
labels
Dec 31, 2020
@rustbot modify labels: +regression-from-stable-to-stable |
rustbot
added
the
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
label
Dec 31, 2020
#![crate_type="rlib"]
#[repr(i8)]
pub enum Type {
Type1 = 0,
Type2 = 1
}
pub extern "C" fn test() -> Type {
Type::Type1
} More minimal reproducer. Does not occur with just 1 variant. Or if one of the variants has a negative discriminant. Affects most targets if not all of them, despite the failure seemingly occurring inside the target-specific code. |
Assigning P-medium as discussed as part of the Prioritization Working Group procedure and removing I-prioritize. |
rylev
added
P-medium
Medium priority
and removed
I-prioritize
Issue: Indicates that prioritization has been requested for this issue.
labels
Jan 4, 2021
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this issue
Jan 30, 2021
…=eddyb Consider Scalar to be a bool only if its unsigned This seems right, given that conceptually bools are unsigned, but the implications of this change may have more action at distance that I'm not sure how to exhaustively consider. For instance there are a number of cases where code attaches range metadata if `scalar.is_bool()` holds. Supposedly it would no longer be attached to the `repr(i8)` enums? Though I'm not sure why booleans are being special-cased here in the first place... Fixes rust-lang#80556 cc `@eddyb`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-codegen
Area: Code generation
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
P-medium
Medium priority
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: