[Bug target/32450] -pg seemingly causes miscompilation
ubizjak at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Jul 4 14:11:00 GMT 2007
------- Comment #9 from ubizjak at gmail dot com 2007-07-04 14:11 -------
(In reply to comment #1)
> Most likely -pg is changing the alignment of the stack which is incorrect. Oh
> -pg code is emitted by the target specific code so this is a target issue.
Hm, on x86_64 pg inserts:
fprintf (file, "\tleaq\t%sP%d@(%%rip),%%r11\n", LPREFIX, labelno);
fprintf (file, "\tcall\t*%s@GOTPCREL(%%rip)\n", MCOUNT_NAME);
So, it loads %r11 and calls mcount. The only thing that can go wrong is, that
some value in %r11 gets rewritten. Could you look what happens with %r11 around
the point of failure?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32450
More information about the Gcc-bugs
mailing list