------- Comment #4 from pinskia at gcc dot gnu dot org  2006-09-21 04:23 -------
may_alias_p returns true
for:
(gdb) p debug_generic_expr (ptr)
xaD.1527
(gdb) p debug_generic_expr (var)
SMT.5D.1548


(In reply to comment #2)
> So, actually, i'm pretty sure they should have the same SMT, because they
> should be in the same alias set.
They are not the exact same aliasing set but conflicting ones.

> Why do they get different SMT's?
Because of this:
  /* To avoid creating unnecessary memory tags, only create one memory tag
     per alias set class.  Note that it may be tempting to group
     memory tags based on conflicting alias sets instead of
     equivalence.  That would be wrong because alias sets are not
     necessarily transitive (as demonstrated by the libstdc++ test
     23_containers/vector/cons/4.cc).  Given three alias sets A, B, C
     such that conflicts (A, B) == true and conflicts (A, C) == true,
     it does not necessarily follow that conflicts (B, C) == true.  */

But I don't see how saying more than one thing conflicts, we get wrong code out
of it.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.2 Regression]            |[4.2 Regression]
                   |Misscompilation due to      |Misscompilation with structs
                   |struct alias                |due to  new struct alias


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29156

Reply via email to