Skip to content

ICE: compiler/rustc_typeck/src/collect.rs:1777:13: unexpected sort of node in fn_sig() #83475

@chengniansun

Description

@chengniansun

Code

#![feature(cmse_nonsecure_entry)]
#[cmse_nonsecure_entry]
struct XEmpty2;

Meta

rustc --version --verbose:

rustc 1.53.0-nightly (07e0e2ec2 2021-03-24)
binary: rustc
commit-hash: 07e0e2ec268c140e607e1ac7f49f145612d0f597
commit-date: 2021-03-24
host: x86_64-unknown-linux-gnu
release: 1.53.0-nightly
LLVM version: 12.0.0

Error output

error: internal compiler error: compiler/rustc_typeck/src/collect.rs:1777:13: unexpected sort of node in fn_sig(): Item(Item { ident: XEmpty2#0, def_id: DefId(0:3 ~ perses_node_priority_with_dfs_delta_reduced_mutant[8787]::XEmpty2), kind: Struct(Unit(HirId { owner: DefId(0:3 ~ perses_node_priority_with_dfs_delta_reduced_mutant[8787]::XEmpty2), local_id: 1 }), Generics { params: [], where_clause: WhereClause { predicates: [], span: perses_node_priority_with_dfs_delta_reduced_mutant.rs:3:15: 3:15 (#0) }, span: perses_node_priority_with_dfs_delta_reduced_mutant.rs:3:15: 3:15 (#0) }), vis: Spanned { node: Inherited, span: perses_node_priority_with_dfs_delta_reduced_mutant.rs:3:1: 3:1 (#0) }, span: perses_node_priority_with_dfs_delta_reduced_mutant.rs:3:1: 3:16 (#0) })

thread 'rustc' panicked at 'Box<Any>', /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/panic.rs:59:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

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 (07e0e2ec2 2021-03-24) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type staticlib

query stack during panic:
#0 [fn_sig] computing function signature of `XEmpty2`
#1 [codegen_fn_attrs] computing codegen attributes of `XEmpty2`
end of query stack
error: aborting due to previous error

Backtrace

error: internal compiler error: compiler/rustc_typeck/src/collect.rs:1777:13: unexpected sort of node in fn_sig(): Item(Item { ident: XEmpty2#0, def_id: DefId(0:3 ~ perses_node_priority_with_dfs_delta_reduced_mutant[8787]::XEmpty2), kind: Struct(Unit(HirId { owner: DefId(0:3 ~ perses_node_priority_with_dfs_delta_reduced_mutant[8787]::XEmpty2), local_id: 1 }), Generics { params: [], where_clause: WhereClause { predicates: [], span: perses_node_priority_with_dfs_delta_reduced_mutant.rs:3:15: 3:15 (#0) }, span: perses_node_priority_with_dfs_delta_reduced_mutant.rs:3:15: 3:15 (#0) }), vis: Spanned { node: Inherited, span: perses_node_priority_with_dfs_delta_reduced_mutant.rs:3:1: 3:1 (#0) }, span: perses_node_priority_with_dfs_delta_reduced_mutant.rs:3:1: 3:16 (#0) })

thread 'rustc' panicked at 'Box<Any>', /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/panic.rs:59:5
stack backtrace:
   0: std::panicking::begin_panic
   1: std::panic::panic_any
   2: rustc_errors::HandlerInner::bug
   3: rustc_errors::Handler::bug
   4: rustc_middle::ty::context::tls::with_opt
   5: rustc_middle::util::bug::opt_span_bug_fmt
   6: rustc_middle::util::bug::bug_fmt
   7: rustc_typeck::collect::fn_sig
   8: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
   9: rustc_data_structures::stack::ensure_sufficient_stack
  10: rustc_query_system::query::plumbing::force_query_with_job
  11: rustc_query_system::query::plumbing::get_query_impl
  12: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::fn_sig
  13: rustc_typeck::collect::codegen_fn_attrs
  14: rustc_query_impl::<impl rustc_query_system::query::config::QueryAccessors<rustc_query_impl::plumbing::QueryCtxt> for rustc_query_impl::queries::codegen_fn_attrs>::compute
  15: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  16: rustc_data_structures::stack::ensure_sufficient_stack
  17: rustc_query_system::query::plumbing::force_query_with_job
  18: rustc_query_system::query::plumbing::get_query_impl
  19: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::codegen_fn_attrs
  20: rustc_passes::dead::has_allow_dead_code_or_lang_attr
  21: <rustc_passes::dead::LifeSeeder as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item
  22: rustc_hir::hir::Crate::visit_all_item_likes
  23: rustc_passes::dead::check_crate
  24: std::panic::catch_unwind
  25: rustc_session::utils::<impl rustc_session::session::Session>::time
  26: rustc_interface::passes::analysis
  27: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  28: rustc_data_structures::stack::ensure_sufficient_stack
  29: rustc_query_system::query::plumbing::force_query_with_job
  30: rustc_query_system::query::plumbing::get_query_impl
  31: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
  32: rustc_interface::passes::QueryContext::enter
  33: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  34: rustc_span::with_source_map
  35: rustc_interface::interface::create_compiler_and_run
  36: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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 (07e0e2ec2 2021-03-24) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type staticlib

query stack during panic:
#0 [fn_sig] computing function signature of `XEmpty2`
#1 [codegen_fn_attrs] computing codegen attributes of `XEmpty2`
#2 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to previous error

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.F-cmse_nonsecure_entry`#![feature(cmse_nonsecure_entry)]`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