Skip to content

ICE: "unrecognized representation hint" with -Z unpretty=everybody_loops #83921

Closed
@matthiaskrgr

Description

@matthiaskrgr

Code

code from ./src/test/ui/error-codes/E0565.rs

// repr currently doesn't support literals
#[repr("C")] //~ ERROR E0565
struct A {}

fn main() {}

Meta

rustc --version --verbose:

ersion --verbose
rustc 1.53.0-nightly (a6e7a5aa5 2021-04-06)
binary: rustc
commit-hash: a6e7a5aa5dc842ddb64607040aefb6ec33e22b59
commit-date: 2021-04-06
host: x86_64-unknown-linux-gnu
release: 1.53.0-nightly
LLVM version: 12.0.0

Error output

rustc ./src/test/ui/error-codes/E0565.rs -Zunpretty=everybody_loops

#![feature(prelude_import)]
#![no_std]
#[prelude_import]
use ::std::prelude::rust_2015::*;
#[macro_use]
extern crate std;
// repr currently doesn't support literals
//~ ERROR E0565
#[repr("C")]
struct A {
}

fn main() { loop  { } }
error: internal compiler error: unrecognized representation hint
 --> ./src/test/ui/error-codes/E0565.rs:2:8
  |
2 | #[repr("C")] //~ ERROR E0565
  |        ^^^
  |
  = note: delayed at compiler/rustc_attr/src/builtin.rs:940:32

thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', compiler/rustc_errors/src/lib.rs:1018:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.53.0-nightly (a6e7a5aa5 2021-04-06) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z unpretty=everybody_loops

query stack during panic:
end of query stack
Backtrace

#![feature(prelude_import)]
#![no_std]
#[prelude_import]
use ::std::prelude::rust_2015::*;
#[macro_use]
extern crate std;
// repr currently doesn't support literals
//~ ERROR E0565
#[repr("C")]
struct A {
}

fn main() { loop  { } }
error: internal compiler error: unrecognized representation hint
 --> ./src/test/ui/error-codes/E0565.rs:2:8
  |
2 | #[repr("C")] //~ ERROR E0565
  |        ^^^
  |
  = note: delayed at compiler/rustc_attr/src/builtin.rs:940:32

thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', compiler/rustc_errors/src/lib.rs:1018:13
stack backtrace:
   0:     0x7f2eb2deae40 - std::backtrace_rs::backtrace::libunwind::trace::h247d9dc800afe0ad
                               at /rustc/a6e7a5aa5dc842ddb64607040aefb6ec33e22b59/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x7f2eb2deae40 - std::backtrace_rs::backtrace::trace_unsynchronized::hacfbdd0bca73e3f8
                               at /rustc/a6e7a5aa5dc842ddb64607040aefb6ec33e22b59/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f2eb2deae40 - std::sys_common::backtrace::_print_fmt::h1ac8daa5000ee24c
                               at /rustc/a6e7a5aa5dc842ddb64607040aefb6ec33e22b59/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x7f2eb2deae40 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h22a8e55d2cc5363a
                               at /rustc/a6e7a5aa5dc842ddb64607040aefb6ec33e22b59/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x7f2eb2e5c0cf - core::fmt::write::h7aa6cd0067dca82a
                               at /rustc/a6e7a5aa5dc842ddb64607040aefb6ec33e22b59/library/core/src/fmt/mod.rs:1094:17
   5:     0x7f2eb2ddf665 - std::io::Write::write_fmt::h441a47830651073b
                               at /rustc/a6e7a5aa5dc842ddb64607040aefb6ec33e22b59/library/std/src/io/mod.rs:1580:15
   6:     0x7f2eb2deea2b - std::sys_common::backtrace::_print::hd1e0ee1c195f9f05
                               at /rustc/a6e7a5aa5dc842ddb64607040aefb6ec33e22b59/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x7f2eb2deea2b - std::sys_common::backtrace::print::h7d1098def5c25d20
                               at /rustc/a6e7a5aa5dc842ddb64607040aefb6ec33e22b59/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x7f2eb2deea2b - std::panicking::default_hook::{{closure}}::h91d9c6c7644bd601
                               at /rustc/a6e7a5aa5dc842ddb64607040aefb6ec33e22b59/library/std/src/panicking.rs:208:50
   9:     0x7f2eb2dee50d - std::panicking::default_hook::h82c79ca49716b79d
                               at /rustc/a6e7a5aa5dc842ddb64607040aefb6ec33e22b59/library/std/src/panicking.rs:225:9
  10:     0x7f2eb35ad5cd - rustc_driver::report_ice::h789c836b3ca96936
  11:     0x7f2eb2def140 - std::panicking::rust_panic_with_hook::h6df253a3c973d6b6
                               at /rustc/a6e7a5aa5dc842ddb64607040aefb6ec33e22b59/library/std/src/panicking.rs:595:17
  12:     0x7f2eb2deed17 - std::panicking::begin_panic_handler::{{closure}}::h51c9af41e9c97cc6
                               at /rustc/a6e7a5aa5dc842ddb64607040aefb6ec33e22b59/library/std/src/panicking.rs:497:13
  13:     0x7f2eb2deb2fc - std::sys_common::backtrace::__rust_end_short_backtrace::hd0852041c80b5b69
                               at /rustc/a6e7a5aa5dc842ddb64607040aefb6ec33e22b59/library/std/src/sys_common/backtrace.rs:141:18
  14:     0x7f2eb2deec79 - rust_begin_unwind
                               at /rustc/a6e7a5aa5dc842ddb64607040aefb6ec33e22b59/library/std/src/panicking.rs:493:5
  15:     0x7f2eb2dbab8b - std::panicking::begin_panic_fmt::hf021b7eb1c320697
                               at /rustc/a6e7a5aa5dc842ddb64607040aefb6ec33e22b59/library/std/src/panicking.rs:435:5
  16:     0x7f2eb59a65e9 - rustc_errors::HandlerInner::flush_delayed::h531ebda4b1f3d900
  17:     0x7f2eb59a50db - <rustc_errors::HandlerInner as core::ops::drop::Drop>::drop::hd5e77d3e1700e943
  18:     0x7f2eb5034b46 - core::ptr::drop_in_place<rustc_session::parse::ParseSess>::h90534a14153a636b
  19:     0x7f2eb5043321 - <alloc::rc::Rc<T> as core::ops::drop::Drop>::drop::h1a6c5c7afd45fcda
  20:     0x7f2eb502987d - core::ptr::drop_in_place<rustc_interface::interface::Compiler>::h3e478528bd25ba4d
  21:     0x7f2eb502917d - rustc_span::with_source_map::h2f9fa3eb2c7b929c
  22:     0x7f2eb502afd1 - rustc_interface::interface::create_compiler_and_run::h0c4039163bd8e639
  23:     0x7f2eb50445f8 - scoped_tls::ScopedKey<T>::set::h18a522fe20c4c73e
  24:     0x7f2eb5044b13 - std::sys_common::backtrace::__rust_begin_short_backtrace::hc0e77be83f3caae1
  25:     0x7f2eb5048445 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h5636f2edf84a949d
  26:     0x7f2eb2dff053 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hf267842376a050e1
                               at /rustc/a6e7a5aa5dc842ddb64607040aefb6ec33e22b59/library/alloc/src/boxed.rs:1546:9
  27:     0x7f2eb2dff053 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hd7e4f6dae6e5e664
                               at /rustc/a6e7a5aa5dc842ddb64607040aefb6ec33e22b59/library/alloc/src/boxed.rs:1546:9
  28:     0x7f2eb2dff053 - std::sys::unix::thread::Thread::new::thread_start::h9609bf93d713fb73
                               at /rustc/a6e7a5aa5dc842ddb64607040aefb6ec33e22b59/library/std/src/sys/unix/thread.rs:71:17
  29:     0x7f2eb2d0f299 - start_thread
  30:     0x7f2eb2c24053 - clone
  31:                0x0 - <unknown>

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.53.0-nightly (a6e7a5aa5 2021-04-06) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z unpretty=everybody_loops

query stack during panic:
end of query stack

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions