public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r9-9727] Fix internal error on pointer-to-pointer binding in LTO mode
@ 2021-09-14 8:47 Eric Botcazou
0 siblings, 0 replies; only message in thread
From: Eric Botcazou @ 2021-09-14 8:47 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:fdd80fb7b64ff32f93e12e6aeac56b9761c0a73b
commit r9-9727-gfdd80fb7b64ff32f93e12e6aeac56b9761c0a73b
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Tue Sep 14 10:44:34 2021 +0200
Fix internal error on pointer-to-pointer binding in LTO mode
gcc/ada/
* gcc-interface/utils.c (update_pointer_to): Set TYPE_CANONICAL on
pointer and reference types.
Diff:
---
gcc/ada/gcc-interface/utils.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index 882802a19e4..acfb60c3e37 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -4144,6 +4144,7 @@ update_pointer_to (tree old_type, tree new_type)
TREE_TYPE (t) = new_type;
if (TYPE_NULL_BOUNDS (t))
TREE_TYPE (TREE_OPERAND (TYPE_NULL_BOUNDS (t), 0)) = new_type;
+ TYPE_CANONICAL (t) = TYPE_CANONICAL (TYPE_POINTER_TO (new_type));
}
/* Chain REF and its variants at the end. */
@@ -4160,7 +4161,10 @@ update_pointer_to (tree old_type, tree new_type)
/* Now adjust them. */
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;
+ {
+ TREE_TYPE (t) = new_type;
+ TYPE_CANONICAL (t) = TYPE_CANONICAL (TYPE_REFERENCE_TO (new_type));
+ }
TYPE_POINTER_TO (old_type) = NULL_TREE;
TYPE_REFERENCE_TO (old_type) = NULL_TREE;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-09-14 8:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-14 8:47 [gcc r9-9727] Fix internal error on pointer-to-pointer binding in LTO mode Eric Botcazou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).