aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2012-12-06 15:20:34 -0500
committerJason Merrill <jason@gcc.gnu.org>2012-12-06 15:20:34 -0500
commit0fe4913b32f81a2265c15976791059401ad938c8 (patch)
tree6b6cf5b4c93298b53e94a9550b9e965221f3ddaa /gcc/tree.c
parent84fd832c033bea574a835ca680e7b84d2027798d (diff)
downloadgcc-0fe4913b32f81a2265c15976791059401ad938c8.zip
gcc-0fe4913b32f81a2265c15976791059401ad938c8.tar.gz
gcc-0fe4913b32f81a2265c15976791059401ad938c8.tar.bz2
re PR c++/55032 (Internal compiler error: in strip_typedefs, at cp/tree.c:1199)
PR c++/55032 * tree.c (build_array_type_1): Re-layout if we found it in the hash table. From-SVN: r194265
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 7cacb2a..429db49 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -7505,7 +7505,12 @@ build_array_type_1 (tree elt_type, tree index_type, bool shared)
hashval_t hashcode = iterative_hash_object (TYPE_HASH (elt_type), 0);
if (index_type)
hashcode = iterative_hash_object (TYPE_HASH (index_type), hashcode);
+ tree old_t = t;
t = type_hash_canon (hashcode, t);
+ if (t != old_t)
+ /* Lay it out again in case the element type has been completed since
+ the array was added to the hash table. */
+ layout_type (t);
}
if (TYPE_CANONICAL (t) == t)