Open matthiaskrgr opened 2 months ago
auto-reduced (treereduce-rust):
use std::arch::x86_64::{__m128, _mm_blend_ps}; pub fn arch() -> __m128 { let f = { |x, y| unsafe { _mm_blend_ps(x, y, { &const {} }) } }; f(x, y) }
original:
use std::arch::x86_64::{__m128, _mm_blend_ps}; pub fn arch( ) -> __m128 { let f = { |x, y| unsafe { _mm_blend_ps(x, y, { &const { InvariantRef::<'a>::NEW } }) }}; f(x, y) }
Version information
rustc 1.82.0-nightly (d626fbdc6 2024-08-16) binary: rustc commit-hash: d626fbdc66d667dd5beefb9e43bd2798485f7a44 commit-date: 2024-08-16 host: x86_64-unknown-linux-gnu release: 1.82.0-nightly LLVM version: 19.1.0
Command: /home/matthias/.rustup/toolchains/master/bin/rustc -Zincremental-verify-ich=yes -Cincremental=<dir> -Cdebuginfo=2
/home/matthias/.rustup/toolchains/master/bin/rustc -Zincremental-verify-ich=yes -Cincremental=<dir> -Cdebuginfo=2
``` error[E0425]: cannot find value `x` in this scope --> /tmp/icemaker_global_tempdir.JBgDV4vgI7p6/rustc_testrunner_tmpdir_reporting.FndBZ8q46rCS/mvce.rs:5:7 | 5 | f(x, y) | ^ help: a local variable with a similar name exists: `f` error[E0425]: cannot find value `y` in this scope --> /tmp/icemaker_global_tempdir.JBgDV4vgI7p6/rustc_testrunner_tmpdir_reporting.FndBZ8q46rCS/mvce.rs:5:10 | 5 | f(x, y) | ^ help: a local variable with a similar name exists: `f` warning: unnecessary braces around function argument --> /tmp/icemaker_global_tempdir.JBgDV4vgI7p6/rustc_testrunner_tmpdir_reporting.FndBZ8q46rCS/mvce.rs:4:50 | 4 | let f = { |x, y| unsafe { _mm_blend_ps(x, y, { &const {} }) } }; | ^^ ^^ | = note: `#[warn(unused_braces)]` on by default help: remove these braces | 4 - let f = { |x, y| unsafe { _mm_blend_ps(x, y, { &const {} }) } }; 4 + let f = { |x, y| unsafe { _mm_blend_ps(x, y, &const {}) } }; | error[E0601]: `main` function not found in crate `mvce` --> /tmp/icemaker_global_tempdir.JBgDV4vgI7p6/rustc_testrunner_tmpdir_reporting.FndBZ8q46rCS/mvce.rs:6:2 | 6 | } | ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.JBgDV4vgI7p6/rustc_testrunner_tmpdir_reporting.FndBZ8q46rCS/mvce.rs` error[E0308]: mismatched types --> /tmp/icemaker_global_tempdir.JBgDV4vgI7p6/rustc_testrunner_tmpdir_reporting.FndBZ8q46rCS/mvce.rs:4:52 | 4 | let f = { |x, y| unsafe { _mm_blend_ps(x, y, { &const {} }) } }; | ^^^^^^^^^ expected `i32`, found `&()` error: internal compiler error: compiler/rustc_middle/src/ty/typeck_results.rs:334:13: node_type: no type for node HirId(DefId(0:6 ~ mvce[3c83]::arch).15) (const `{}`) thread 'rustc' panicked at compiler/rustc_middle/src/ty/typeck_results.rs:334:13: Box stack backtrace: 0: 0x7ac7ecfb54dd - ::fmt::hbcb9f5cf12b14f47 1: 0x7ac7ed805297 - core::fmt::write::h10bda66e6bf714b2 2: 0x7ac7ee7cfa91 - std::io::Write::write_fmt::haaf2df02fc383af3 3: 0x7ac7ecfb7bbb - std::panicking::default_hook::{{closure}}::h103ad5f921545bf2 4: 0x7ac7ecfb782e - std::panicking::default_hook::h699e6afa04bbf2d2 5: 0x7ac7ec14c049 - std[8b2db094fc706015]::panicking::update_hook::>::{closure#0} 6: 0x7ac7ecfb84d7 - std::panicking::rust_panic_with_hook::h4b7c19967d3e4727 7: 0x7ac7ec186211 - std[8b2db094fc706015]::panicking::begin_panic::::{closure#0} 8: 0x7ac7ec1793f6 - std[8b2db094fc706015]::sys::backtrace::__rust_end_short_backtrace::::{closure#0}, !> 9: 0x7ac7ec1793a6 - std[8b2db094fc706015]::panicking::begin_panic:: 10: 0x7ac7ec18f391 - ::emit_producing_guarantee 11: 0x7ac7ec751b84 - rustc_middle[83734a3cfd7912b4]::util::bug::opt_span_bug_fmt::::{closure#0} 12: 0x7ac7ec737e6a - rustc_middle[83734a3cfd7912b4]::ty::context::tls::with_opt::::{closure#0}, !>::{closure#0} 13: 0x7ac7ec737d1b - rustc_middle[83734a3cfd7912b4]::ty::context::tls::with_context_opt::::{closure#0}, !>::{closure#0}, !> 14: 0x7ac7ea21a100 - rustc_middle[83734a3cfd7912b4]::util::bug::bug_fmt 15: 0x7ac7ee0052cb - rustc_mir_build[a568d047590b32ed]::thir::cx::thir_body 16: 0x7ac7ee003592 - rustc_query_impl[ecaf2260d0180310]::plumbing::__rust_begin_short_backtrace::> 17: 0x7ac7edc3111a - rustc_query_system[fa82f4068ff2e0d1]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[ecaf2260d0180310]::plumbing::QueryCtxt, true> 18: 0x7ac7edc308d4 - rustc_query_impl[ecaf2260d0180310]::query_impl::thir_body::get_query_incr::__rust_end_short_backtrace 19: 0x7ac7edff43a2 - rustc_mir_build[a568d047590b32ed]::thir::pattern::check_match::check_match 20: 0x7ac7edff3b1b - rustc_query_impl[ecaf2260d0180310]::plumbing::__rust_begin_short_backtrace::> 21: 0x7ac7edbbbe53 - rustc_query_system[fa82f4068ff2e0d1]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[ecaf2260d0180310]::plumbing::QueryCtxt, true> 22: 0x7ac7ed986701 - rustc_query_impl[ecaf2260d0180310]::query_impl::check_match::get_query_incr::__rust_end_short_backtrace 23: 0x7ac7ee00a092 - rustc_mir_build[a568d047590b32ed]::build::mir_build 24: 0x7ac7ee00974e - rustc_query_impl[ecaf2260d0180310]::plumbing::__rust_begin_short_backtrace::> 25: 0x7ac7edabd20a - rustc_query_system[fa82f4068ff2e0d1]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[ecaf2260d0180310]::plumbing::QueryCtxt, true> 26: 0x7ac7edbc7bdc - rustc_query_impl[ecaf2260d0180310]::query_impl::mir_built::get_query_incr::__rust_end_short_backtrace 27: 0x7ac7ee0a61ed - rustc_mir_transform[d1eb952f32b25668]::mir_const_qualif 28: 0x7ac7ee0a60f7 - rustc_query_impl[ecaf2260d0180310]::plumbing::__rust_begin_short_backtrace::> 29: 0x7ac7ee0a4059 - rustc_query_system[fa82f4068ff2e0d1]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[ecaf2260d0180310]::plumbing::QueryCtxt, true> 30: 0x7ac7ee0a3a0a - rustc_query_impl[ecaf2260d0180310]::query_impl::mir_const_qualif::get_query_incr::__rust_end_short_backtrace 31: 0x7ac7edff02da - rustc_mir_transform[d1eb952f32b25668]::mir_promoted 32: 0x7ac7edfefc52 - rustc_query_impl[ecaf2260d0180310]::plumbing::__rust_begin_short_backtrace::> 33: 0x7ac7edc3117b - rustc_query_system[fa82f4068ff2e0d1]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[ecaf2260d0180310]::plumbing::QueryCtxt, true> 34: 0x7ac7edc307d4 - rustc_query_impl[ecaf2260d0180310]::query_impl::mir_promoted::get_query_incr::__rust_end_short_backtrace 35: 0x7ac7ee928b93 - rustc_query_impl[ecaf2260d0180310]::plumbing::__rust_begin_short_backtrace::> 36: 0x7ac7edabd20a - rustc_query_system[fa82f4068ff2e0d1]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[ecaf2260d0180310]::plumbing::QueryCtxt, true> 37: 0x7ac7edbc7f74 - rustc_query_impl[ecaf2260d0180310]::query_impl::mir_borrowck::get_query_incr::__rust_end_short_backtrace 38: 0x7ac7ee274344 - rustc_interface[3c61e9c6fae1d8f5]::passes::run_required_analyses 39: 0x7ac7ee34041e - rustc_interface[3c61e9c6fae1d8f5]::passes::analysis 40: 0x7ac7ee3403f1 - rustc_query_impl[ecaf2260d0180310]::plumbing::__rust_begin_short_backtrace::> 41: 0x7ac7ee81724d - rustc_query_system[fa82f4068ff2e0d1]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[ecaf2260d0180310]::plumbing::QueryCtxt, true> 42: 0x7ac7ee816efa - rustc_query_impl[ecaf2260d0180310]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace 43: 0x7ac7ee60062a - rustc_interface[3c61e9c6fae1d8f5]::interface::run_compiler::, rustc_driver_impl[fd132fbcc7c8abf5]::run_compiler::{closure#0}>::{closure#1} 44: 0x7ac7ee5d5d10 - std[8b2db094fc706015]::sys::backtrace::__rust_begin_short_backtrace::, rustc_driver_impl[fd132fbcc7c8abf5]::run_compiler::{closure#0}>::{closure#1}, core[5472d93c6cba957b]::result::Result<(), rustc_span[f1a14652fe04e1f9]::ErrorGuaranteed>>::{closure#0}, core[5472d93c6cba957b]::result::Result<(), rustc_span[f1a14652fe04e1f9]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[5472d93c6cba957b]::result::Result<(), rustc_span[f1a14652fe04e1f9]::ErrorGuaranteed>> 45: 0x7ac7ee5d637a - <::spawn_unchecked_, rustc_driver_impl[fd132fbcc7c8abf5]::run_compiler::{closure#0}>::{closure#1}, core[5472d93c6cba957b]::result::Result<(), rustc_span[f1a14652fe04e1f9]::ErrorGuaranteed>>::{closure#0}, core[5472d93c6cba957b]::result::Result<(), rustc_span[f1a14652fe04e1f9]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[5472d93c6cba957b]::result::Result<(), rustc_span[f1a14652fe04e1f9]::ErrorGuaranteed>>::{closure#1} as core[5472d93c6cba957b]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} 46: 0x7ac7ee5d66eb - std::sys::pal::unix::thread::Thread::new::thread_start::h7504247ad105ec0b 47: 0x7ac7efdc739d - 48: 0x7ac7efe4c49c - 49: 0x0 - 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.82.0-nightly (d626fbdc6 2024-08-16) running on x86_64-unknown-linux-gnu note: compiler flags: -Z incremental-verify-ich=yes -C incremental=[REDACTED] -C debuginfo=2 query stack during panic: #0 [thir_body] building THIR for `arch::{closure#0}::{constant#0}` #1 [check_match] match-checking `arch::{closure#0}::{constant#0}` end of query stack error: aborting due to 5 previous errors; 1 warning emitted Some errors have detailed explanations: E0308, E0425, E0601. For more information about an error, try `rustc --explain E0308`. ```
Regression in nightly-2024-02-09 probably #120550
smaller:
use std::arch::x86_64::_mm_blend_ps; pub fn main() { _mm_blend_ps(1, 2, &const {} ); }
auto-reduced (treereduce-rust):
original:
Version information
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc -Zincremental-verify-ich=yes -Cincremental=<dir> -Cdebuginfo=2
Program output
``` error[E0425]: cannot find value `x` in this scope --> /tmp/icemaker_global_tempdir.JBgDV4vgI7p6/rustc_testrunner_tmpdir_reporting.FndBZ8q46rCS/mvce.rs:5:7 | 5 | f(x, y) | ^ help: a local variable with a similar name exists: `f` error[E0425]: cannot find value `y` in this scope --> /tmp/icemaker_global_tempdir.JBgDV4vgI7p6/rustc_testrunner_tmpdir_reporting.FndBZ8q46rCS/mvce.rs:5:10 | 5 | f(x, y) | ^ help: a local variable with a similar name exists: `f` warning: unnecessary braces around function argument --> /tmp/icemaker_global_tempdir.JBgDV4vgI7p6/rustc_testrunner_tmpdir_reporting.FndBZ8q46rCS/mvce.rs:4:50 | 4 | let f = { |x, y| unsafe { _mm_blend_ps(x, y, { &const {} }) } }; | ^^ ^^ | = note: `#[warn(unused_braces)]` on by default help: remove these braces | 4 - let f = { |x, y| unsafe { _mm_blend_ps(x, y, { &const {} }) } }; 4 + let f = { |x, y| unsafe { _mm_blend_ps(x, y, &const {}) } }; | error[E0601]: `main` function not found in crate `mvce` --> /tmp/icemaker_global_tempdir.JBgDV4vgI7p6/rustc_testrunner_tmpdir_reporting.FndBZ8q46rCS/mvce.rs:6:2 | 6 | } | ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.JBgDV4vgI7p6/rustc_testrunner_tmpdir_reporting.FndBZ8q46rCS/mvce.rs` error[E0308]: mismatched types --> /tmp/icemaker_global_tempdir.JBgDV4vgI7p6/rustc_testrunner_tmpdir_reporting.FndBZ8q46rCS/mvce.rs:4:52 | 4 | let f = { |x, y| unsafe { _mm_blend_ps(x, y, { &const {} }) } }; | ^^^^^^^^^ expected `i32`, found `&()` error: internal compiler error: compiler/rustc_middle/src/ty/typeck_results.rs:334:13: node_type: no type for node HirId(DefId(0:6 ~ mvce[3c83]::arch).15) (const `{}`) thread 'rustc' panicked at compiler/rustc_middle/src/ty/typeck_results.rs:334:13: Box
stack backtrace:
0: 0x7ac7ecfb54dd - ::fmt::hbcb9f5cf12b14f47
1: 0x7ac7ed805297 - core::fmt::write::h10bda66e6bf714b2
2: 0x7ac7ee7cfa91 - std::io::Write::write_fmt::haaf2df02fc383af3
3: 0x7ac7ecfb7bbb - std::panicking::default_hook::{{closure}}::h103ad5f921545bf2
4: 0x7ac7ecfb782e - std::panicking::default_hook::h699e6afa04bbf2d2
5: 0x7ac7ec14c049 - std[8b2db094fc706015]::panicking::update_hook::>::{closure#0}
6: 0x7ac7ecfb84d7 - std::panicking::rust_panic_with_hook::h4b7c19967d3e4727
7: 0x7ac7ec186211 - std[8b2db094fc706015]::panicking::begin_panic::::{closure#0}
8: 0x7ac7ec1793f6 - std[8b2db094fc706015]::sys::backtrace::__rust_end_short_backtrace::::{closure#0}, !>
9: 0x7ac7ec1793a6 - std[8b2db094fc706015]::panicking::begin_panic::
10: 0x7ac7ec18f391 - ::emit_producing_guarantee
11: 0x7ac7ec751b84 - rustc_middle[83734a3cfd7912b4]::util::bug::opt_span_bug_fmt::::{closure#0}
12: 0x7ac7ec737e6a - rustc_middle[83734a3cfd7912b4]::ty::context::tls::with_opt::::{closure#0}, !>::{closure#0}
13: 0x7ac7ec737d1b - rustc_middle[83734a3cfd7912b4]::ty::context::tls::with_context_opt::::{closure#0}, !>::{closure#0}, !>
14: 0x7ac7ea21a100 - rustc_middle[83734a3cfd7912b4]::util::bug::bug_fmt
15: 0x7ac7ee0052cb - rustc_mir_build[a568d047590b32ed]::thir::cx::thir_body
16: 0x7ac7ee003592 - rustc_query_impl[ecaf2260d0180310]::plumbing::__rust_begin_short_backtrace::>
17: 0x7ac7edc3111a - rustc_query_system[fa82f4068ff2e0d1]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[ecaf2260d0180310]::plumbing::QueryCtxt, true>
18: 0x7ac7edc308d4 - rustc_query_impl[ecaf2260d0180310]::query_impl::thir_body::get_query_incr::__rust_end_short_backtrace
19: 0x7ac7edff43a2 - rustc_mir_build[a568d047590b32ed]::thir::pattern::check_match::check_match
20: 0x7ac7edff3b1b - rustc_query_impl[ecaf2260d0180310]::plumbing::__rust_begin_short_backtrace::>
21: 0x7ac7edbbbe53 - rustc_query_system[fa82f4068ff2e0d1]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[ecaf2260d0180310]::plumbing::QueryCtxt, true>
22: 0x7ac7ed986701 - rustc_query_impl[ecaf2260d0180310]::query_impl::check_match::get_query_incr::__rust_end_short_backtrace
23: 0x7ac7ee00a092 - rustc_mir_build[a568d047590b32ed]::build::mir_build
24: 0x7ac7ee00974e - rustc_query_impl[ecaf2260d0180310]::plumbing::__rust_begin_short_backtrace::>
25: 0x7ac7edabd20a - rustc_query_system[fa82f4068ff2e0d1]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[ecaf2260d0180310]::plumbing::QueryCtxt, true>
26: 0x7ac7edbc7bdc - rustc_query_impl[ecaf2260d0180310]::query_impl::mir_built::get_query_incr::__rust_end_short_backtrace
27: 0x7ac7ee0a61ed - rustc_mir_transform[d1eb952f32b25668]::mir_const_qualif
28: 0x7ac7ee0a60f7 - rustc_query_impl[ecaf2260d0180310]::plumbing::__rust_begin_short_backtrace::>
29: 0x7ac7ee0a4059 - rustc_query_system[fa82f4068ff2e0d1]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[ecaf2260d0180310]::plumbing::QueryCtxt, true>
30: 0x7ac7ee0a3a0a - rustc_query_impl[ecaf2260d0180310]::query_impl::mir_const_qualif::get_query_incr::__rust_end_short_backtrace
31: 0x7ac7edff02da - rustc_mir_transform[d1eb952f32b25668]::mir_promoted
32: 0x7ac7edfefc52 - rustc_query_impl[ecaf2260d0180310]::plumbing::__rust_begin_short_backtrace::>
33: 0x7ac7edc3117b - rustc_query_system[fa82f4068ff2e0d1]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[ecaf2260d0180310]::plumbing::QueryCtxt, true>
34: 0x7ac7edc307d4 - rustc_query_impl[ecaf2260d0180310]::query_impl::mir_promoted::get_query_incr::__rust_end_short_backtrace
35: 0x7ac7ee928b93 - rustc_query_impl[ecaf2260d0180310]::plumbing::__rust_begin_short_backtrace::>
36: 0x7ac7edabd20a - rustc_query_system[fa82f4068ff2e0d1]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[ecaf2260d0180310]::plumbing::QueryCtxt, true>
37: 0x7ac7edbc7f74 - rustc_query_impl[ecaf2260d0180310]::query_impl::mir_borrowck::get_query_incr::__rust_end_short_backtrace
38: 0x7ac7ee274344 - rustc_interface[3c61e9c6fae1d8f5]::passes::run_required_analyses
39: 0x7ac7ee34041e - rustc_interface[3c61e9c6fae1d8f5]::passes::analysis
40: 0x7ac7ee3403f1 - rustc_query_impl[ecaf2260d0180310]::plumbing::__rust_begin_short_backtrace::>
41: 0x7ac7ee81724d - rustc_query_system[fa82f4068ff2e0d1]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[ecaf2260d0180310]::plumbing::QueryCtxt, true>
42: 0x7ac7ee816efa - rustc_query_impl[ecaf2260d0180310]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
43: 0x7ac7ee60062a - rustc_interface[3c61e9c6fae1d8f5]::interface::run_compiler::, rustc_driver_impl[fd132fbcc7c8abf5]::run_compiler::{closure#0}>::{closure#1}
44: 0x7ac7ee5d5d10 - std[8b2db094fc706015]::sys::backtrace::__rust_begin_short_backtrace::, rustc_driver_impl[fd132fbcc7c8abf5]::run_compiler::{closure#0}>::{closure#1}, core[5472d93c6cba957b]::result::Result<(), rustc_span[f1a14652fe04e1f9]::ErrorGuaranteed>>::{closure#0}, core[5472d93c6cba957b]::result::Result<(), rustc_span[f1a14652fe04e1f9]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[5472d93c6cba957b]::result::Result<(), rustc_span[f1a14652fe04e1f9]::ErrorGuaranteed>>
45: 0x7ac7ee5d637a - <::spawn_unchecked_, rustc_driver_impl[fd132fbcc7c8abf5]::run_compiler::{closure#0}>::{closure#1}, core[5472d93c6cba957b]::result::Result<(), rustc_span[f1a14652fe04e1f9]::ErrorGuaranteed>>::{closure#0}, core[5472d93c6cba957b]::result::Result<(), rustc_span[f1a14652fe04e1f9]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[5472d93c6cba957b]::result::Result<(), rustc_span[f1a14652fe04e1f9]::ErrorGuaranteed>>::{closure#1} as core[5472d93c6cba957b]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
46: 0x7ac7ee5d66eb - std::sys::pal::unix::thread::Thread::new::thread_start::h7504247ad105ec0b
47: 0x7ac7efdc739d -
48: 0x7ac7efe4c49c -
49: 0x0 -
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.82.0-nightly (d626fbdc6 2024-08-16) running on x86_64-unknown-linux-gnu
note: compiler flags: -Z incremental-verify-ich=yes -C incremental=[REDACTED] -C debuginfo=2
query stack during panic:
#0 [thir_body] building THIR for `arch::{closure#0}::{constant#0}`
#1 [check_match] match-checking `arch::{closure#0}::{constant#0}`
end of query stack
error: aborting due to 5 previous errors; 1 warning emitted
Some errors have detailed explanations: E0308, E0425, E0601.
For more information about an error, try `rustc --explain E0308`.
```