[PATCH] testsuite: add -fno-tree-fre in gcc.dg/guality
Hu, Jiangping
hujiangping@cn.fujitsu.com
Thu Aug 27 11:13:50 GMT 2020
Hi, Richard, Jakub
Thanks for reply.
I'm not sure about if the case should fail.
So, I add Jakub who committed this testcase.
I thought the case should success, but for changes of gcc of
years, now it failed. So I think that may be some optimization
are unnecessary for this testcase, and I found the FRE.
> Huh well - I guess it should be XFAILed instead? But then we see
> XPASSes. Disabling
> FRE doesn't look correct - we _do_ want the test to succeed here. Did
> you analyze
> why it fails?
Do you mean the reason may be in gcc, not in this testcase?
If so, I'll do more debug.
>
> It looks like we assign 'a' a register at RTL expansion time for -Og
> but do not perform any
> fancy tracking of components of it then. On GIMPLE we assume it's
> eventually
> memory and thus wouldn't bother with any debug stmts.
>
> So it's a genuine FAIL for -Og at least. That said, the logic is simple -
> both
> a.i and a.j need to be available for a.i + a.j to be evaluated. For
> some reasons
> we fail to record where their value resides. For -Og they are in
> %rbp, resp. %rbx.
> But obviously some elaborate DWARF is necessary to convey that info.
I tried -gdwarf options, but it makes no difference.
Jakub, what do you think?
Regards!
Hujp
>
> Richard.
>
> > Regards!
> > hujp
> >
> > ---
> > gcc/testsuite/gcc.dg/guality/sra-1.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/gcc/testsuite/gcc.dg/guality/sra-1.c
> b/gcc/testsuite/gcc.dg/guality/sra-1.c
> > index 8ad57cf3f8e..94ea29dd727 100644
> > --- a/gcc/testsuite/gcc.dg/guality/sra-1.c
> > +++ b/gcc/testsuite/gcc.dg/guality/sra-1.c
> > @@ -1,6 +1,6 @@
> > /* PR debug/43983 */
> > /* { dg-do run } */
> > -/* { dg-options "-g -fno-ipa-icf" } */
> > +/* { dg-options "-g -fno-tree-fre -fno-ipa-icf" } */
> >
> > struct A { int i; int j; };
> > struct B { int : 4; int i : 12; int j : 12; int : 4; };
> > --
> > 2.17.1
> >
> >
> >
>
More information about the Gcc-patches
mailing list