From 3bd6ca3f11e73f380b4bfa327fa84eb3ea7c68fa Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Mon, 25 Oct 2010 17:44:05 +0000 Subject: 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 --- gcc/ada/gcc-interface/utils.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/ada/gcc-interface/utils.c') 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 -- cgit v1.1