This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Small fix for walking constructors
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Bernd Schmidt <bernds at codesourcery dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 22 Sep 2014 10:58:08 +0200
- Subject: Re: Small fix for walking constructors
- Authentication-results: sourceware.org; auth=none
- References: <541B2C24 dot 9010703 at codesourcery dot com> <541B42CC dot 8010400 at redhat dot com>
On Thu, Sep 18, 2014 at 10:38 PM, Jeff Law <law@redhat.com> wrote:
> On 09/18/14 13:01, Bernd Schmidt wrote:
>>
>> This fixes an issue on ptx where we fail to output a declaration for a
>> variable. The testcase is c-torture/compile/pr34856.c, and the cause of
>> the problem is that the variable g is never inserted into the varpool,
>> which is where a future patch will look for references to variables not
>> defined in the current translation unit (ptx assembly requires
>> declarations for these too).
>>
>> Bootstrapped and tested on x86_64-linux, ok?
>>
>>
>> Bernd
>>
>> walk-more.diff
>>
>>
>> commit 968a508fdd5c413147b9c26d37633bf7ab7a7e65
>> Author: Bernd Schmidt<bernds@codesourcery.com>
>> Date: Thu Sep 11 14:35:01 2014 +0200
>>
>> Fix handling of CONSTRUCTORs in gimple-walk.
>>
>> * gimple-walk.c (walk_stmt_load_store_addr_ops): Look past casts
>> when
>> dealing with CONSTRUCTORs.
>
> OK.
Errr - certainly not.
It seems to me that walk_stmt_load_store_addr_ops is called on
bogus input. The function is supposed to be called on GIMPLE
stmts and in GIMPLE stmts CONSTRUCTORs may _not_ have
conversions in their elements.
Please revert if you have applied already.
Thanks,
Richard.
> Jeff
>