From: Richard Biener Date: Tue, 28 Nov 2023 11:36:21 +0000 (+0100) Subject: middle-end/112732 - stray TYPE_ALIAS_SET in type variant X-Git-Tag: releases/gcc-11.5.0~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7879391bb2b86606d0ce35ed97eccc108970e36;p=thirdparty%2Fgcc.git 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.c (build_opaque_vector_type): Reset TYPE_ALIAS_SET of the newly built type. (cherry picked from commit f26d68d5d128c86faaceeb81b1e8f22254ad53df) --- diff --git a/gcc/tree.c b/gcc/tree.c index 8b5b0b7508cc..2cbdc7b65ba9 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -11098,6 +11098,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; }