* [PATCH] middle-end/112732 - stray TYPE_ALIAS_SET in type variant
@ 2023-11-28 15:56 Richard Biener
0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2023-11-28 15:56 UTC (permalink / raw)
To: gcc-patches
The following fixes a stray TYPE_ALIAS_SET in a type variant built
by build_opaque_vector_type which is diagnosed by type checking
enabled with -flto.
Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.
PR middle-end/112732
* tree.cc (build_opaque_vector_type): Reset TYPE_ALIAS_SET
of the newly built type.
---
gcc/tree.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gcc/tree.cc b/gcc/tree.cc
index e9f703e7237..10c6e1ecc58 100644
--- a/gcc/tree.cc
+++ b/gcc/tree.cc
@@ -10274,6 +10274,8 @@ build_opaque_vector_type (tree innertype, poly_int64 nunits)
TYPE_NEXT_VARIANT (cand) = TYPE_NEXT_VARIANT (t);
TYPE_NEXT_VARIANT (t) = cand;
TYPE_MAIN_VARIANT (cand) = TYPE_MAIN_VARIANT (t);
+ /* Type variants have no alias set defined. */
+ TYPE_ALIAS_SET (cand) = -1;
return cand;
}
--
2.35.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-11-28 15:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-28 15:56 [PATCH] middle-end/112732 - stray TYPE_ALIAS_SET in type variant Richard Biener
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).