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

Stefan "Bebbo" Franke <stefan at franke dot ms> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |stefan at franke dot ms

--- Comment #4 from Stefan "Bebbo" Franke <stefan at franke dot ms> ---
Created attachment 65218
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65218&action=edit
Minimal m68k test case showing that GCC 13–16 drop the required a0 = 0
initialization for constant inline‑asm operands, breaking the AmigaOS graphics
ABI.

This attachment contains a minimal m68k test case demonstrating a regression in
GCC 13–16 where inline asm operands bound to fixed registers are incorrectly
optimized away. Specifically, when a constant argument is bound to register a0
and passed to inline asm via an "rf" constraint, newer GCC versions generate a
pseudo register (e.g., r32 = 0) and later eliminate it, resulting in a0 never
being initialized. The final assembly omits the required a0 = 0 assignment,
breaking the AmigaOS graphics ABI. The test accepts any valid zeroing sequence
for a0 and fails on affected GCC versions.

Reply via email to