------- Comment #14 from rguenth at gcc dot gnu dot org 2010-05-05 13:28
-------
Bah. Points-to analysis says:
# PT = { B } (glob)
B.0_8 = (struct T *) &B;
# PT =
D.2731_9 = B.0_8->l;
because B cannot have pointers. Well. That's obviously because points-to
uses types to determine that fact. Something that keeps points-to sets
and the graph small - but at the same time it causes us to optimize things
we previously didn't with -fno-strict-aliasing. The same will apply for
accesses with ref-all pointers :/ Which means we can't really do this
optimization at all. Ugh.
And yes, the code violates C aliasing rules.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43987