public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r15-734] ada: Fix oversight in previous change
@ 2024-05-21 7:31 Marc Poulhi?s
0 siblings, 0 replies; only message in thread
From: Marc Poulhi?s @ 2024-05-21 7:31 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:0715ed49b40311e9b2715f63308a970195dd2417
commit r15-734-g0715ed49b40311e9b2715f63308a970195dd2417
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Thu Dec 14 13:05:52 2023 +0100
ada: Fix oversight in previous change
In rare cases, types using structural equality may reach relate_alias_sets.
gcc/ada/
* gcc-interface/utils.cc (relate_alias_sets): Restore previous code
when the type uses structural equality.
Diff:
---
gcc/ada/gcc-interface/utils.cc | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/gcc/ada/gcc-interface/utils.cc b/gcc/ada/gcc-interface/utils.cc
index b628481335d..ae520542ace 100644
--- a/gcc/ada/gcc-interface/utils.cc
+++ b/gcc/ada/gcc-interface/utils.cc
@@ -1867,8 +1867,11 @@ relate_alias_sets (tree new_type, tree old_type, enum alias_set_op op)
&& TYPE_NONALIASED_COMPONENT (new_type)
!= TYPE_NONALIASED_COMPONENT (old_type)));
- /* The alias set always lives on the TYPE_CANONICAL. */
- TYPE_ALIAS_SET (TYPE_CANONICAL (new_type)) = get_alias_set (old_type);
+ /* The alias set is a property of the TYPE_CANONICAL if it exists. */
+ if (TYPE_STRUCTURAL_EQUALITY_P (new_type))
+ TYPE_ALIAS_SET (new_type) = get_alias_set (old_type);
+ else
+ TYPE_ALIAS_SET (TYPE_CANONICAL (new_type)) = get_alias_set (old_type);
break;
case ALIAS_SET_SUBSET:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-05-21 7:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-21 7:31 [gcc r15-734] ada: Fix oversight in previous change Marc Poulhi?s
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).