------- Comment #5 from rguenth at gcc dot gnu dot org 2007-12-07 23:47 ------- We don't warn with -Wstrict-aliasing=3 first because we prune the points-to sets based on TBAA which makes o.11_19 in
o.11_19 = (const struct const_iterator *) &D.2360; # VUSE <D.2360_76> D.2362_20 = o.11_19->i; point to anything. If you "fix" that with Index: tree-ssa-structalias.c =================================================================== --- tree-ssa-structalias.c (revision 130692) +++ tree-ssa-structalias.c (working copy) @@ -5014,7 +5014,7 @@ find_what_p_points_to (tree p) set_uids_in_ptset (p, finished_solution, vi->solution, vi->directly_dereferenced, - vi->no_tbaa_pruning); + true);/*vi->no_tbaa_pruning);*/ result = shared_bitmap_lookup (finished_solution); if (!result) we don't warn either, possibly because the machinery in tree-ssa-alias-warnings.c does not handle pointers to locals(?) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34385