-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Description
The following code causes an ICE on current master (ac5cd3b):
#![feature(i128_type)]
#[repr(C)]
struct Foo(i128);
#[link(name = "test", kind = "static")]
extern "C" {
fn foo(f: Foo) -> Foo;
}
fn main() {
unsafe {
foo(Foo(1));
}
}
ICE message:
error: internal compiler error: src/librustc_trans/cabi_x86_64.rs:321: llregtype: unhandled class
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:423
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
kennytm commentedon May 4, 2017
Still ICE-ing but with a different stack trace.
Relevant line I guess (there is only one unwrap right?):
rust/src/librustc_trans/cabi_x86_64.rs
Line 246 in b16c7a2
eddyb commentedon Jan 12, 2018
This is very suspicious - that
unwrap
can't possibly fail - because it only runs whenin_mem
isfalse
but whencls
isErr
,in_mem
istrue
:rust/src/librustc_trans/cabi_x86_64.rs
Lines 215 to 216 in b16c7a2
Update tests
Allocate registers for i128
Rollup merge of rust-lang#47437 - eddyb:issue-38763, r=nagisa