This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PING, PR 43141] Create ABSTRACT_ORIGIN for decls changed by IPA-SRA
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 1 Apr 2010 13:41:28 +0100
- Subject: Re: [PING, PR 43141] Create ABSTRACT_ORIGIN for decls changed by IPA-SRA
- References: <20100311230147.GA2369@alvy.suse.cz> <6dc9ffc81003150602s71717818y53e4382b468989f1@mail.gmail.com> <20100319175242.GD13470@virgil.suse.cz> <20100319191943.GO2817@tyan-ft48-01.lab.bos.redhat.com> <20100322183834.GA7917@virgil.suse.cz> <20100401122449.GB30453@virgil.suse.cz>
On Thu, Apr 1, 2010 at 1:24 PM, Martin Jambor <mjambor@suse.cz> wrote:
> Ping.
The new testcase is ok.
Thanks,
Richard.
> Thanks,
>
> Martin
>
> On Mon, Mar 22, 2010 at 07:38:34PM +0100, Martin Jambor wrote:
>> Hi,
>>
>> On Fri, Mar 19, 2010 at 08:19:43PM +0100, Jakub Jelinek wrote:
>> > On Fri, Mar 19, 2010 at 06:52:42PM +0100, Martin Jambor wrote:
>> > > > It should be "tree-optimization".
>> > > >
>> > > > > ? ? ? ?* tree-sra.c (create_abstract_origin): New function.
>> > > > > ? ? ? ?(modify_function): Call create_abstract_origin.
>> > > > >
>> > > >
>> > > > Is that possible to add a testcase to gcc.dg/guality?
>> > > >
>> > >
>> > > Can I add a guality test just to check for a presence of a declaration
>> > > - even if we cannot determine its value? ?All the guality tests I
>> > > found verified that gdb reports that a variable has an expected value
>> > > but no information about the value of the removed unused parameter
>> > > (which can be anything) is stored in the debug info.
>> >
>> > Perhaps something like:
>> > /* { dg-final { gdb-test LINENO "sizeof (i)" "sizeof (int)" } } */
>> > I bet with the patch reverted when i isn't in scope at all it will
>> > fail, and succeed otherwise.
>> >
>>
>> Thanks, I wouldn't have thought about that, the patch below does
>> exactly that. ?I have tested it on i686-linux with
>>
>> ? make -j2 -k check RUNTESTFLAGS="guality.exp"
>>
>> and all the new tests passed except for the -flto and -fwhopr
>> variants, which ended up as UNSUPPORTED. ?That did not surprise me but
>> what did a little bit is that when I reverted the fix for PR 43141 the
>> -O2 and -O3 did not FAIL but ended up as UNSUPPORTED too. ?If that is
>> fine, I'd like to commit the patch to trunk.
>>
>> Thanks again,
>>
>> Martin
>>
>>
>> 2010-03-22 ?Martin Jambor ?<mjambor@suse.cz>
>>
>> ? ? ? PR tree-optimization/43141
>> ? ? ? * testsuite/gcc.dg/guality/pr43141.c: New test.
>>
>>
>> Index: gcc/testsuite/gcc.dg/guality/pr43141.c
>> ===================================================================
>> --- gcc/testsuite/gcc.dg/guality/pr43141.c ? ?(revision 0)
>> +++ gcc/testsuite/gcc.dg/guality/pr43141.c ? ?(revision 0)
>> @@ -0,0 +1,16 @@
>> +/* { dg-do run } */
>> +/* { dg-options "-g" } */
>> +
>> +int i;
>> +static int f(int) __attribute ((noinline));
>> +static int f(int x)
>> +{
>> + ?return i;
>> +}
>> +
>> +int main()
>> +{
>> + ?return f(42);
>> +}
>> +
>> +/* { dg-final { gdb-test 8 "sizeof (x)" "sizeof (int)" } } */
>