This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/39207] [4.4 Regression] Strict aliasing warnings in libstdc++ headers
- 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: 17 Feb 2009 10:59:27 -0000
- Subject: [Bug tree-optimization/39207] [4.4 Regression] Strict aliasing warnings in libstdc++ headers
- References: <bug-39207-87@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from rguenth at gcc dot gnu dot org 2009-02-17 10:59 -------
Ok, that was easy. I thought I had fixed that already... what happens is
that we warn if we pruned the points-to set to { NULL } as well (I have a
patch for emitting 'dereferencing NULL pointer', but that triggers in dead
code during bootstrap).
Likely this case is from dead code as well. All cases look like
<bb 13>:
SR.124_23 = &__y_22->D.15162;
D.17759_25 = (struct _Rb_tree_node *) &best_scores._M_t._M_impl._M_header;
D.17760_26 = &D.17759_25->D.15162;
if (SR.124_23 == D.17760_26)
goto <bb 19>;
else
goto <bb 14>;
<bb 14>:
__x.43_27 = (const struct _Rb_tree_node *) SR.124_23;
# VUSE <D.17842_279(ab), SMT.310_289(ab), SMT.314_293(ab)>
D.18448_101 = D.15081_1->_M_dataplus._M_p;
D.18449_102 = (struct _Rep *) D.18448_101;
D.18450_103 = D.18449_102 + -12;
# VUSE <SMT.311_290(ab), SMT.312_291(ab)>
D.18451_104 = D.18450_103->D.11464._M_length;
# __size_296 = VDEF <__size_282(ab)>
__size = D.18451_104;
# VUSE <SMT.310_289(ab), SMT.312_291(ab)>
D.18452_105 = __x.43_27->_M_value_field.first._M_dataplus._M_p;
where __x.43_27 is the offending pointer here. __y_22 points to
{ NULL best_scores.32+32 }, best_scores.32+32 may not be accessed through
__x.43_27 and so is pruned.
I have a patch.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39207