[Bug other/122133] %cc[name] operand rejected in asm

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Oct 2 16:40:08 GMT 2025


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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|WAITING                     |RESOLVED

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This works:
```
void foo() { __asm__(".int %c[foo]" : : [foo]"i"(17)); }
```

Looks like clang accepts multiple letters operand modifiers and then only uses
the last one. GCC rejects them right out with an error message.


More information about the Gcc-bugs mailing list