------- Comment #2 from ebotcazou at gcc dot gnu dot org 2010-07-09 13:05 ------- > Can you elaborate? The relevant type for the MEM_REF is always that of the > base object, which is either a dereference (thus, of sth addressable) or > a decl (which can't be non-aliased as well, no?).
In 144t.optimized there is: aliasing3_pkg__pointer.18_1->a[1]{lb: 1 sz: 4} = 5; D.2290_6 = MEM[(integer *)&aliasing3_pkg__block].a[1]{lb: 1 sz: 4}; and the type (integer *) is wrong. But you're right, it's probably wrong before since there is in 014t.veclower: aliasing3_pkg__pointer.18 = aliasing3_pkg__pointer; aliasing3_pkg__pointer.18->a[1]{lb: 1 sz: 4} = 5; aliasing3_pkg.test (&aliasing3_pkg__block.a); and in 022t.cleanup_cfg: aliasing3_pkg__pointer.18 = aliasing3_pkg__pointer; aliasing3_pkg__pointer.18->a[1]{lb: 1 sz: 4} = 5; aliasing3_pkg.test.isra (&aliasing3_pkg__block.a[1]{lb: 1 sz: 4}); So it looks like IPA-SRA breaks TYPE_NONALIASED_COMPONENT here because it takes the address of a non-aliased component. -- ebotcazou at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Component|middle-end |tree-optimization http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44885