This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/36960] Reference variable in virtually inherited base corrupted under optimization
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Jul 2008 00:01:41 -0000
- Subject: [Bug c++/36960] Reference variable in virtually inherited base corrupted under optimization
- References: <bug-36960-13248@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-07-29 00:01 -------
i = 0;
upper.D.2127.ref = &i;
upper.D.2125._vptr$Middle = &_ZTV5Upper + 12;
return *((struct Lower *) &upper + (long unsigned int) *(int *)
&_ZTV5Upper)->ref;
This works on the trunk correctly.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36960