aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/utils.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2010-10-25 17:44:05 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2010-10-25 17:44:05 +0000
commit3bd6ca3f11e73f380b4bfa327fa84eb3ea7c68fa (patch)
tree67216bfc58d92117407b469fde87c6996575c7b9 /gcc/ada/gcc-interface/utils.c
parent8c211c83bba629be6318b5b3fba7137cf633ef9a (diff)
downloadgcc-3bd6ca3f11e73f380b4bfa327fa84eb3ea7c68fa.zip
gcc-3bd6ca3f11e73f380b4bfa327fa84eb3ea7c68fa.tar.gz
gcc-3bd6ca3f11e73f380b4bfa327fa84eb3ea7c68fa.tar.bz2
utils.c (update_pointer_to): Clear TYPE_POINTER_TO and TYPE_REFERENCE_TO of the old type after redirecting...
* gcc-interface/utils.c (update_pointer_to): Clear TYPE_POINTER_TO and TYPE_REFERENCE_TO of the old type after redirecting its pointer and reference types. From-SVN: r165926
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
-rw-r--r--gcc/ada/gcc-interface/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index b70c6b7..1a5081d 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -3427,6 +3427,7 @@ update_pointer_to (tree old_type, tree new_type)
for (; ptr; ptr = TYPE_NEXT_PTR_TO (ptr))
for (t = TYPE_MAIN_VARIANT (ptr); t; t = TYPE_NEXT_VARIANT (t))
TREE_TYPE (t) = new_type;
+ TYPE_POINTER_TO (old_type) = NULL_TREE;
/* Chain REF and its variants at the end. */
new_ref = TYPE_REFERENCE_TO (new_type);
@@ -3443,6 +3444,7 @@ update_pointer_to (tree old_type, tree new_type)
for (; ref; ref = TYPE_NEXT_REF_TO (ref))
for (t = TYPE_MAIN_VARIANT (ref); t; t = TYPE_NEXT_VARIANT (t))
TREE_TYPE (t) = new_type;
+ TYPE_REFERENCE_TO (old_type) = NULL_TREE;
}
/* Now deal with the unconstrained array case. In this case the pointer