This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix decode_field_reference ICE (PR middle-end/89091)
- From: Jeff Law <law at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>, Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 20 Feb 2019 15:55:47 -0700
- Subject: Re: [PATCH] Fix decode_field_reference ICE (PR middle-end/89091)
- References: <20190220222904.GP2135@tucnak>
On 2/20/19 3:29 PM, Jakub Jelinek wrote:
> Hi!
>
> The following testcase ICEs, because we have *pbitsize 65 and
> lang_hooks.types.type_for_size returns NULL for that. The following patch
> punts in that case, but makes sure we punt before overwriting *exp_, because
> the caller uses it regardless of whether decode_field_reference returns NULL
> or not.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> David has proposed to also change c_common_type_for_size to handle the 65 to
> 127 bit bitsizes, but that looks too risky for me for GCC 9, although if you
> think it can go in now, David has a patch for that.
>
> 2019-02-20 Jakub Jelinek <jakub@redhat.com>
> David Malcolm <dmalcolm@redhat.com>
>
> PR middle-end/89091
> * fold-const.c (decode_field_reference): Return NULL_TREE if
> lang_hooks.types.type_for_size returns NULL. Check it before
> overwriting *exp_. Use return NULL_TREE instead of return 0.
>
> * gcc.dg/torture/pr89091.c: New test.
OK. I'd wait on handling the additional bitsizes, it doesn't seem like
it deserves gcc-9 consideration to me.
jeff