This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/49140] [4.6 regression] wrong code with -O2 and -O3, not with -O3 -no-inline


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).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]