* gcc-interface/decl.c (array_type_has_nonaliased_component): Return
false if the component type is a pointer.
From-SVN: r257344
+2018-02-02 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
+ false if the component type is a pointer.
+
2018-01-11 Gary Dismukes <dismukes@adacore.com>
* exp_ch3.adb (Default_Initialize_Object): Call New_Copy_Tree on the
return TYPE_NONALIASED_COMPONENT (gnu_parent_type);
}
+ /* Consider that an array of pointers has an aliased component, which is
+ sort of logical and helps with Taft Amendment types in LTO mode. */
+ if (POINTER_TYPE_P (TREE_TYPE (gnu_type)))
+ return false;
+
/* Otherwise, rely exclusively on properties of the element type. */
return type_for_nonaliased_component_p (TREE_TYPE (gnu_type));
}