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 in compiler/rustc_const_eval/src/interpret/cast.rs #125475

Closed
Naserume opened this issue May 24, 2024 · 1 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.

Comments

@Naserume
Copy link

Code

(original)

#![crate_type="rlib"]
fn test() -> (u8,) {
    (-0.0f128 as u8,)
}

(modified)

#![feature(f128)]
fn test() -> (u8,) {
    (-0.0f128 as u8,)
}

fn main() {}

Meta

rustc --version --verbose:

rustc 1.80.0-nightly (9cdfe285c 2024-05-22)
binary: rustc
commit-hash: 9cdfe285ca724c801dc9f78d22b24ea69b787f26
commit-date: 2024-05-22
host: x86_64-apple-darwin
release: 1.80.0-nightly
LLVM version: 18.1.6
Backtrace

thread 'rustc' panicked at /rustc/9cdfe285ca724c801dc9f78d22b24ea69b787f26/compiler/rustc_const_eval/src/interpret/cast.rs:194:30:
not implemented: f16_f128
stack backtrace:
   0:        0x10528d977 - std::backtrace::Backtrace::create::h3d2c9c7aabb5d856
   1:        0x10528d8c5 - std::backtrace::Backtrace::force_capture::h40401ee835edd8a3
   2:        0x10dfe33ef - std[46b01aaf7e2caa06]::panicking::update_hook::<alloc[59a7021da80c39d9]::boxed::Box<rustc_driver_impl[8eb753b65fc6833d]::install_ice_hook::{closure#0}>>::{closure#0}
   3:        0x1052a79a3 - std::panicking::rust_panic_with_hook::h54095a093db9b329
   4:        0x1052a72aa - std::panicking::begin_panic_handler::{{closure}}::h857a5af4d92e8a99
   5:        0x1052a47c9 - std::sys_common::backtrace::__rust_end_short_backtrace::h23279e783e012d48
   6:        0x1052a7016 - _rust_begin_unwind
   7:        0x10530c072 - core::panicking::panic_fmt::hab9c0a7d422b7fc9
   8:        0x10edd40df - <rustc_const_eval[9139c8aae2a90707]::interpret::eval_context::InterpCx<rustc_const_eval[9139c8aae2a90707]::const_eval::dummy_machine::DummyMachine>>::float_to_float_or_int
   9:        0x10ee9296c - <rustc_mir_transform[d1db6ecce4b7b598]::known_panics_lint::ConstPropagator as rustc_middle[10991ae1fad52f46]::mir::visit::Visitor>::visit_assign
  10:        0x10ee951d2 - <rustc_mir_transform[d1db6ecce4b7b598]::known_panics_lint::ConstPropagator as rustc_middle[10991ae1fad52f46]::mir::visit::Visitor>::visit_basic_block_data
  11:        0x10ee8f61d - <rustc_mir_transform[d1db6ecce4b7b598]::known_panics_lint::ConstPropagator as rustc_middle[10991ae1fad52f46]::mir::visit::Visitor>::visit_body
  12:        0x10ee8bbaa - <rustc_mir_transform[d1db6ecce4b7b598]::known_panics_lint::KnownPanicsLint as rustc_mir_transform[d1db6ecce4b7b598]::pass_manager::MirLint>::run_lint
  13:        0x10ee2eedc - rustc_mir_transform[d1db6ecce4b7b598]::pass_manager::run_passes_inner
  14:        0x10eed4714 - rustc_mir_transform[d1db6ecce4b7b598]::run_analysis_to_runtime_passes
  15:        0x10eed42ba - rustc_mir_transform[d1db6ecce4b7b598]::mir_drops_elaborated_and_const_checked
  16:        0x10f492bfa - rustc_query_impl[10f139cddafaeae9]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[10f139cddafaeae9]::query_impl::mir_drops_elaborated_and_const_checked::dynamic_query::{closure#2}::{closure#0}, rustc_middle[10991ae1fad52f46]::query::erase::Erased<[u8; 8usize]>>
  17:        0x10f316e07 - rustc_query_system[78cc7b52ad177976]::query::plumbing::try_execute_query::<rustc_query_impl[10f139cddafaeae9]::DynamicConfig<rustc_query_system[78cc7b52ad177976]::query::caches::VecCache<rustc_span[293d940ddba48bf9]::def_id::LocalDefId, rustc_middle[10991ae1fad52f46]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[10f139cddafaeae9]::plumbing::QueryCtxt, false>
  18:        0x10f4a386b - rustc_query_impl[10f139cddafaeae9]::query_impl::mir_drops_elaborated_and_const_checked::get_query_non_incr::__rust_end_short_backtrace
  19:        0x10e7c48fa - rustc_interface[80562b29f4e45c6d]::passes::run_required_analyses
  20:        0x10e7c66d3 - rustc_interface[80562b29f4e45c6d]::passes::analysis
  21:        0x10f4930aa - rustc_query_impl[10f139cddafaeae9]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[10f139cddafaeae9]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[10991ae1fad52f46]::query::erase::Erased<[u8; 1usize]>>
  22:        0x10f270ede - rustc_query_system[78cc7b52ad177976]::query::plumbing::try_execute_query::<rustc_query_impl[10f139cddafaeae9]::DynamicConfig<rustc_query_system[78cc7b52ad177976]::query::caches::SingleCache<rustc_middle[10991ae1fad52f46]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[10f139cddafaeae9]::plumbing::QueryCtxt, false>
  23:        0x10f49d287 - rustc_query_impl[10f139cddafaeae9]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  24:        0x10df93547 - <rustc_interface[80562b29f4e45c6d]::queries::QueryResult<&rustc_middle[10991ae1fad52f46]::ty::context::GlobalCtxt>>::enter::<core[d803bfff9fdc95aa]::result::Result<(), rustc_span[293d940ddba48bf9]::ErrorGuaranteed>, rustc_driver_impl[8eb753b65fc6833d]::run_compiler::{closure#0}::{closure#1}::{closure#3}>
  25:        0x10dfea40d - rustc_interface[80562b29f4e45c6d]::interface::run_compiler::<core[d803bfff9fdc95aa]::result::Result<(), rustc_span[293d940ddba48bf9]::ErrorGuaranteed>, rustc_driver_impl[8eb753b65fc6833d]::run_compiler::{closure#0}>::{closure#1}
  26:        0x10dfd85a1 - std[46b01aaf7e2caa06]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[80562b29f4e45c6d]::util::run_in_thread_with_globals<rustc_interface[80562b29f4e45c6d]::util::run_in_thread_pool_with_globals<rustc_interface[80562b29f4e45c6d]::interface::run_compiler<core[d803bfff9fdc95aa]::result::Result<(), rustc_span[293d940ddba48bf9]::ErrorGuaranteed>, rustc_driver_impl[8eb753b65fc6833d]::run_compiler::{closure#0}>::{closure#1}, core[d803bfff9fdc95aa]::result::Result<(), rustc_span[293d940ddba48bf9]::ErrorGuaranteed>>::{closure#0}, core[d803bfff9fdc95aa]::result::Result<(), rustc_span[293d940ddba48bf9]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[d803bfff9fdc95aa]::result::Result<(), rustc_span[293d940ddba48bf9]::ErrorGuaranteed>>
  27:        0x10dff11b6 - <<std[46b01aaf7e2caa06]::thread::Builder>::spawn_unchecked_<rustc_interface[80562b29f4e45c6d]::util::run_in_thread_with_globals<rustc_interface[80562b29f4e45c6d]::util::run_in_thread_pool_with_globals<rustc_interface[80562b29f4e45c6d]::interface::run_compiler<core[d803bfff9fdc95aa]::result::Result<(), rustc_span[293d940ddba48bf9]::ErrorGuaranteed>, rustc_driver_impl[8eb753b65fc6833d]::run_compiler::{closure#0}>::{closure#1}, core[d803bfff9fdc95aa]::result::Result<(), rustc_span[293d940ddba48bf9]::ErrorGuaranteed>>::{closure#0}, core[d803bfff9fdc95aa]::result::Result<(), rustc_span[293d940ddba48bf9]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[d803bfff9fdc95aa]::result::Result<(), rustc_span[293d940ddba48bf9]::ErrorGuaranteed>>::{closure#2} as core[d803bfff9fdc95aa]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  28:        0x1052b105b - std::sys::pal::unix::thread::Thread::new::thread_start::h08bab28ee5f6d93f
  29:     0x7ff801f5318b - __pthread_start


rustc version: 1.80.0-nightly (9cdfe285c 2024-05-22)
platform: x86_64-apple-darwin

query stack during panic:
#0 [mir_drops_elaborated_and_const_checked] elaborating drops for `test`
#1 [analysis] running analysis passes on this crate
end of query stack

@Naserume Naserume 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 May 24, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label May 24, 2024
@matthiaskrgr
Copy link
Member

dupe of #122587

@matthiaskrgr matthiaskrgr closed this as not planned Won't fix, can't repro, duplicate, stale May 24, 2024
@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label May 24, 2024
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

4 participants