This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/32450] -pg seemingly causes miscompilation
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Jul 2007 14:11:26 -0000
- Subject: [Bug target/32450] -pg seemingly causes miscompilation
- References: <bug-32450-6642@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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