This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix TYPE_TYPELESS_STORAGE handling (PR middle-end/80423)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: Jason Merrill <jason at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 20 Apr 2017 08:21:24 +0200
- Subject: Re: [PATCH] Fix TYPE_TYPELESS_STORAGE handling (PR middle-end/80423)
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 0F57631F3F8
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0F57631F3F8
- References: <20170418151430.GZ1809@tucnak> <23D6ECD4-AA6B-4139-8E16-C9142B90B66D@suse.de> <20170419055630.GC1809@tucnak> <20170419062223.GC1777@tucnak>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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 <jakub@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.
Jakub