aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2023-11-28 12:36:21 +0100
committerRichard Biener <rguenther@suse.de>2024-06-04 10:07:30 +0200
commitb46486ef0316240eb3c173bda062b52333507e03 (patch)
treee676157a367cc6e599cf85ae8e5f6c9added03e2
parent8f6d889a8e609710ecfd555778fbff602b2c7d74 (diff)
downloadgcc-b46486ef0316240eb3c173bda062b52333507e03.zip
gcc-b46486ef0316240eb3c173bda062b52333507e03.tar.gz
gcc-b46486ef0316240eb3c173bda062b52333507e03.tar.bz2
middle-end/112732 - stray TYPE_ALIAS_SET in type variant
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. PR middle-end/112732 * tree.cc (build_opaque_vector_type): Reset TYPE_ALIAS_SET of the newly built type. (cherry picked from commit f26d68d5d128c86faaceeb81b1e8f22254ad53df)
-rw-r--r--gcc/tree.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree.cc b/gcc/tree.cc
index ead4c14..6b28eb9 100644
--- a/gcc/tree.cc
+++ b/gcc/tree.cc
@@ -10124,6 +10124,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;
}