Skip to content
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 Trying to create type name for unexpected type - in simple RTIC 2.0 app for rp2040 (pico board) #112804

Closed
s7rul opened this issue Jun 19, 2023 · 2 comments
Labels
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.

Comments

@s7rul
Copy link

s7rul commented Jun 19, 2023

Code

https://github.com/s7rul/rp2040-rtfmt

#![no_main]
#![no_std]
#![feature(type_alias_impl_trait)]


#[rtic::app(
    device = rp_pico::hal::pac,
)]
mod app {

    use panic_probe as _;
    #[shared]
    struct Shared {}

    #[local]
    struct Local {}

    #[init(local=[
    ])]
    fn init(mut ctx: init::Context) -> (Shared, Local) {
        (Shared {}, Local { })
    }

    #[task()]
    async fn heartbeat(ctx: heartbeat::Context) {
    }
}

Meta

rustc --version --verbose:

rustc 1.72.0-nightly (2d0aa5768 2023-06-18)
binary: rustc
commit-hash: 2d0aa57684e10f7b3d3fe740ee18d431181583ad
commit-date: 2023-06-18
host: x86_64-unknown-linux-gnu
release: 1.72.0-nightly
LLVM version: 16.0.5

Error output

error: internal compiler error: compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs:426:13: debuginfo: Trying to create type name for unexpected type: app::__rtic_internal_heartbeat_
Backtrace

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/2d0aa57684e10f7b3d3fe740ee18d431181583ad/compiler/rustc_errors/src/lib.rs:1650:9
stack backtrace:
   0: std::panicking::begin_panic::<rustc_errors::ExplicitBug>
   1: <rustc_errors::HandlerInner>::bug::<alloc::string::String>
   2: <rustc_errors::Handler>::bug::<alloc::string::String>
   3: rustc_middle::util::bug::opt_span_bug_fmt::<rustc_span::span_encoding::Span>::{closure#0}
   4: rustc_middle::ty::context::tls::with_opt::<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}
   5: rustc_middle::ty::context::tls::with_context_opt::<rustc_middle::ty::context::tls::with_opt<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
   6: rustc_middle::util::bug::bug_fmt
   7: rustc_codegen_ssa::debuginfo::type_names::push_debuginfo_type_name
   8: rustc_codegen_ssa::debuginfo::type_names::push_generic_params_internal
   9: rustc_codegen_llvm::debuginfo::metadata::type_di_node
  10: rustc_codegen_llvm::debuginfo::metadata::build_global_var_di_node
  11: <rustc_codegen_llvm::context::CodegenCx as rustc_codegen_ssa::traits::statics::StaticMethods>::codegen_static
  12: rustc_codegen_llvm::base::compile_codegen_unit::module_codegen
  13: rustc_codegen_llvm::base::compile_codegen_unit
  14: rustc_codegen_ssa::base::codegen_crate::<rustc_codegen_llvm::LlvmCodegenBackend>
  15: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
  16: <rustc_session::session::Session>::time::<alloc::boxed::Box<dyn core::any::Any>, rustc_interface::passes::start_codegen::{closure#0}>
  17: rustc_interface::passes::start_codegen
  18: <rustc_middle::ty::context::GlobalCtxt>::enter::<<rustc_interface::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core::result::Result<alloc::boxed::Box<dyn core::any::Any>, rustc_span::ErrorGuaranteed>>
  19: <rustc_interface::queries::Queries>::ongoing_codegen
  20: <rustc_interface::interface::Compiler>::enter::<rustc_driver_impl::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_span::ErrorGuaranteed>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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.72.0-nightly (2d0aa5768 2023-06-18) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type bin -C opt-level=s -C embed-bitcode=no -C codegen-units=1 -C debuginfo=2 -C debug-assertions=on -C linker=flip-link -C link-arg=-Tlink.x -C link-arg=-Tdefmt.x -C link-arg=--nmagic

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack

@s7rul s7rul 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 Jun 19, 2023
@s7rul s7rul changed the title Error on simple RTIC 2.0 app for rp2040 (pico board) internal compiler Error on simple RTIC 2.0 app for rp2040 (pico board) Jun 19, 2023
@s7rul s7rul changed the title internal compiler Error on simple RTIC 2.0 app for rp2040 (pico board) ICE Trying to create type name for unexpected type - in simple RTIC 2.0 app for rp2040 (pico board) Jun 19, 2023
@compiler-errors
Copy link
Member

Probably fixed by #112777

@s7rul
Copy link
Author

s7rul commented Jun 20, 2023

Probably fixed by #112777

Yes it was!

@s7rul s7rul closed this as completed Jun 20, 2023
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. 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.
Projects
None yet
Development

No branches or pull requests

2 participants