diff options
author | Richard Stallman <rms@gnu.org> | 1993-05-05 03:18:13 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1993-05-05 03:18:13 +0000 |
commit | 84db222add1bde080bbcd48e53a8e8009296eb48 (patch) | |
tree | 984808e953bd465f6751f6b4d72ef2cc68e62385 /gcc | |
parent | a394b17b086af9eced8e17c8d459ccf07e22cb6c (diff) | |
download | gcc-84db222add1bde080bbcd48e53a8e8009296eb48.zip gcc-84db222add1bde080bbcd48e53a8e8009296eb48.tar.gz gcc-84db222add1bde080bbcd48e53a8e8009296eb48.tar.bz2 |
(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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/tree.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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; |