On Thu, 20 Apr 2017, Jakub Jelinek wrote: > On Wed, Apr 19, 2017 at 08:22:23AM +0200, Jakub Jelinek wrote: > > Here in (so far untested) patch form: > > > > 2017-04-19 Jakub Jelinek <ja...@redhat.com> > > > > PR middle-end/80423 > > * tree.h (build_array_type): Add typeless_storage default argument. > > * tree.c (type_cache_hasher::equal): Also compare > > TYPE_TYPELESS_STORAGE flag for ARRAY_TYPEs. > > (build_array_type): Add typeless_storage argument, set > > TYPE_TYPELESS_STORAGE to it, if shared also hash it, and pass to > > recursive call. > > (build_nonshared_array_type): Adjust build_array_type_1 caller. > > (build_array_type): Likewise. Add typeless_storage argument. > > c-family/ > > * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE. > > cp/ > > * tree.c (build_cplus_array_type): Call build_array_type > > with the intended TYPE_TYPELESS_STORAGE flag value, instead > > of calling build_array_type and modifying later TYPE_TYPELESS_STORAGE > > on the shared type. > > testsuite/ > > * g++.dg/other/pr80423.C: New test. > > Just for completeness, it bootstrapped/regtested successfully on x86_64-linux > and i686-linux.
Ok. Richard.