[Bug target/60062] [4.7/4.9 Regression] wrong code (for code with the optimize attribute) at -O1 and above on x86_64-linux-gnu in 32-bit mode
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 5 08:23:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60062
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 32043
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32043&action=edit
gcc49-pr60062.patch
The problem is that !!optimize determines calling convention on i?86 -m32 in
some cases, but for calling conventions the caller and callee obviously have to
agree on that, but !!optimize when optimize attribute comes into the picture is
whether the current function is optimized. So, on the testcase, it is true for
the callee and false for the caller. The attached untested patch fixes that by
considering whether the callee is optimized instead.
More information about the Gcc-bugs
mailing list