This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/38334] New: pmf accesses violate strict-aliasing rules
- 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: 30 Nov 2008 17:03:07 -0000
- Subject: [Bug c++/38334] New: pmf accesses violate strict-aliasing rules
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
For g++.dg/opt/pmf1.C we generate
struct Container t;
...
<bb 3>:
D.1857_10 = (int (*__vtbl_ptr_type) (void) * *) &t;
D.1858_11 = *D.1857_10;
a strict-aliasing warning is created if SRA is enabled and PR36509 is fixed.
The frontend should probably use a ref-all pointer for the access.
--
Summary: pmf accesses violate strict-aliasing rules
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
OtherBugsDependingO 36509
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38334