-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 when combining asm_const
and const_refs_to_static
#129462
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
folkertdev
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
Aug 23, 2024
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Aug 23, 2024
looks like here rust/compiler/rustc_borrowck/src/type_check/mod.rs Lines 385 to 388 in b5723af
the case of the |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Sep 5, 2024
…m-const, r=lcnr fix ICE when `asm_const` and `const_refs_to_static` are combined fixes rust-lang#129462 fixes rust-lang#126896 fixes rust-lang#124164 I think this is a case that was missed in the fix for rust-lang#125558, which inserts a type error in the case of an invalid (that is, non-integer) type being passed to an asm `const` operand. I'm not 100% sure that `span_mirbug_and_err` is the right macro here, but it is used earlier with `builtin_deref` and seems to do the trick. r? `@lcnr`
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this issue
Sep 6, 2024
…m-const, r=lcnr fix ICE when `asm_const` and `const_refs_to_static` are combined fixes rust-lang#129462 fixes rust-lang#126896 fixes rust-lang#124164 I think this is a case that was missed in the fix for rust-lang#125558, which inserts a type error in the case of an invalid (that is, non-integer) type being passed to an asm `const` operand. I'm not 100% sure that `span_mirbug_and_err` is the right macro here, but it is used earlier with `builtin_deref` and seems to do the trick. r? ```@lcnr```
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this issue
Sep 6, 2024
…m-const, r=lcnr fix ICE when `asm_const` and `const_refs_to_static` are combined fixes rust-lang#129462 fixes rust-lang#126896 fixes rust-lang#124164 I think this is a case that was missed in the fix for rust-lang#125558, which inserts a type error in the case of an invalid (that is, non-integer) type being passed to an asm `const` operand. I'm not 100% sure that `span_mirbug_and_err` is the right macro here, but it is used earlier with `builtin_deref` and seems to do the trick. r? ````@lcnr````
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Sep 6, 2024
Rollup merge of rust-lang#129472 - folkertdev:const-refs-to-static-asm-const, r=lcnr fix ICE when `asm_const` and `const_refs_to_static` are combined fixes rust-lang#129462 fixes rust-lang#126896 fixes rust-lang#124164 I think this is a case that was missed in the fix for rust-lang#125558, which inserts a type error in the case of an invalid (that is, non-integer) type being passed to an asm `const` operand. I'm not 100% sure that `span_mirbug_and_err` is the right macro here, but it is used earlier with `builtin_deref` and seems to do the trick. r? ``@lcnr``
saethlin
removed
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Sep 7, 2024
lnicola
pushed a commit
to lnicola/rust-analyzer
that referenced
this issue
Sep 25, 2024
…r=lcnr fix ICE when `asm_const` and `const_refs_to_static` are combined fixes rust-lang/rust#129462 fixes #126896 fixes #124164 I think this is a case that was missed in the fix for rust-lang/rust#125558, which inserts a type error in the case of an invalid (that is, non-integer) type being passed to an asm `const` operand. I'm not 100% sure that `span_mirbug_and_err` is the right macro here, but it is used earlier with `builtin_deref` and seems to do the trick. r? ``@lcnr``
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.
I suspect the compiler continues in an inconsistent state for too long after emitting the (correct) error message.
related issues
const_refs_to_static
#128183const
operands in inline asm #125558 implemented theasm_const
error messagesCode
Note that this code should not compile today. Pointer types are not allowed in the
asm!
const
expression, only integer types are.https://godbolt.org/z/3fv5E6E4v,
Meta
rustc --version --verbose
:specifically commit b5723af
Error output
Backtrace
The text was updated successfully, but these errors were encountered: