diff options
author | Jason Merrill <jason@redhat.com> | 2012-12-06 15:20:34 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2012-12-06 15:20:34 -0500 |
commit | 0fe4913b32f81a2265c15976791059401ad938c8 (patch) | |
tree | 6b6cf5b4c93298b53e94a9550b9e965221f3ddaa /gcc/tree.c | |
parent | 84fd832c033bea574a835ca680e7b84d2027798d (diff) | |
download | gcc-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.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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) |