summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-23 20:19:55 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-23 20:19:55 +0000
commit1e7f9b29eacd09ca29682b6a49f8380b043f5838 (patch)
tree71553c6a056ea4de36d6b1fceaa939faebe56c19
parent094bca960ae104219ae1fe3bcf81fef38e624e75 (diff)
downloadgcc-1e7f9b29eacd09ca29682b6a49f8380b043f5838.tar.gz
* gcc-interfaces/utils.c (update_pointer_to): In the unconstrained
array case, merge the alias set of the old pointer type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162488 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/gcc-interface/utils.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 1ef253c4494..29618da8ecd 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,10 @@
2010-07-23 Eric Botcazou <ebotcazou@adacore.com>
+ * gcc-interfaces/utils.c (update_pointer_to): In the unconstrained
+ array case, merge the alias set of the old pointer type.
+
+2010-07-23 Eric Botcazou <ebotcazou@adacore.com>
+
* gcc-interface/utils.c (gnat_types_compatible_p): Revert latest change
and recurse only for multidimensional array types instead.
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index 7752edb4b68..eed426a3cd8 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -3510,6 +3510,7 @@ update_pointer_to (tree old_type, tree new_type)
DECL_FIELD_CONTEXT (bounds_field) = new_ptr;
for (t = new_ptr; t; last = t, t = TYPE_NEXT_VARIANT (t))
TYPE_FIELDS (t) = TYPE_FIELDS (ptr);
+ TYPE_ALIAS_SET (new_ptr) = TYPE_ALIAS_SET (ptr);
/* Chain PTR and its variants at the end. */
TYPE_NEXT_VARIANT (last) = TYPE_MAIN_VARIANT (ptr);