[Bug tree-optimization/49019] New: [4.4 Regression] Spurious aliasing warning with boost:optional
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue May 17 11:49:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49019
Summary: [4.4 Regression] Spurious aliasing warning with
boost:optional
Product: gcc
Version: 4.4.6
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: jakub@gcc.gnu.org
On the attached testcase with g++ -O2 -Wall g++ emits a couple of
/home/ts/pack/boost_1_46_1/boost/optional/optional.hpp:346: warning:
dereferencing pointer ‘pretmp.811’ does break strict-aliasing rules
warnings. Works fine with 4.3, or 4.5/4.6/4.7 (on the trunk it went away
with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=147805 which is clearly
not backportable) or with -fno-tree-pre -fno-tree-fre.
The warning is about a pointer var with def_stmt being & of a may_alias union
inside aligned_storage, wonder why if (bitmap_empty_p (pi->pt_vars)) is true
in find_what_p_points_to and doesn't say at least that it can point to what it
has been initialized to. Richard, is there anything that can be done about
this
for 4.4, or is it too risky?
More information about the Gcc-bugs
mailing list