[Bug c++/56715] Explicit Reg Vars are being ignored for consts when using g++

goswin-v-b at web dot de gcc-bugzilla@gcc.gnu.org
Mon Mar 25 00:07:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56715

--- Comment #2 from Goswin von Brederlow <goswin-v-b at web dot de> 2013-03-25 00:07:19 UTC ---
(In reply to comment #1)
> const is a bit special in C++, it can be used as part of a const integer
> expression which is what is happening here.

How does that make it right to ignore the register specification? Or how do you
specify which register to use to pass the constant to asm in a specific
register?

To me it seems wrong to ignore the asm("r4") without even a warning. This does
break asm() statements that expect specific registers to be used.



More information about the Gcc-bugs mailing list