This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/30252] [4.2 regression] miscompilation of sigc++-2.0 based code with -fstrict-aliasing
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Jun 2007 12:05:18 -0000
- Subject: [Bug c++/30252] [4.2 regression] miscompilation of sigc++-2.0 based code with -fstrict-aliasing
- References: <bug-30252-7958@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #31 from rguenth at gcc dot gnu dot org 2007-06-05 12:05 -------
The problem in this PR is, that the structure we mess up points-to info has no
fields in its lower half, but only two varinfos (D.2860, offset 128 size 64
and D.2860.visited_, offset 192 size 64 -- the first one is actually
D.2860.func_ptr_, but we name the first after the decl always). Now, there
_is_
a structure at offset zero, D.2857 (size 192), which contains D.2860.func_ptr_.
So we fail to have a varinfo for the offset the expression &D.2860.D.2857
points
to and we loose the first varinfo wrongly during the &this_18->functor_
addition of 64.
Now, either we need to generate fake varinfos for the 'holes' we end up with,
or just punt here.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30252