[Bug target/86340] GCC 8.1 produces broken code for m68k with optimization levels above -O1

michal.schulz at gmx dot de gcc-bugzilla@gcc.gnu.org
Fri Sep 28 14:42:00 GMT 2018


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

Michal Schulz <michal.schulz at gmx dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |michal.schulz at gmx dot de

--- Comment #5 from Michal Schulz <michal.schulz at gmx dot de> ---
Created attachment 44766
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44766&action=edit
File with correctly used "register" keyword

The bug can be closed. The AROS macros were using "register" keyword in wrong
way. Putting register keyword at that place of the code was fully legit but did
not guarantee register reservation. The fact that in case of -O0 or -O1
optimizations the expected behavior was pure coincidence.

Section pointing to correct and incorrect use of "register" keyword:
https://gcc.gnu.org/onlinedocs/gcc/Local-Register-Variables.html#Local-Register-Variables

AROS macros will be adjusted accordingly to attached file. The variables
"extracted" from predefined registers will still be marked with the register
keyword, but additionally, an empty extended asm forcing the output operands
will be put into code, as shown in the file.


More information about the Gcc-bugs mailing list