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: not implemented: f16_f128 #122587

Closed
matthiaskrgr opened this issue Mar 16, 2024 · 25 comments · Fixed by #123087
Closed

ICE: not implemented: f16_f128 #122587

matthiaskrgr opened this issue Mar 16, 2024 · 25 comments · Fixed by #123087
Assignees
Labels
C-bug Category: This is a bug. F-f16_and_f128 `#![feature(f16)]`, `#![feature(f128)]` I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-low Low priority regression-from-stable-to-beta Performance or correctness regression from stable to beta. requires-incomplete-features This issue requires the use of incomplete features. S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

matthiaskrgr commented Mar 16, 2024

Code

//@ run-pass
#![allow(unused)]
#![feature(f128)]
#![feature(f16)]

// Same as the feature gate tests but ensure we can use the types
mod check_f128 {
    const A: f128 = 10.0;

    pub fn foo() {
        let a: f128 = 100.0;
        let b = 0.0f128;
        bar(1.23);
    }

    fn bar(a: f128) {}

    struct Bar {
        a: f128,
    }
}

mod check_f16 {
    const A: f16 = 10.0;

    pub fn foo() {
        let a: f16 = 100.0;
        let b = 0.0f16;
        bar(1.23);
    }

    fn bar(a: f16) {}

    struct Bar {
        a: f16,
    }
}

fn main() {
    check_f128::foo();
    check_f16::foo();
}

Meta

rustc --version --verbose:

rustc 1.78.0-nightly (c563f2ee7 2024-03-16)
binary: rustc
commit-hash: c563f2ee799b285067124b516ce99f26063f8351
commit-date: 2024-03-16
host: x86_64-unknown-linux-gnu
release: 1.78.0-nightly
LLVM version: 18.1.0

probably from #121926

Error output

clippy-driver ./tests/ui/resolve/primitive-usage.rs

<output>
Backtrace

not implemented: f16_f128
stack backtrace:
   0:     0x7f006f963912 - std::backtrace_rs::backtrace::libunwind::trace::hfb67e397a2d79bf6
                               at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/std/src/../../backtrace/src/backtrace/libunwind.rs:105:5
   1:     0x7f006f963912 - std::backtrace_rs::backtrace::trace_unsynchronized::hb900027543c0664d
                               at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f006f963912 - std::sys_common::backtrace::_print_fmt::hd3a7bd10b2dbb7a2
                               at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x7f006f963912 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he85321ead13b54e2
                               at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f006f9b4c8c - core::fmt::rt::Argument::fmt::h0bc0fca72ec6160d
                               at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/core/src/fmt/rt.rs:142:9
   5:     0x7f006f9b4c8c - core::fmt::write::ha791bec9376ee18e
                               at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/core/src/fmt/mod.rs:1153:17
   6:     0x7f006f95880f - std::io::Write::write_fmt::h042ac5ef2add44b5
                               at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/std/src/io/mod.rs:1843:15
   7:     0x7f006f9636e4 - std::sys_common::backtrace::_print::h398ade190e58a268
                               at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7f006f9636e4 - std::sys_common::backtrace::print::h4965889839a0e456
                               at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7f006f9663eb - std::panicking::default_hook::{{closure}}::h03c5a9b57e29c8bd
  10:     0x7f006f966143 - std::panicking::default_hook::haa39de978c4d4cb4
                               at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/std/src/panicking.rs:292:9
  11:     0x7f006c5b39ee - std[4af49b999d7e887a]::panicking::update_hook::<alloc[f09f849a16bdc2b1]::boxed::Box<rustc_driver_impl[38d4561b07f32730]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x7f006f966b50 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h3cb59727ca48257b
                               at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/alloc/src/boxed.rs:2034:9
  13:     0x7f006f966b50 - std::panicking::rust_panic_with_hook::h06a630682bf4c8f9
                               at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/std/src/panicking.rs:783:13
  14:     0x7f006f966859 - std::panicking::begin_panic_handler::{{closure}}::hd7f55e85f3df5a5e
                               at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/std/src/panicking.rs:649:13
  15:     0x7f006f963de6 - std::sys_common::backtrace::__rust_end_short_backtrace::h4b313dbb2e47ec89
                               at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/std/src/sys_common/backtrace.rs:171:18
  16:     0x7f006f9665c4 - rust_begin_unwind
                               at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/std/src/panicking.rs:645:5
  17:     0x7f006f9b11a5 - core::panicking::panic_fmt::hbd38fdaf62d88af9
                               at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/core/src/panicking.rs:72:14
  18:     0x563ce62b0dec - <clippy_lints[87cb8f7c960e2af8]::float_literal::FloatLiteral as rustc_lint[8ec0a3d643a79773]::passes::LateLintPass>::check_expr
  19:     0x7f006c944f82 - <rustc_lint[8ec0a3d643a79773]::late::LateContextAndPass<rustc_lint[8ec0a3d643a79773]::late::RuntimeCombinedLateLintPass> as rustc_hir[8460a15472185f08]::intravisit::Visitor>::visit_expr::{closure#0}
  20:     0x7f006c944e18 - <rustc_lint[8ec0a3d643a79773]::late::LateContextAndPass<rustc_lint[8ec0a3d643a79773]::late::RuntimeCombinedLateLintPass> as rustc_hir[8460a15472185f08]::intravisit::Visitor>::visit_expr
  21:     0x7f006c944d18 - <rustc_lint[8ec0a3d643a79773]::late::LateContextAndPass<rustc_lint[8ec0a3d643a79773]::late::RuntimeCombinedLateLintPass> as rustc_hir[8460a15472185f08]::intravisit::Visitor>::visit_nested_body
  22:     0x7f006c934392 - <rustc_lint[8ec0a3d643a79773]::late::LateContextAndPass<rustc_lint[8ec0a3d643a79773]::late::RuntimeCombinedLateLintPass> as rustc_hir[8460a15472185f08]::intravisit::Visitor>::visit_nested_item
  23:     0x7f006c933352 - <rustc_lint[8ec0a3d643a79773]::late::LateContextAndPass<rustc_lint[8ec0a3d643a79773]::late::RuntimeCombinedLateLintPass> as rustc_hir[8460a15472185f08]::intravisit::Visitor>::visit_nested_item
  24:     0x7f006e1cc372 - rustc_lint[8ec0a3d643a79773]::late::check_crate::{closure#0}
  25:     0x7f006e1cc5b3 - rustc_lint[8ec0a3d643a79773]::late::check_crate
  26:     0x7f006e1af1f5 - rustc_interface[baa36353ef4d859f]::passes::analysis
  27:     0x7f006e1ae7e5 - rustc_query_impl[1d92c28ac94b67d9]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[1d92c28ac94b67d9]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1d722b26b5c826bf]::query::erase::Erased<[u8; 1usize]>>
  28:     0x7f006e6006e5 - rustc_query_system[19a76085ae3c9fe1]::query::plumbing::try_execute_query::<rustc_query_impl[1d92c28ac94b67d9]::DynamicConfig<rustc_query_system[19a76085ae3c9fe1]::query::caches::SingleCache<rustc_middle[1d722b26b5c826bf]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[1d92c28ac94b67d9]::plumbing::QueryCtxt, false>
  29:     0x7f006e600449 - rustc_query_impl[1d92c28ac94b67d9]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  30:     0x7f006e367084 - rustc_interface[baa36353ef4d859f]::interface::run_compiler::<core[7265e5c29e97a4f9]::result::Result<(), rustc_span[98fd467b3f5fb84]::ErrorGuaranteed>, rustc_driver_impl[38d4561b07f32730]::run_compiler::{closure#0}>::{closure#0}
  31:     0x7f006e8538c5 - std[4af49b999d7e887a]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[baa36353ef4d859f]::util::run_in_thread_with_globals<rustc_interface[baa36353ef4d859f]::util::run_in_thread_pool_with_globals<rustc_interface[baa36353ef4d859f]::interface::run_compiler<core[7265e5c29e97a4f9]::result::Result<(), rustc_span[98fd467b3f5fb84]::ErrorGuaranteed>, rustc_driver_impl[38d4561b07f32730]::run_compiler::{closure#0}>::{closure#0}, core[7265e5c29e97a4f9]::result::Result<(), rustc_span[98fd467b3f5fb84]::ErrorGuaranteed>>::{closure#0}, core[7265e5c29e97a4f9]::result::Result<(), rustc_span[98fd467b3f5fb84]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[7265e5c29e97a4f9]::result::Result<(), rustc_span[98fd467b3f5fb84]::ErrorGuaranteed>>
  32:     0x7f006e8536f2 - <<std[4af49b999d7e887a]::thread::Builder>::spawn_unchecked_<rustc_interface[baa36353ef4d859f]::util::run_in_thread_with_globals<rustc_interface[baa36353ef4d859f]::util::run_in_thread_pool_with_globals<rustc_interface[baa36353ef4d859f]::interface::run_compiler<core[7265e5c29e97a4f9]::result::Result<(), rustc_span[98fd467b3f5fb84]::ErrorGuaranteed>, rustc_driver_impl[38d4561b07f32730]::run_compiler::{closure#0}>::{closure#0}, core[7265e5c29e97a4f9]::result::Result<(), rustc_span[98fd467b3f5fb84]::ErrorGuaranteed>>::{closure#0}, core[7265e5c29e97a4f9]::result::Result<(), rustc_span[98fd467b3f5fb84]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[7265e5c29e97a4f9]::result::Result<(), rustc_span[98fd467b3f5fb84]::ErrorGuaranteed>>::{closure#1} as core[7265e5c29e97a4f9]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  33:     0x7f006f9701e5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h1dc87ff82f4c2d61
                               at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/alloc/src/boxed.rs:2020:9
  34:     0x7f006f9701e5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h10dfae22642aac72
                               at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/alloc/src/boxed.rs:2020:9
  35:     0x7f006f9701e5 - std::sys::pal::unix::thread::Thread::new::thread_start::hfe0706a963f1853a
                               at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/std/src/sys/pal/unix/thread.rs:108:17
  36:     0x7f0069294ac3 - start_thread
                               at ./nptl/pthread_create.c:442:8
  37:     0x7f0069326850 - __GI___clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  38:                0x0 - <unknown>

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

note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new?template=ice.yml

note: please attach the file at `/home/gh-matthiaskrgr/vcs/github/rust_icemaker/rustc-ice-2024-03-16T09_08_43-265551.txt` to your bug report

query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack
note: Clippy version: clippy 0.1.78 (c563f2e 2024-03-16)

@matthiaskrgr matthiaskrgr added 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. C-bug Category: This is a bug. labels Mar 16, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 16, 2024
@matthiaskrgr matthiaskrgr added the A-clippy Area: Clippy label Mar 16, 2024
@Noratrieb
Copy link
Member

Noratrieb commented Mar 16, 2024

that's expected, the float types are still being added and will panic, please don't fuzz them yet.

@matthiaskrgr
Copy link
Member Author

the file is from the rustc repo, have you not read the ticket?

@Noratrieb
Copy link
Member

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.

@matthiaskrgr matthiaskrgr removed the A-clippy Area: Clippy label Mar 16, 2024
@matthiaskrgr
Copy link
Member Author

mvce:

const b: f16 = 0.0f16;
pub fn main() {
   let b = 0.0f16;
}

@jieyouxu jieyouxu added the F-f16_and_f128 `#![feature(f16)]`, `#![feature(f128)]` label Mar 16, 2024
@bjorn3 bjorn3 added the requires-incomplete-features This issue requires the use of incomplete features. label Mar 16, 2024
@jieyouxu jieyouxu added S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Mar 17, 2024
@matthiaskrgr matthiaskrgr added the regression-from-stable-to-beta Performance or correctness regression from stable to beta. label Mar 20, 2024
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Mar 20, 2024
@Noratrieb
Copy link
Member

With the current way feature gating works, it's inevitable that it will lead to these kinds of problems. it might make sense to make feature gating fatal. either way I don't think this has a particularly high priority

@apiraino
Copy link
Contributor

WG-prioritization assigning priority (Zulip discussion).

@rustbot label -I-prioritize +P-low

@rustbot rustbot added P-low Low priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Mar 20, 2024
@tgross35
Copy link
Contributor

Yeah, I will be updating Clippy after I have some slightly improved libs support

@rustbot claim

@tgross35
Copy link
Contributor

Feel free to ping / assign me on any f16/f128 issues btw

@Noratrieb
Copy link
Member

As an org member, I think you should be able to configure notifications for this repo so that you get notified whenever someone applies the F label.

@tgross35
Copy link
Contributor

tgross35 commented Mar 26, 2024

Thanks, I had no clue that was a thing. Awesome.

(looks like you don't even need to be an org member to do this, just tried with something else)

tgross35 added a commit to tgross35/rust that referenced this issue Mar 26, 2024
It turns out there is a bit of a circular dependency - I cannot add
anything to `core` because Clippy fails, and I can't actually add
correct Clippy implementations without new implementations from `core`.

Change some of the Clippy stubs from `unimplemented!` to success values
and leave a FIXME in their place to mitigate this.

Fixes <rust-lang#122587>
tgross35 added a commit to tgross35/rust that referenced this issue Mar 26, 2024
It turns out there is a bit of a circular dependency - I cannot add
anything to `core` because Clippy fails, and I can't actually add
correct Clippy implementations without new implementations from `core`.

Change some of the Clippy stubs from `unimplemented!` to success values
and leave a FIXME in their place to mitigate this.

Fixes <rust-lang#122587>
tgross35 added a commit to tgross35/rust that referenced this issue Mar 26, 2024
It turns out there is a bit of a circular dependency - I cannot add
anything to `core` because Clippy fails, and I can't actually add
correct Clippy implementations without new implementations from `core`.

Change some of the Clippy stubs from `unimplemented!` to success values
and leave a FIXME in their place to mitigate this.

Fixes <rust-lang#122587>
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 26, 2024
…bs, r=blyxyas

Change `f16` and `f128` clippy stubs to be nonpanicking

It turns out there is a bit of a circular dependency - I cannot add anything to `core` because Clippy fails, and I can't actually add correct Clippy implementations without new implementations from `core`.

Change some of the Clippy stubs from `unimplemented!` to success values and leave a FIXME in their place to mitigate this.

Fixes <rust-lang#122587>
@matthiaskrgr
Copy link
Member Author

matthiaskrgr commented Mar 27, 2024

@tgross35 this still crashes with latest master and rustc and clippy :/

thread 'rustc' panicked at compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs:445:41:
not implemented: f16_f128
stack backtrace:

@matthiaskrgr matthiaskrgr reopened this Mar 27, 2024
@tgross35
Copy link
Contributor

Hmm which line does it say it's panicking at? I am running with

./x build --stage 1 src/tools/clippy/
LD_LIBRARY_PATH=$(realpath build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/) build/x86_64-unknown-linux-gnu/stage1/bin/clippy-driver ./tests/ui/resolve/primitive-usage.rs

That seems to work fine, not sure if there is a less clunky way to build and run clippy in-tree

@matthiaskrgr
Copy link
Member Author

ooh lol its actually cranelift that panics 😅 (rustc with -Zcodegen-backend=..)

auto-reduced (treereduce-rust):

#![feature(f128)]

mod check_f128 {

    pub fn foo() {
        bar(1.23);
    }

    fn bar(a: f128) {}
}

fn main() {
    check_f128::foo();
}

original:

//@ run-pass
#![allow(unused)]
#![feature(f128)]
#![feature(f16)]

// Same as the feature gate tests but ensure we can use the types
mod check_f128 {
    const A: f128 = 10.0;

    pub fn foo() {
        let a: f128 = 100.0;
        let b = 0.0f128;
        bar(1.23);
    }

    fn bar(a: f128) {}

    struct Bar {
        a: f128,
    }
}

mod check_f16 {
    const A: f16 = 10.0;

    pub fn foo() {
        let a: f16 = 100.0;
        let b = 0.0f16;
        bar(1.23);
    }

    fn bar(a: f16) {}

    struct Bar {
        a: f16,
    }
}

fn main() {
    check_f128::foo();
    check_f16::foo();
}

Version information

rustc 1.79.0-nightly (d5db7fb53 2024-03-27)
binary: rustc
commit-hash: d5db7fb537c0352eec3855aa0331c271c48ac4f6
commit-date: 2024-03-27
host: x86_64-unknown-linux-gnu
release: 1.79.0-nightly
LLVM version: 18.1.2

Command:
/home/matthias/.rustup/toolchains/master/bin/rustc -Zcodegen-backend=cranelift

Program output

warning: unused variable: `a`
 --> /tmp/icemaker_global_tempdir.OmcLOi9VfQDq/rustc_testrunner_tmpdir_reporting.vA7SUKAHHWs0/mvce.rs:9:12
  |
9 |     fn bar(a: f128) {}
  |            ^ help: if this is intentional, prefix it with an underscore: `_a`
  |
  = note: `#[warn(unused_variables)]` on by default

thread 'rustc' panicked at src/common.rs:39:28:
not implemented: f16_f128
stack backtrace:
   0:     0x7a9596889235 - std::backtrace_rs::backtrace::libunwind::trace::h35c05b60de86c082
                               at /rustc/d5db7fb537c0352eec3855aa0331c271c48ac4f6/library/std/src/../../backtrace/src/backtrace/libunwind.rs:105:5
   1:     0x7a9596889235 - std::backtrace_rs::backtrace::trace_unsynchronized::h716cc93b6616466b
                               at /rustc/d5db7fb537c0352eec3855aa0331c271c48ac4f6/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7a9596889235 - std::sys_common::backtrace::_print_fmt::h2eafab78e5405086
                               at /rustc/d5db7fb537c0352eec3855aa0331c271c48ac4f6/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x7a9596889235 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h782eb93aef6bbfdc
                               at /rustc/d5db7fb537c0352eec3855aa0331c271c48ac4f6/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7a95968da3fb - core::fmt::rt::Argument::fmt::h423c1825313972bd
                               at /rustc/d5db7fb537c0352eec3855aa0331c271c48ac4f6/library/core/src/fmt/rt.rs:142:9
   5:     0x7a95968da3fb - core::fmt::write::h8bf0eb0713660507
                               at /rustc/d5db7fb537c0352eec3855aa0331c271c48ac4f6/library/core/src/fmt/mod.rs:1153:17
   6:     0x7a959687de4f - std::io::Write::write_fmt::h1869b88304121496
                               at /rustc/d5db7fb537c0352eec3855aa0331c271c48ac4f6/library/std/src/io/mod.rs:1843:15
   7:     0x7a959688900e - std::sys_common::backtrace::_print::h3f71a60e8eec22db
                               at /rustc/d5db7fb537c0352eec3855aa0331c271c48ac4f6/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7a959688900e - std::sys_common::backtrace::print::hbc0f4a4435261b96
                               at /rustc/d5db7fb537c0352eec3855aa0331c271c48ac4f6/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7a959688bc89 - std::panicking::default_hook::{{closure}}::hcb90344a23466037
  10:     0x7a959688b9f3 - std::panicking::default_hook::h4e7402b852825f26
                               at /rustc/d5db7fb537c0352eec3855aa0331c271c48ac4f6/library/std/src/panicking.rs:292:9
  11:     0x7a95931f7eee - std[ee38f4c3e7db4cb4]::panicking::update_hook::<alloc[5f51a9fa993ddee8]::boxed::Box<rustc_driver_impl[b62da54691605f75]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x7a959688c38c - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h41b4c40829d8b80c
                               at /rustc/d5db7fb537c0352eec3855aa0331c271c48ac4f6/library/alloc/src/boxed.rs:2032:9
  13:     0x7a959688c38c - std::panicking::rust_panic_with_hook::h34319b28877d2524
                               at /rustc/d5db7fb537c0352eec3855aa0331c271c48ac4f6/library/std/src/panicking.rs:793:13
  14:     0x7a959688c0fd - std::panicking::begin_panic_handler::{{closure}}::h0eb0df2dd2d8dc83
                               at /rustc/d5db7fb537c0352eec3855aa0331c271c48ac4f6/library/std/src/panicking.rs:650:13
  15:     0x7a95968896f9 - std::sys_common::backtrace::__rust_end_short_backtrace::h78e6ce0174ef8f2f
                               at /rustc/d5db7fb537c0352eec3855aa0331c271c48ac4f6/library/std/src/sys_common/backtrace.rs:171:18
  16:     0x7a959688be67 - rust_begin_unwind
                               at /rustc/d5db7fb537c0352eec3855aa0331c271c48ac4f6/library/std/src/panicking.rs:646:5
  17:     0x7a95968d6896 - core::panicking::panic_fmt::hb9147ccf68681889
                               at /rustc/d5db7fb537c0352eec3855aa0331c271c48ac4f6/library/core/src/panicking.rs:72:14
  18:     0x7a9586214623 - rustc_codegen_cranelift[21db139c38c04a89]::common::scalar_to_clif_type
  19:     0x7a95861fd524 - <rustc_target[be3658c8b4af965b]::abi::call::ArgAbi<rustc_middle[edfcb02b6a244f2]::ty::Ty> as rustc_codegen_cranelift[21db139c38c04a89]::abi::pass_mode::ArgAbiExt>::get_abi_param
  20:     0x7a95861f4254 - <core[852c89a24d64efc7]::iter::adapters::chain::Chain<core[852c89a24d64efc7]::option::IntoIter<cranelift_codegen[b503ea5cf0af30c5]::ir::extfunc::AbiParam>, core[852c89a24d64efc7]::iter::adapters::flatten::FlatMap<core[852c89a24d64efc7]::slice::iter::Iter<rustc_target[be3658c8b4af965b]::abi::call::ArgAbi<rustc_middle[edfcb02b6a244f2]::ty::Ty>>, smallvec[b3b3083dd8b0b482]::IntoIter<[cranelift_codegen[b503ea5cf0af30c5]::ir::extfunc::AbiParam; 2usize]>, rustc_codegen_cranelift[21db139c38c04a89]::abi::clif_sig_from_fn_abi::{closure#0}>> as core[852c89a24d64efc7]::iter::traits::iterator::Iterator>::next
  21:     0x7a95861ffc59 - rustc_codegen_cranelift[21db139c38c04a89]::abi::clif_sig_from_fn_abi
  22:     0x7a95862228c6 - rustc_codegen_cranelift[21db139c38c04a89]::driver::aot::module_codegen::{closure#0}
  23:     0x7a95862212f7 - rustc_codegen_cranelift[21db139c38c04a89]::driver::aot::module_codegen
  24:     0x7a958622d6bc - rustc_codegen_cranelift[21db139c38c04a89]::driver::aot::run_aot
  25:     0x7a958625c0c1 - <rustc_codegen_cranelift[21db139c38c04a89]::CraneliftCodegenBackend as rustc_codegen_ssa[970915433399b058]::traits::backend::CodegenBackend>::codegen_crate
  26:     0x7a959549411f - rustc_interface[8a3ca12de370bc6d]::passes::start_codegen
  27:     0x7a95954938bd - <rustc_interface[8a3ca12de370bc6d]::queries::Queries>::codegen_and_build_linker
  28:     0x7a95952872eb - rustc_interface[8a3ca12de370bc6d]::interface::run_compiler::<core[852c89a24d64efc7]::result::Result<(), rustc_span[b9a3f8dff5ad8c72]::ErrorGuaranteed>, rustc_driver_impl[b62da54691605f75]::run_compiler::{closure#0}>::{closure#0}
  29:     0x7a95953665e3 - std[ee38f4c3e7db4cb4]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[8a3ca12de370bc6d]::util::run_in_thread_with_globals<rustc_interface[8a3ca12de370bc6d]::util::run_in_thread_pool_with_globals<rustc_interface[8a3ca12de370bc6d]::interface::run_compiler<core[852c89a24d64efc7]::result::Result<(), rustc_span[b9a3f8dff5ad8c72]::ErrorGuaranteed>, rustc_driver_impl[b62da54691605f75]::run_compiler::{closure#0}>::{closure#0}, core[852c89a24d64efc7]::result::Result<(), rustc_span[b9a3f8dff5ad8c72]::ErrorGuaranteed>>::{closure#0}, core[852c89a24d64efc7]::result::Result<(), rustc_span[b9a3f8dff5ad8c72]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[852c89a24d64efc7]::result::Result<(), rustc_span[b9a3f8dff5ad8c72]::ErrorGuaranteed>>
  30:     0x7a9595366410 - <<std[ee38f4c3e7db4cb4]::thread::Builder>::spawn_unchecked_<rustc_interface[8a3ca12de370bc6d]::util::run_in_thread_with_globals<rustc_interface[8a3ca12de370bc6d]::util::run_in_thread_pool_with_globals<rustc_interface[8a3ca12de370bc6d]::interface::run_compiler<core[852c89a24d64efc7]::result::Result<(), rustc_span[b9a3f8dff5ad8c72]::ErrorGuaranteed>, rustc_driver_impl[b62da54691605f75]::run_compiler::{closure#0}>::{closure#0}, core[852c89a24d64efc7]::result::Result<(), rustc_span[b9a3f8dff5ad8c72]::ErrorGuaranteed>>::{closure#0}, core[852c89a24d64efc7]::result::Result<(), rustc_span[b9a3f8dff5ad8c72]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[852c89a24d64efc7]::result::Result<(), rustc_span[b9a3f8dff5ad8c72]::ErrorGuaranteed>>::{closure#1} as core[852c89a24d64efc7]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  31:     0x7a9596895ca9 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc7f4be48b61584a0
                               at /rustc/d5db7fb537c0352eec3855aa0331c271c48ac4f6/library/alloc/src/boxed.rs:2018:9
  32:     0x7a9596895ca9 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h98f2eb6153ee7231
                               at /rustc/d5db7fb537c0352eec3855aa0331c271c48ac4f6/library/alloc/src/boxed.rs:2018:9
  33:     0x7a9596895ca9 - std::sys::pal::unix::thread::Thread::new::thread_start::h5b05a8117b189654
                               at /rustc/d5db7fb537c0352eec3855aa0331c271c48ac4f6/library/std/src/sys/pal/unix/thread.rs:108:17
  34:     0x7a95900a955a - <unknown>
  35:     0x7a9590126a3c - <unknown>
  36:                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: rustc 1.79.0-nightly (d5db7fb53 2024-03-27) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z codegen-backend=cranelift -Z dump-mir-dir=dir

query stack during panic:
end of query stack
warning: 1 warning emitted


github-actions bot pushed a commit to rust-lang/miri that referenced this issue Mar 29, 2024
…xyas

Change `f16` and `f128` clippy stubs to be nonpanicking

It turns out there is a bit of a circular dependency - I cannot add anything to `core` because Clippy fails, and I can't actually add correct Clippy implementations without new implementations from `core`.

Change some of the Clippy stubs from `unimplemented!` to success values and leave a FIXME in their place to mitigate this.

Fixes <rust-lang/rust#122587>
flip1995 pushed a commit to flip1995/rust-clippy that referenced this issue Apr 4, 2024
It turns out there is a bit of a circular dependency - I cannot add
anything to `core` because Clippy fails, and I can't actually add
correct Clippy implementations without new implementations from `core`.

Change some of the Clippy stubs from `unimplemented!` to success values
and leave a FIXME in their place to mitigate this.

Fixes <rust-lang/rust#122587>
@matthiaskrgr matthiaskrgr added the S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. label Apr 15, 2024
@matthiaskrgr
Copy link
Member Author

also fun fact: I found this code from 2014 which also panics again 😅

#![feature(quad_precision_float)]

static x: f128 = 1.0 + 2.0;

fn foo(a: f128) -> f128 { a }

pub fn main() {
    let y = x;
    foo(y);
}

@tgross35
Copy link
Contributor

tgross35 commented Apr 24, 2024

I don't even think the old gate is needed for that (though funny that it exists). Unfortunately anything that can get const evaled will ICE until I can update that portion of the code, which can't happen until we have arithmetic working on all platforms, which won't work until I have compiler_builtins updated, which is a huge pain that I am currently working on... Dependencies 😆

@tgross35
Copy link
Contributor

@matthiaskrgr is there anything in tree testing this? #126636 should fix it but I don't see anything to update if it exists

@tgross35
Copy link
Contributor

The above checks fine since #126636 but I forgot the Fixes tag, could somebody close this?

tgross35 added a commit to tgross35/rust that referenced this issue Jun 21, 2024
tgross35 added a commit to tgross35/rust that referenced this issue Jun 21, 2024
tgross35 added a commit to tgross35/rust that referenced this issue Jun 21, 2024
@matthiaskrgr
Copy link
Member Author

@tgross35

//@ 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
}

tgross35 added a commit to tgross35/rust that referenced this issue Jun 21, 2024
@tgross35
Copy link
Contributor

Ah, that last ICE point should be covered by #123088. Is there something edition-specific?

@matthiaskrgr
Copy link
Member Author

minimized 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.7

Command:
/home/matthias/.rustup/toolchains/master/bin/rustc

Program 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`.

@matthiaskrgr
Copy link
Member Author

does not seem to be edition dependant.

tgross35 added a commit to tgross35/rust that referenced this issue Jun 23, 2024
tgross35 added a commit to tgross35/rust that referenced this issue Jun 23, 2024
tgross35 added a commit to tgross35/rust that referenced this issue Jun 23, 2024
@tgross35
Copy link
Contributor

@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)

@matthiaskrgr
Copy link
Member Author

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''

@tgross35
Copy link
Contributor

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.

@tgross35
Copy link
Contributor

Going to close this since the obvious codepaths have been taken care of, anything less obvious is probably better off in its own issue.

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. F-f16_and_f128 `#![feature(f16)]`, `#![feature(f128)]` I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-low Low priority regression-from-stable-to-beta Performance or correctness regression from stable to beta. requires-incomplete-features This issue requires the use of incomplete features. S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants