-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed as duplicate of#144755
Closed as duplicate of#144755
Copy link
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-explicit_tail_calls`#![feature(explicit_tail_calls)]``#![feature(explicit_tail_calls)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️requires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.
Description
I tried this code:
struct Struct;
fn foo<T: ?Sized>(t: &T) -> usize {
become bar(t);
}
#[track_caller]
fn bar<T: ?Sized>(_: &T) -> usize {
456
}
fn main() {
assert_eq!(foo(&Struct), 456);
}
I expected to see: Not sure actually.
Instead, LLVM's opt --passes=verify
fails b/c we're performing a tail call with an incompatible signature.
Meta
rustc --version --verbose
:
whatever is nightly on august 12, 2025
Not really an ICE per se, but a llvm bug. It doesn't show up on nightly b/c llvm is not built with debug assertions, I think, but it does show up when you pass the generated llvm to opt
. I did this in alive2.
I think we need to rework how tail calls handle both pre-mono and post-mono #[track_caller]
:3
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-explicit_tail_calls`#![feature(explicit_tail_calls)]``#![feature(explicit_tail_calls)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️requires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.