This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix decode_field_reference ICE (PR middle-end/89091)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]