Compiler crashes when using object instead of reference to object for input to inline assembly #40885
Labels
A-inline-assembly
Area: Inline assembly (`asm!(…)`)
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Compiler crashes when using object instead of reference to object for input to inline assembly
Ran into this while trying to use Intel's lidt instruction. It takes a single operand (the address to a structure in memory containing the size and location of your new Interrupt Descriptor Table) and loads the new IDT. I had mistakenly given the struct object as an input instead of a reference to the struct object and compiling that inline asm statement caused the compiler to crash.
Here's the code with the asm! line that crashed the compiler:
Here's the fixed code that works:
Here's the error I got:
Here's the backtrace:
The text was updated successfully, but these errors were encountered: