Repository navigation
ICE: not implemented: f16_f128 #122587
Description
Activity
- addedI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.C-bugCategory: This is a bug.Category: This is a bug.
on Mar 16, 2024 - addedneeds-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triagingThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
on Mar 16, 2024 that's expected, the float types are still being added and will panic, please don't fuzz them yet.
the file is from the rustc repo, have you not read the ticket?
Yes, the file tests that float name resolution works. A lot of areas, including clippy, are stubbed out with
todo!()for now, so it's expected that clippy would die on such a file.mvce:
const b: f16 = 0.0f16; pub fn main() { let b = 0.0f16; }
- addedF-f16_and_f128`#![feature(f16)]`, `#![feature(f128)]``#![feature(f16)]`, `#![feature(f128)]`
on Mar 16, 2024 - addedS-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueand removedneeds-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triagingThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
on Mar 17, 2024 - addedregression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
on Mar 20, 2024 30 remaining items
- added 2 commits that reference this issue
on Jun 21, 2024 //@ revisions: e2015 e2018 // //@[e2018] edition:2018 #![allow(unused)] const b: f16 = 10.0; //~ ERROR the type `f16` is unstable pub fn main() { let a: f16 = 100.0; //~ ERROR the type `f16` is unstable let b = 0.0f16; //~ ERROR the type `f16` is unstable foo(1.23); } fn foo(a: f16) {} //~ ERROR the type `f16` is unstable struct Bar { a: f16, //~ ERROR the type `f16` is unstable }- added a commit that references this issue
on Jun 21, 2024 Ah, that last ICE point should be covered by #123088. Is there something edition-specific?
Reacted by Matthias Krügerminimized with auto-generated report:
auto-reduced (treereduce-rust):
const b: f16 = 10.0; pub fn main() { let b = 0.0f16; foo(1.23); } fn foo(a: f16) {}
original:
//@ revisions: e2015 e2018 // //@[e2018] edition:2018 #![allow(unused)] const b: f16 = 10.0; //~ ERROR the type `f16` is unstable pub fn main() { let a: f16 = 100.0; //~ ERROR the type `f16` is unstable let b = 0.0f16; //~ ERROR the type `f16` is unstable foo(1.23); } fn foo(a: f16) {} //~ ERROR the type `f16` is unstable struct Bar { a: f16, //~ ERROR the type `f16` is unstable }
Version information
rustc 1.81.0-nightly (7a08f8462 2024-06-21) binary: rustc commit-hash: 7a08f84627ff3035de4d66ff3209e5fc93165dcb commit-date: 2024-06-21 host: x86_64-unknown-linux-gnu release: 1.81.0-nightly LLVM version: 18.1.7Command:
/home/matthias/.rustup/toolchains/master/bin/rustcProgram output
error[E0658]: the type `f16` is unstable --> /tmp/icemaker_global_tempdir.OrU0ZATgnOnE/rustc_testrunner_tmpdir_reporting.COrE24FNzM7e/mvce.rs:3:10 | 3 | const b: f16 = 10.0; | ^^^ | = note: see issue #116909 <https://github.com/rust-lang/rust/issues/116909> for more information = help: add `#![feature(f16)]` to the crate attributes to enable = note: this compiler was built on 2024-06-21; consider upgrading it if it is out of date error[E0658]: the type `f16` is unstable --> /tmp/icemaker_global_tempdir.OrU0ZATgnOnE/rustc_testrunner_tmpdir_reporting.COrE24FNzM7e/mvce.rs:10:11 | 10 | fn foo(a: f16) {} | ^^^ | = note: see issue #116909 <https://github.com/rust-lang/rust/issues/116909> for more information = help: add `#![feature(f16)]` to the crate attributes to enable = note: this compiler was built on 2024-06-21; consider upgrading it if it is out of date error[E0658]: the type `f16` is unstable --> /tmp/icemaker_global_tempdir.OrU0ZATgnOnE/rustc_testrunner_tmpdir_reporting.COrE24FNzM7e/mvce.rs:6:13 | 6 | let b = 0.0f16; | ^^^^^^ | = note: see issue #116909 <https://github.com/rust-lang/rust/issues/116909> for more information = help: add `#![feature(f16)]` to the crate attributes to enable = note: this compiler was built on 2024-06-21; consider upgrading it if it is out of date thread 'rustc' panicked at compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs:372:41: not implemented: f16_f128 stack backtrace: 0: 0x7f45e94e0125 - std::backtrace_rs::backtrace::libunwind::trace::h9e1143c4e8814665 at /rustc/7a08f84627ff3035de4d66ff3209e5fc93165dcb/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5 1: 0x7f45e94e0125 - std::backtrace_rs::backtrace::trace_unsynchronized::hb17bc278e78560b7 at /rustc/7a08f84627ff3035de4d66ff3209e5fc93165dcb/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x7f45e94e0125 - std::sys::backtrace::_print_fmt::h4e16a804d4b72d53 at /rustc/7a08f84627ff3035de4d66ff3209e5fc93165dcb/library/std/src/sys/backtrace.rs:68:5 3: 0x7f45e94e0125 - <std::sys::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h51c8a417deba034f at /rustc/7a08f84627ff3035de4d66ff3209e5fc93165dcb/library/std/src/sys/backtrace.rs:44:22 4: 0x7f45e952fabb - core::fmt::rt::Argument::fmt::h9e6273a38f90b346 at /rustc/7a08f84627ff3035de4d66ff3209e5fc93165dcb/library/core/src/fmt/rt.rs:165:63 5: 0x7f45e952fabb - core::fmt::write::hf6893e6e0de45566 at /rustc/7a08f84627ff3035de4d66ff3209e5fc93165dcb/library/core/src/fmt/mod.rs:1168:21 6: 0x7f45e94d4dbf - std::io::Write::write_fmt::h939622d51aaa7841 at /rustc/7a08f84627ff3035de4d66ff3209e5fc93165dcb/library/std/src/io/mod.rs:1835:15 7: 0x7f45e94dfefe - std::sys::backtrace::_print::h41aa84b32d700697 at /rustc/7a08f84627ff3035de4d66ff3209e5fc93165dcb/library/std/src/sys/backtrace.rs:47:5 8: 0x7f45e94dfefe - std::sys::backtrace::print::h121fd5e3d688a475 at /rustc/7a08f84627ff3035de4d66ff3209e5fc93165dcb/library/std/src/sys/backtrace.rs:34:9 9: 0x7f45e94e2939 - std::panicking::default_hook::{{closure}}::hc22a77172f8c8931 10: 0x7f45e94e26dc - std::panicking::default_hook::hd8d9aec7eb6a0fc3 at /rustc/7a08f84627ff3035de4d66ff3209e5fc93165dcb/library/std/src/panicking.rs:292:9 11: 0x7f45e59ff260 - std[3295baff09c0d5bb]::panicking::update_hook::<alloc[82b9802ee0afb8ed]::boxed::Box<rustc_driver_impl[95dae7b6d33859ab]::install_ice_hook::{closure#0}>>::{closure#0} 12: 0x7f45e94e320f - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h35d67e64a0b3c43b at /rustc/7a08f84627ff3035de4d66ff3209e5fc93165dcb/library/alloc/src/boxed.rs:2076:9 13: 0x7f45e94e320f - std::panicking::rust_panic_with_hook::h086bae967523d34e at /rustc/7a08f84627ff3035de4d66ff3209e5fc93165dcb/library/std/src/panicking.rs:804:13 14: 0x7f45e94e2e03 - std::panicking::begin_panic_handler::{{closure}}::hfeac2910cd533be9 at /rustc/7a08f84627ff3035de4d66ff3209e5fc93165dcb/library/std/src/panicking.rs:663:13 15: 0x7f45e94e05e9 - std::sys::backtrace::__rust_end_short_backtrace::h717a4b25b81802d4 at /rustc/7a08f84627ff3035de4d66ff3209e5fc93165dcb/library/std/src/sys/backtrace.rs:171:18 16: 0x7f45e94e2b14 - rust_begin_unwind at /rustc/7a08f84627ff3035de4d66ff3209e5fc93165dcb/library/std/src/panicking.rs:661:5 17: 0x7f45e952c073 - core::panicking::panic_fmt::h51c9ea6079c2a1f6 at /rustc/7a08f84627ff3035de4d66ff3209e5fc93165dcb/library/core/src/panicking.rs:74:14 18: 0x7f45e7808767 - <rustc_mir_build[52246727d5d8c4e9]::thir::pattern::const_to_pat::ConstToPat>::recur 19: 0x7f45e7806dce - <rustc_mir_build[52246727d5d8c4e9]::thir::pattern::PatCtxt>::const_to_pat 20: 0x7f45e780cc72 - <rustc_mir_build[52246727d5d8c4e9]::thir::pattern::PatCtxt>::lower_path 21: 0x7f45e7809bc0 - <rustc_mir_build[52246727d5d8c4e9]::thir::pattern::PatCtxt>::lower_pattern 22: 0x7f45e780f097 - <rustc_mir_build[52246727d5d8c4e9]::thir::cx::Cx>::mirror_stmts::{closure#0} 23: 0x7f45e7811d3d - <rustc_mir_build[52246727d5d8c4e9]::thir::cx::Cx>::mirror_expr 24: 0x7f45e736df9a - rustc_mir_build[52246727d5d8c4e9]::thir::cx::thir_body 25: 0x7f45e736d996 - rustc_query_impl[b1aaa56dbebc295e]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[b1aaa56dbebc295e]::query_impl::thir_body::dynamic_query::{closure#2}::{closure#0}, rustc_middle[c3dffb16c28c77a7]::query::erase::Erased<[u8; 16usize]>> 26: 0x7f45e75f68d7 - rustc_query_system[748b288d756e32e1]::query::plumbing::try_execute_query::<rustc_query_impl[b1aaa56dbebc295e]::DynamicConfig<rustc_query_system[748b288d756e32e1]::query::caches::VecCache<rustc_span[6aa011f1c2e52b2d]::def_id::LocalDefId, rustc_middle[c3dffb16c28c77a7]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[b1aaa56dbebc295e]::plumbing::QueryCtxt, false> 27: 0x7f45e75f6528 - rustc_query_impl[b1aaa56dbebc295e]::query_impl::thir_body::get_query_non_incr::__rust_end_short_backtrace 28: 0x7f45e7321194 - rustc_mir_build[52246727d5d8c4e9]::check_unsafety::check_unsafety 29: 0x7f45e7320feb - rustc_query_impl[b1aaa56dbebc295e]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[b1aaa56dbebc295e]::query_impl::check_unsafety::dynamic_query::{closure#2}::{closure#0}, rustc_middle[c3dffb16c28c77a7]::query::erase::Erased<[u8; 0usize]>> 30: 0x7f45e7320197 - rustc_query_system[748b288d756e32e1]::query::plumbing::try_execute_query::<rustc_query_impl[b1aaa56dbebc295e]::DynamicConfig<rustc_query_system[748b288d756e32e1]::query::caches::VecCache<rustc_span[6aa011f1c2e52b2d]::def_id::LocalDefId, rustc_middle[c3dffb16c28c77a7]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[b1aaa56dbebc295e]::plumbing::QueryCtxt, false> 31: 0x7f45e731fddb - rustc_query_impl[b1aaa56dbebc295e]::query_impl::check_unsafety::get_query_non_incr::__rust_end_short_backtrace 32: 0x7f45e7324eac - rustc_interface[776f974ef9e2f82a]::passes::analysis 33: 0x7f45e7323f95 - rustc_query_impl[b1aaa56dbebc295e]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[b1aaa56dbebc295e]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[c3dffb16c28c77a7]::query::erase::Erased<[u8; 1usize]>> 34: 0x7f45e7e1ea25 - rustc_query_system[748b288d756e32e1]::query::plumbing::try_execute_query::<rustc_query_impl[b1aaa56dbebc295e]::DynamicConfig<rustc_query_system[748b288d756e32e1]::query::caches::SingleCache<rustc_middle[c3dffb16c28c77a7]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[b1aaa56dbebc295e]::plumbing::QueryCtxt, false> 35: 0x7f45e7e1e78f - rustc_query_impl[b1aaa56dbebc295e]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace 36: 0x7f45e7d1089b - rustc_interface[776f974ef9e2f82a]::interface::run_compiler::<core[da71afae28a7f9d6]::result::Result<(), rustc_span[6aa011f1c2e52b2d]::ErrorGuaranteed>, rustc_driver_impl[95dae7b6d33859ab]::run_compiler::{closure#0}>::{closure#1} 37: 0x7f45e7cae489 - std[3295baff09c0d5bb]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[776f974ef9e2f82a]::util::run_in_thread_with_globals<rustc_interface[776f974ef9e2f82a]::util::run_in_thread_pool_with_globals<rustc_interface[776f974ef9e2f82a]::interface::run_compiler<core[da71afae28a7f9d6]::result::Result<(), rustc_span[6aa011f1c2e52b2d]::ErrorGuaranteed>, rustc_driver_impl[95dae7b6d33859ab]::run_compiler::{closure#0}>::{closure#1}, core[da71afae28a7f9d6]::result::Result<(), rustc_span[6aa011f1c2e52b2d]::ErrorGuaranteed>>::{closure#0}, core[da71afae28a7f9d6]::result::Result<(), rustc_span[6aa011f1c2e52b2d]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[da71afae28a7f9d6]::result::Result<(), rustc_span[6aa011f1c2e52b2d]::ErrorGuaranteed>> 38: 0x7f45e7cae23a - <<std[3295baff09c0d5bb]::thread::Builder>::spawn_unchecked_<rustc_interface[776f974ef9e2f82a]::util::run_in_thread_with_globals<rustc_interface[776f974ef9e2f82a]::util::run_in_thread_pool_with_globals<rustc_interface[776f974ef9e2f82a]::interface::run_compiler<core[da71afae28a7f9d6]::result::Result<(), rustc_span[6aa011f1c2e52b2d]::ErrorGuaranteed>, rustc_driver_impl[95dae7b6d33859ab]::run_compiler::{closure#0}>::{closure#1}, core[da71afae28a7f9d6]::result::Result<(), rustc_span[6aa011f1c2e52b2d]::ErrorGuaranteed>>::{closure#0}, core[da71afae28a7f9d6]::result::Result<(), rustc_span[6aa011f1c2e52b2d]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[da71afae28a7f9d6]::result::Result<(), rustc_span[6aa011f1c2e52b2d]::ErrorGuaranteed>>::{closure#2} as core[da71afae28a7f9d6]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} 39: 0x7f45e94ecf7b - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h1fb027f994355977 at /rustc/7a08f84627ff3035de4d66ff3209e5fc93165dcb/library/alloc/src/boxed.rs:2062:9 40: 0x7f45e94ecf7b - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc8362453264a063b at /rustc/7a08f84627ff3035de4d66ff3209e5fc93165dcb/library/alloc/src/boxed.rs:2062:9 41: 0x7f45e94ecf7b - std::sys::pal::unix::thread::Thread::new::thread_start::h961cc5e79f30aa83 at /rustc/7a08f84627ff3035de4d66ff3209e5fc93165dcb/library/std/src/sys/pal/unix/thread.rs:108:17 42: 0x7f45e9282ded - <unknown> 43: 0x7f45e93060dc - <unknown> 44: 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 (7a08f8462 2024-06-21) running on x86_64-unknown-linux-gnu query stack during panic: #0 [thir_body] building THIR for `main` #1 [check_unsafety] unsafety-checking `main` end of query stack warning: unused variable: `a` --> /tmp/icemaker_global_tempdir.OrU0ZATgnOnE/rustc_testrunner_tmpdir_reporting.COrE24FNzM7e/mvce.rs:10:8 | 10 | fn foo(a: f16) {} | ^ help: if this is intentional, prefix it with an underscore: `_a` | = note: `#[warn(unused_variables)]` on by default error: aborting due to 3 previous errors; 1 warning emitted For more information about this error, try `rustc --explain E0658`.does not seem to be edition dependant.
@matthiaskrgr no more 🧊 in the latest nightly, a previously-panicking test was included in https://github.com/rust-lang/rust/blob/fda509e817abeeecb5b76bc1de844f355675c81e/tests/ui/consts/const_in_pattern/f16-f128-const-reassign.rs.
Could we close this broad-ish issue and just open new ones if new ICEs pop up? (There are some
unimplemented!s floating around in const casting and math still, but hopefully gone in the next few weeks)Cranelift still has problems, but I dunno if you want to tackle this 😅
thread 'rustc' panicked at src/common.rs:67:29: 'not implemented: f16_f128''Yeah, lower priority :) rust-lang/rustc_codegen_cranelift#1461 is tracking that one. cg_gcc has the issue too but that one is fixed in the rustc_codegen_gcc repo, just waiting on a sync.
Going to close this since the obvious codepaths have been taken care of, anything less obvious is probably better off in its own issue.
Code
Meta
rustc --version --verbose:probably from #121926
Error output
clippy-driver ./tests/ui/resolve/primitive-usage.rsBacktrace