[Bug c/126552] const-qualified local register variable used as an asm operand is silently discarded

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jul 31 19:03:36 GMT 2026


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126552

--- Comment #1 from Drea Pinski <pinskia at gcc dot gnu.org> ---
This happens in the front-end:
"rf" 0B

For both C and C++ front-ends.

For GCC 16+ you should be using hard register constraints instead:
https://gcc.gnu.org/onlinedocs/gcc-16.1.0/gcc/Hard-Register-Constraints.html


More information about the Gcc-bugs mailing list