From: Richard Stallman Date: Wed, 5 May 1993 03:18:13 +0000 (+0000) Subject: (build_array_type): The main variant of an array type X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=84db222add1bde080bbcd48e53a8e8009296eb48;p=gcc.git (build_array_type): The main variant of an array type should always be an array whose element type is the main variant. From-SVN: r4328 --- diff --git a/gcc/tree.c b/gcc/tree.c index 7f13a3e696c..3953c43b83c 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -2792,6 +2792,12 @@ build_array_type (elt_type, index_type) TREE_TYPE (t) = elt_type; TYPE_DOMAIN (t) = index_type; + /* The main variant of an array type should always + be an array whose element type is the main variant. */ + if (elt_type != TYPE_MAIN_VARIANT (elt_type)) + TYPE_MAIN_VARIANT (t) = build_array_type (TYPE_MAIN_VARIANT (elt_type), + index_type); + if (index_type == 0) return t;