[PATCH] Revert an __int20ish get_ref_base_and_extent change (PR c++/69355)

Jeff Law law@redhat.com
Thu Jan 21 02:55:00 GMT 2016


On 01/20/2016 05:03 PM, Jakub Jelinek wrote:
> Hi!
>
> Among the __int20 changes was one that made get_ref_base_and_extent behave
> differently from similar get_inner_reference, e.g. for XFmode long double
> or structures containing just a single long double member,
> get_ref_base_and_extent now returns on x86 80 instead of 96 or 128 which
> the type spans in memory.  For a function that returns the extent IMHO
> the bitsize is right, it also seems to allow SRA from scalarizing such
> accesses (which it doesn't otherwise), and on the testcase below also
> triggers some SRA bug that causes even wrong-code.  Martin said he will have
> a look at SRA, but this patch will make that bug just latent issue.
> DJ said his msp430 testing didn't reveal anything that would need the
> precision there in this case (at least that is how I understood it).
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> 2016-01-21  Jakub Jelinek  <jakub@redhat.com>
>
> 	PR c++/69355
> 	* tree-dfa.c (get_ref_base_and_extent): Use GET_MODE_BITSIZE (mode)
> 	for bitsize instead of GET_MODE_PRECISION (mode).
>
> 	* g++.dg/torture/pr69355.C: New test.
Wasn't this discussed in IRC and approved there?  Isn't this patch just 
making get_ref_base_and_extent consistent with get_inner_reference, 
right?  If so, approved.

Jeff



More information about the Gcc-patches mailing list