Comments (13)
Feel free to ping / assign me on any f16/f128 issues btw
from rust.
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)
from rust.
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
from rust.
that's expected, the float types are still being added and will panic, please don't fuzz them yet.
from rust.
the file is from the rustc repo, have you not read the ticket?
from rust.
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.
from rust.
mvce:
const b: f16 = 0.0f16;
pub fn main() {
let b = 0.0f16;
}
from rust.
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
from rust.
WG-prioritization assigning priority (Zulip discussion).
@rustbot label -I-prioritize +P-low
from rust.
Yeah, I will be updating Clippy after I have some slightly improved libs support
@rustbot claim
from rust.
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.
from rust.
@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:
from rust.
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
from rust.
Related Issues (20)
- tools depending on rustc crates can't build with `rust.download-rustc=true` and `llvm.download-ci-llvm=false` options HOT 3
- Intrinsics declared with wrong arg count ICE HOT 5
- compiletest: `run-rustfix` and `revisions` have broken interactions
- Greek question mark causes ICE HOT 2
- Lint against instantly-dangling pointers like `String::with_capacity(MAX_PATH).as_mut_ptr()` HOT 8
- `yield` without value from a `gen` block HOT 17
- Tracking Issue for stabilizing the sanitizers (e.g., AddressSanitizer, LeakSanitizer, MemorySanitizer, ThreadSanitizer) HOT 2
- Tracking issue for reviewing and moving sanitizers into a compiler crate (i.e., `rustc_sanitizers`) HOT 2
- Debuginfo tests sometimes run with the wrong Python version on MacOS HOT 8
- New error on nightly 'overflow evaluating the requirement' HOT 1
- Codegen significantly worse when using u128 rather than two u64 HOT 3
- ICE: `No HirID for DefId(...)` with feature `generic_assert` HOT 3
- Nonsensical suggested type using chumsky select! (E0284) HOT 5
- Confusing error message on using `step_by` and `take` on infinite iterator
- ICE: kcfi: `expected item, found (root_crate)` HOT 1
- ICE: kcfi: `unexpected parent of trait or impl item or item not found: ForeignMod` HOT 1
- ICE: kcfi: `cannot get associated-item of DefKey..` HOT 3
- patterns: wrong tracking issue? HOT 20
- Tracking Issue for pattern types HOT 1
- Async closure internal compiler error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust.