Repository: rust
Issue: ICE: `Tried to make Ignore indirect`
Labels: I-ICE,T-compiler,C-bug,F-abi_x86_interrupt,A-hardware-interrupts

<!--
[31mICE[0m: Rustc ./a.rs '-Zcrate-attr=feature(abi_x86_interrupt) --crate-type=lib -ooutputfile -Zdump-mir-dir=dir' 'thread 'rustc' panicked at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/compiler/rustc_target/src/abi/call/mod.rs:642:18: 'Tried to make Ignore indirect'', 'thread 'rustc' panicked at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/compiler/rustc_target/src/abi/call/mod.rs:642:18: 'Tried to make Ignore indirect''
File: /tmp/im/a.rs
-->

snippet:
````rust
#![feature(abi_x86_interrupt)]
pub extern "x86-interrupt" fn f(_: ()) {}
````

Version information
````
rustc 1.81.0-nightly (9fdbfe144 2024-06-13)
binary: rustc
commit-hash: 9fdbfe1441a82e96e3f99ae199ff5348d8d948ae
commit-date: 2024-06-13
host: x86_64-unknown-linux-gnu
release: 1.81.0-nightly
LLVM version: 18.1.7

````

Command:
`/home/matthias/.rustup/toolchains/master/bin/rustc -Zcrate-attr=feature(abi_x86_interrupt) --crate-type=lib`

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary><strong>Program output</strong></summary>
<p>

```
warning: `extern` fn uses type `()`, which is not FFI-safe
 --> /tmp/icemaker_global_tempdir.U3AxWaVr0BIJ/rustc_testrunner_tmpdir_reporting.7BxpCsA7oZGV/mvce.rs:1:36
  |
1 | pub extern "x86-interrupt" fn f(_: ()) {}
  |                                    ^^ not FFI-safe
  |
  = help: consider using a struct instead
  = note: tuples have unspecified layout
  = note: `#[warn(improper_ctypes_definitions)]` on by default

thread 'rustc' panicked at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/compiler/rustc_target/src/abi/call/mod.rs:642:18:
Tried to make Ignore indirect
stack backtrace:
   0:     0x7f39d9c02ae5 - std::backtrace_rs::backtrace::libunwind::trace::ha3ab76cb43bb1368
                               at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
   1:     0x7f39d9c02ae5 - std::backtrace_rs::backtrace::trace_unsynchronized::hb5cc2b59767e67ec
                               at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f39d9c02ae5 - std::sys_common::backtrace::_print_fmt::h95a3a9c53c66bf04
                               at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x7f39d9c02ae5 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h8cfda73c2a92feb2
                               at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f39d9c5377b - core::fmt::rt::Argument::fmt::hf4ecd87cd25c64f9
                               at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/core/src/fmt/rt.rs:165:63
   5:     0x7f39d9c5377b - core::fmt::write::haa80a9c534e31eab
                               at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/core/src/fmt/mod.rs:1168:21
   6:     0x7f39d9bf776f - std::io::Write::write_fmt::hc1cd1cf89e04171f
                               at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/std/src/io/mod.rs:1835:15
   7:     0x7f39d9c028be - std::sys_common::backtrace::_print::hc54672ee9616fdc2
                               at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7f39d9c028be - std::sys_common::backtrace::print::hb162d5121355a056
                               at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7f39d9c052f9 - std::panicking::default_hook::{{closure}}::h304b290f864ea3b5
  10:     0x7f39d9c0509c - std::panicking::default_hook::hef815e37252f6fb2
                               at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/std/src/panicking.rs:292:9
  11:     0x7f39d64acf30 - std[b8312f6d1c472845]::panicking::update_hook::<alloc[8901845baeab31]::boxed::Box<rustc_driver_impl[9b7a6d874770339f]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x7f39d9c05bff - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h64eafb31c66a3499
                               at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/alloc/src/boxed.rs:2076:9
  13:     0x7f39d9c05bff - std::panicking::rust_panic_with_hook::h9b91adbd155bccf5
                               at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/std/src/panicking.rs:801:13
  14:     0x7f39d9c05827 - std::panicking::begin_panic_handler::{{closure}}::h124e547c3d93fe33
                               at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/std/src/panicking.rs:667:13
  15:     0x7f39d9c02fa9 - std::sys_common::backtrace::__rust_end_short_backtrace::hbfeb5575d442c950
                               at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/std/src/sys_common/backtrace.rs:171:18
  16:     0x7f39d9c054d4 - rust_begin_unwind
                               at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/std/src/panicking.rs:658:5
  17:     0x7f39d9c4fd33 - core::panicking::panic_fmt::hd67c6038fac3747e
                               at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/core/src/panicking.rs:74:14
  18:     0x7f39d70a5019 - <rustc_target[1e32b317d474ee2c]::abi::call::ArgAbi<rustc_middle[378d6b6a215ba68]::ty::Ty>>::make_indirect
  19:     0x7f39d5071296 - <rustc_target[1e32b317d474ee2c]::abi::call::ArgAbi<rustc_middle[378d6b6a215ba68]::ty::Ty>>::make_indirect_byval
  20:     0x7f39d7df9d2c - rustc_ty_utils[d029e7b8edb0b238]::abi::fn_abi_new_uncached
  21:     0x7f39d7defd90 - rustc_ty_utils[d029e7b8edb0b238]::abi::fn_abi_of_instance
  22:     0x7f39d7dee773 - rustc_query_impl[b42533e2e2de3919]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[b42533e2e2de3919]::query_impl::fn_abi_of_instance::dynamic_query::{closure#2}::{closure#0}, rustc_middle[378d6b6a215ba68]::query::erase::Erased<[u8; 16usize]>>
  23:     0x7f39d7dec6d5 - rustc_query_system[8978f5aeec6db06a]::query::plumbing::try_execute_query::<rustc_query_impl[b42533e2e2de3919]::DynamicConfig<rustc_query_system[8978f5aeec6db06a]::query::caches::DefaultCache<rustc_middle[378d6b6a215ba68]::ty::ParamEnvAnd<(rustc_middle[378d6b6a215ba68]::ty::instance::Instance, &rustc_middle[378d6b6a215ba68]::ty::list::RawList<(), rustc_middle[378d6b6a215ba68]::ty::Ty>)>, rustc_middle[378d6b6a215ba68]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[b42533e2e2de3919]::plumbing::QueryCtxt, false>
  24:     0x7f39d7dec32f - rustc_query_impl[b42533e2e2de3919]::query_impl::fn_abi_of_instance::get_query_non_incr::__rust_end_short_backtrace
  25:     0x7f39d4967ef3 - <rustc_codegen_llvm[6ff2e5818b83ab50]::context::CodegenCx as rustc_codegen_ssa[166d6457b2bb53a6]::traits::declare::PreDefineMethods>::predefine_fn
  26:     0x7f39d85636d9 - rustc_codegen_llvm[6ff2e5818b83ab50]::base::compile_codegen_unit::module_codegen
  27:     0x7f39d855fa3c - <rustc_codegen_llvm[6ff2e5818b83ab50]::LlvmCodegenBackend as rustc_codegen_ssa[166d6457b2bb53a6]::traits::backend::ExtraBackendMethods>::compile_codegen_unit
  28:     0x7f39d88179c1 - rustc_codegen_ssa[166d6457b2bb53a6]::base::codegen_crate::<rustc_codegen_llvm[6ff2e5818b83ab50]::LlvmCodegenBackend>
  29:     0x7f39d86d0482 - <rustc_codegen_llvm[6ff2e5818b83ab50]::LlvmCodegenBackend as rustc_codegen_ssa[166d6457b2bb53a6]::traits::backend::CodegenBackend>::codegen_crate
  30:     0x7f39d86cfe05 - rustc_interface[f64d9339fe208e7b]::passes::start_codegen
  31:     0x7f39d86cf49a - <rustc_interface[f64d9339fe208e7b]::queries::Queries>::codegen_and_build_linker
  32:     0x7f39d84cbcf2 - rustc_interface[f64d9339fe208e7b]::interface::run_compiler::<core[a215b071cb710c88]::result::Result<(), rustc_span[22f8cecf10eb8678]::ErrorGuaranteed>, rustc_driver_impl[9b7a6d874770339f]::run_compiler::{closure#0}>::{closure#1}
  33:     0x7f39d84ef5e7 - std[b8312f6d1c472845]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[f64d9339fe208e7b]::util::run_in_thread_with_globals<rustc_interface[f64d9339fe208e7b]::util::run_in_thread_pool_with_globals<rustc_interface[f64d9339fe208e7b]::interface::run_compiler<core[a215b071cb710c88]::result::Result<(), rustc_span[22f8cecf10eb8678]::ErrorGuaranteed>, rustc_driver_impl[9b7a6d874770339f]::run_compiler::{closure#0}>::{closure#1}, core[a215b071cb710c88]::result::Result<(), rustc_span[22f8cecf10eb8678]::ErrorGuaranteed>>::{closure#0}, core[a215b071cb710c88]::result::Result<(), rustc_span[22f8cecf10eb8678]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[a215b071cb710c88]::result::Result<(), rustc_span[22f8cecf10eb8678]::ErrorGuaranteed>>
  34:     0x7f39d84ef3aa - <<std[b8312f6d1c472845]::thread::Builder>::spawn_unchecked_<rustc_interface[f64d9339fe208e7b]::util::run_in_thread_with_globals<rustc_interface[f64d9339fe208e7b]::util::run_in_thread_pool_with_globals<rustc_interface[f64d9339fe208e7b]::interface::run_compiler<core[a215b071cb710c88]::result::Result<(), rustc_span[22f8cecf10eb8678]::ErrorGuaranteed>, rustc_driver_impl[9b7a6d874770339f]::run_compiler::{closure#0}>::{closure#1}, core[a215b071cb710c88]::result::Result<(), rustc_span[22f8cecf10eb8678]::ErrorGuaranteed>>::{closure#0}, core[a215b071cb710c88]::result::Result<(), rustc_span[22f8cecf10eb8678]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[a215b071cb710c88]::result::Result<(), rustc_span[22f8cecf10eb8678]::ErrorGuaranteed>>::{closure#2} as core[a215b071cb710c88]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  35:     0x7f39d9c0fa7b - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h38d1450b33cb88dc
                               at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/alloc/src/boxed.rs:2062:9
  36:     0x7f39d9c0fa7b - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h03abae454ea5f513
                               at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/alloc/src/boxed.rs:2062:9
  37:     0x7f39d9c0fa7b - std::sys::pal::unix::thread::Thread::new::thread_start::hf41d3eaffac37908
                               at /rustc/9fdbfe1441a82e96e3f99ae199ff5348d8d948ae/library/std/src/sys/pal/unix/thread.rs:108:17
  38:     0x7f39d30a6ded - <unknown>
  39:     0x7f39d312a0dc - <unknown>
  40:                0x0 - <unknown>

error: 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: please make sure that you have updated to the latest nightly

note: rustc 1.81.0-nightly (9fdbfe144 2024-06-13) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z crate-attr=feature(abi_x86_interrupt) --crate-type lib -Z dump-mir-dir=dir

query stack during panic:
#0 [fn_abi_of_instance] computing call ABI of `f`
end of query stack
warning: 1 warning emitted


```

</p>
</details>

<!--
query stack:
#0 [fn_abi_of_instance] computing call ABI of `f`

-->
@rustbot label +F-abi_x86_interrupt