On Thu, Oct 15, 2020 at 02:39:26PM +0200, Jan Hubicka wrote:
> > Both of these tests FAIL everywhere:
> > FAIL: gcc.dg/ipa/modref-1.c (test for excess errors)
> > FAIL: gcc.dg/ipa/modref-1.c scan-ipa-dump modref "param offset: 1"
> > FAIL: gcc.dg/ipa/modref-1.c scan-ipa-dump modref "param offset: 2"
> > FAIL: gcc.dg/tree-ssa/modref-4.c (test for excess errors)
> > FAIL: gcc.dg/tree-ssa/modref-4.c scan-tree-dump modref1 "param offset: 1"
> > UNRESOLVED: gcc.dg/tree-ssa/modref-4.c scan-tree-dump modref2 "param 
> > offset: 2"
> > UNRESOLVED: gcc.dg/tree-ssa/modref-4.c scan-tree-dump modref2 "return 0"
> > 
> > I've tried to fix most of things, but
> > FAIL: gcc.dg/tree-ssa/modref-4.c scan-tree-dump modref1 "return 0"
> > remains (it isn't even optimized in optimized dump).
> > 
> > Committed to trunk as obvious anyway, but please tweak the modref-4.c
> > test according to what you meant.
> > 
> > 2020-10-15  Jakub Jelinek  <ja...@redhat.com>
> > 
> >     * gcc.dg/ipa/modref-1.c: Remove space between param offset: and number
> >     in scan-ipa-dump.
> >     (b): Declare return type to void.
> >     (main): Declare return type to int.  Change c to array of 3 chars.
> >     * gcc.dg/tree-ssa/modref-4.c: Remove space between param offset: and
> >     number in scan-ipa-dump.  Use modref1 instead of modref2.
> >     (b): Declare return type to void.
> >     (main): Declare return type to int.  Change c to array of 3 chars.
> Sorry for that - I had fixed versions of the testcases but must have
> mixed the up.   I will look at the reutrn 0 case.

Note that even if it optimized as much as it ever could, return 0 is not the
correct value, while c[0] is unmodified and the optimization
correctly proves that it isn't and optimizes it into 0, c[2] is modified -
it is changed from 0 to 1.  Perhaps you meant c[4]={0,1,0,0}; and check
if c[0]+c[3] is optimized into 0?

        Jakub

Reply via email to