https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83215
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |alias, missed-optimization Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2018-11-16 Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- So in the end it is tree component_uses_parent_alias_set_from (const_tree t) { ... if (get_alias_set (TREE_TYPE (TREE_OPERAND (t, 0))) == 0) found = t; that causes this. The above is required for may_alias annotated types (so history tells me, but the testcase added for the change doesn't fail when removing the above). Today we handle may_alias via reference_alias_ptr_type_1 running into a dereference and checking the pointer for a ref-all type.