“error: invalid operand for inline asm constraint 'i'” with enum members #42974
Labels
A-inline-assembly
Area: Inline assembly (`asm!(…)`)
C-bug
Category: This is a bug.
requires-nightly
This issue requires a nightly compiler in some way.
Hello,
It looks like in some cases (ie. not enough optimizations turned on), enum members cannot be used as 'i' operands for inline assembly:
http://play.integer32.com/?gist=befc6872b583ffaa1609f081b7536b50&version=nightly
Given this is (with macros, maybe?) the only use I can think of 'i' operands, I think it is reasonable to say the 'i' operand is currently broken.
This would be solved by even the slightest level of constant folding, so I think even in debug mode it should actually constant fold to something that builds, and not have successful compilation be dependent of the specific compiler version and flags used (as is currently the case).
The text was updated successfully, but these errors were encountered: