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: unassig...@gcc.gnu.org
        ReportedBy: ja...@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?

Reply via email to