This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, pretty-ipa] Fix an ice when creating a fancy decl for one element arrays in intra-SRA
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 18 Mar 2009 15:47:30 +0100
- Subject: Re: [PATCH, pretty-ipa] Fix an ice when creating a fancy decl for one element arrays in intra-SRA
- References: <20090317185003.GC19025@virgil.suse.cz> <20090318143658.GA11203@kam.mff.cuni.cz>
On Wed, Mar 18, 2009 at 3:36 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> Hi,
>>
>> as ?it is, ?my ?new ?intraprocedural intra-SRA ?ICEs ?on Tramp3D ?when
>> creating a fancy declaration name ?for an ARRAY_REF because it expects
>> the index ?to be ?a constant. ? However, when the ?array has ?only one
>> element that ?is not ?necessarily the case. ? The patch ?below handles
>> this case by bailing out gracefully.
>
> It is quite amazing you can match this pattern. ?Where do you derrive
> the information that offset must be 0 because array has single element?
> Just out of curiosity :)
> It would probably make a lot of setnse to fold this earlier so the array
> ref become handled component ref too.
get_ref_base_and_extent provides this information.
Richard.