[Bug tree-optimization/49140] [4.6 regression] wrong code with -O2 and -O3, not with -O3 -no-inline
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jul 20 17:40:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49140
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #19 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-20 17:39:11 UTC ---
And that isn't the only bug in it, the inline asm also performs calls (which
modify the bytes right below the stack), but when this function is compiled
with -O1 and above (and not without -fno-inline), the function makes no
function calls, therefore it happily uses red-zone and the embedded calls in
the inline asm clobber the red-zone. Adding "sub rsp, 128;" and "add rsp,
128;" around the
whole inline asm content well, inside of the intel syntax, fixes the testcase
(of course, as written in the previous comment, it is still broken).
More information about the Gcc-bugs
mailing list