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