This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Do not emit SAVE_EXPR for already assigned SSA_NAMEs (PR71606).
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Martin Liška <mliska at suse dot cz>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 7 Jul 2016 16:15:16 +0200
- Subject: Re: [PATCH] Do not emit SAVE_EXPR for already assigned SSA_NAMEs (PR71606).
- Authentication-results: sourceware.org; auth=none
- References: <6fa65cba-96b8-dba8-f8ef-015d458f0fc2@suse.cz> <5077293.gQ0hIDoeKU@polaris> <20160623105402.GA7387@tucnak.redhat.com> <11926512.6fPxIOe1Oe@polaris> <CAFiYyc3vSfR_XZDQMLxWTLN-KVTK2f566rnsE3x94auhVnFHRw@mail.gmail.com> <91d5c7a5-7bdb-5007-977d-3a214caca8b0@suse.cz>
On Thu, Jul 7, 2016 at 4:01 PM, Martin Liška <mliska@suse.cz> wrote:
> On 07/01/2016 12:15 PM, Richard Biener wrote:
>> IMHO using fold-convert in this case is bogus and ideally the testcase
>> should have been diagnosed.
>>
>> fold_convertible_p has a comment
>>
>> /* Returns true, if ARG is convertible to TYPE using a NOP_EXPR. *
>>
>> but clearly it isn't generating just a NOP_EXPR (or VIEW_CONVERT_EXPR
>> or other single operation) here.
>>
>> So that is the thing to fix. The way we build / insert the init stmts
>> can also be improved by properly
>> gimplifying the rhs first but of course that likely runs into the
>> SAVE_EXPR case you mentioned.
>>
>> Richard.
>
> Hello Richard.
>
> I've tried to mark COMPLEX_TYPE as not acceptable by fold_convertible_p,
> which fixes the ICE and regression and bootstrap on x86_64-linux-gnu also looks
> fine.
>
> Is it sufficient, or we would need more sophisticated approach to handle the PR?
I think it's fine though the inliners initializer handling looks
incredibly fragile to me ;)
Richard.
> Thanks,
> Martin