Commit dacdc68f by Eric Botcazou Committed by Eric Botcazou

decl.c (array_type_has_nonaliased_component): Return false if the component type is a pointer.

	* gcc-interface/decl.c (array_type_has_nonaliased_component): Return
	false if the component type is a pointer.

From-SVN: r257344
parent ee034d31
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> 2018-01-11 Gary Dismukes <dismukes@adacore.com>
* exp_ch3.adb (Default_Initialize_Object): Call New_Copy_Tree on the * exp_ch3.adb (Default_Initialize_Object): Call New_Copy_Tree on the
......
...@@ -6113,6 +6113,11 @@ array_type_has_nonaliased_component (tree gnu_type, Entity_Id gnat_type) ...@@ -6113,6 +6113,11 @@ array_type_has_nonaliased_component (tree gnu_type, Entity_Id gnat_type)
return TYPE_NONALIASED_COMPONENT (gnu_parent_type); 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. */ /* Otherwise, rely exclusively on properties of the element type. */
return type_for_nonaliased_component_p (TREE_TYPE (gnu_type)); return type_for_nonaliased_component_p (TREE_TYPE (gnu_type));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment