diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2018-02-02 18:09:58 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2018-02-02 18:09:58 +0000 |
commit | dacdc68f3bd5e7c4de0dd54f9dcb1465686ac01a (patch) | |
tree | 68191fae7ddfba51fd55ae27bfe30d1659ab4d37 /gcc | |
parent | ee034d3108105353a2130a2d0d3630e5f8214811 (diff) | |
download | gcc-dacdc68f3bd5e7c4de0dd54f9dcb1465686ac01a.zip gcc-dacdc68f3bd5e7c4de0dd54f9dcb1465686ac01a.tar.gz gcc-dacdc68f3bd5e7c4de0dd54f9dcb1465686ac01a.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/decl.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index aa69c92..e0e72a7 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +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 diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index e8c48c7..e0466f3 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -6113,6 +6113,11 @@ array_type_has_nonaliased_component (tree gnu_type, Entity_Id gnat_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. */ return type_for_nonaliased_component_p (TREE_TYPE (gnu_type)); } |