This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix middle-end/81737
- From: Marek Polacek <polacek at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 7 Aug 2017 11:09:59 +0200
- Subject: Re: [PATCH] Fix middle-end/81737
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=polacek at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 61E385D698
- References: <20170807084751.GC17069@redhat.com> <20170807085809.GJ2123@tucnak>
On Mon, Aug 07, 2017 at 10:58:09AM +0200, Jakub Jelinek wrote:
> On Mon, Aug 07, 2017 at 10:47:51AM +0200, Marek Polacek wrote:
> > In my recent change I failed to check whether the type domain
> > of a type is non-NULL and this goof causes crashing on this
> > testcase.
> > Bootstrapped/regtested on x86_64-linux, ok for trunk?
> > 2017-08-07 Marek Polacek <email@example.com>
> > PR middle-end/81737
> > * fold-const.c (fold_indirect_ref_1): Check type_domain.
> > * gcc.dg/pr81737.c: New test.
> The old code was assuming size_zero_node if type_domain is NULL
> or TYPE_MIN_VALUE is NULL, which is reasonable for C/C++, but indeed might
> be wrong perhaps for Fortran or Ada.
Yeah, I did what Richi suggested doing in
> Hopefully nothing will assume this has to be folded in these cases (mainly
> thinking about C++ constexpr).
We'll see soon I suspect ;).
> So ok.