RFA: PATCH to build_array_type_1 for c++/55032 (array template argument)

Jason Merrill jason@redhat.com
Thu Dec 6 16:07:00 GMT 2012


In this PR, strip_typedefs rebuilds an array type without any typedefs 
and then gets confused when the rebuilt type has a different TYPE_ALIGN 
than the typedef-using type.  This happens because the rebuilt type was 
found in the type_hash_canon hash table, and was originally built before 
the element type was complete, so the rebuilt type hasn't been laid out 
yet.  Since we already do layout_type in build_array_type_1, it seems 
appropriate that it should always return a laid out type, so this patch 
causes us to repeat the layout if we found the type already in the hash 
table.

Tested x86_64-pc-linux-gnu.  OK for 4.7 and 4.8?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 55032.patch
Type: text/x-patch
Size: 1378 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20121206/4d2b2163/attachment.bin>


More information about the Gcc-patches mailing list