This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/49140] [4.6 regression] wrong code with -O2 and -O3, not with -O3 -no-inline
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 20 Jul 2011 17:40:09 +0000
- Subject: [Bug tree-optimization/49140] [4.6 regression] wrong code with -O2 and -O3, not with -O3 -no-inline
- Auto-submitted: auto-generated
- References: <bug-49140-4@http.gcc.gnu.org/bugzilla/>
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).