[PATCH 5/5] "Fix" the rest of the fallouts of new intra-SRA
Richard Guenther
rguenther@suse.de
Tue Apr 28 13:05:00 GMT 2009
On Tue, 28 Apr 2009, Martin Jambor wrote:
> The following patch amends testcases (rather than the compiler) so
> that they not fail with the new intra-SRA.
>
> The FRE testcases rely on the fact that SRA does not scalarize unions.
> The new one, however, does. Therefore I simply switched SRA off for
> them. Hopefully that is the correct thing to do.
>
> The gfortran.dg/pr25923.f90 expects a weird warning that I do not give
> out because the new SRA does not scalarize anything in that particular
> testcase because the individual fields of the structure are never
> accessed individually. An unpatched compiler with -fno-tree-sra also
> does not give any warning. I believe it was left there as potentially
> uselful and not misleading but I tent to believe it's not really
> required...
Hm. The PR was about garbled warning messages and the warning itself
does look correct (and useful). But it indeed does not make sense
for SRA to scalarize the return value. Thus I think it is more
appropriate to XFAIL the warning.
> With the previous and this patch, there are no regressions in the
> testsuite on x86_64-linux-gnu. I have even bootstrapped and tested
> Ada.
The FRE testcase changes are ok. XFAILing the fortran testcase is also
ok if there are no objections from the Fortran maintainers (CCed).
Thanks,
Richard.
> Thanks,
>
> Martin
>
>
> 2009-04-27 Martin Jambor <mjambor@suse.cz>
>
> * gfortran.dg/pr25923.f90: Remove warning expectation.
> * gcc.dg/tree-ssa/ssa-fre-7.c: Compile with -fno-tree-sra.
> * gcc.dg/tree-ssa/ssa-fre-8.c: Likewise.
> * gcc.dg/tree-ssa/ssa-fre-9.c: Likewise.
>
>
> Index: mine/gcc/testsuite/gfortran.dg/pr25923.f90
> ===================================================================
> --- mine.orig/gcc/testsuite/gfortran.dg/pr25923.f90
> +++ mine/gcc/testsuite/gfortran.dg/pr25923.f90
> @@ -10,7 +10,7 @@ implicit none
>
> contains
>
> - function baz(arg) result(res) ! { dg-warning "res.yr' may be" }
> + function baz(arg) result(res)
> type(bar), intent(in) :: arg
> type(bar) :: res
> logical, external:: some_func
> Index: mine/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-7.c
> ===================================================================
> --- mine.orig/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-7.c
> +++ mine/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-7.c
> @@ -1,5 +1,5 @@
> /* { dg-do compile } */
> -/* { dg-options "-O -fdump-tree-fre-details -fdump-tree-optimized" } */
> +/* { dg-options "-O -fno-tree-sra -fdump-tree-fre-details -fdump-tree-optimized" } */
> #if (__SIZEOF_INT__ == __SIZEOF_FLOAT__)
> typedef int intflt;
> #elif (__SIZEOF_LONG__ == __SIZEOF_FLOAT__)
> Index: mine/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-8.c
> ===================================================================
> --- mine.orig/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-8.c
> +++ mine/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-8.c
> @@ -1,5 +1,5 @@
> /* { dg-do compile } */
> -/* { dg-options "-O -fdump-tree-fre-details" } */
> +/* { dg-options "-O -fno-tree-sra -fdump-tree-fre-details" } */
> #if (__SIZEOF_INT__ == __SIZEOF_FLOAT__)
> typedef int intflt;
> #elif (__SIZEOF_LONG__ == __SIZEOF_FLOAT__)
> Index: mine/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-9.c
> ===================================================================
> --- mine.orig/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-9.c
> +++ mine/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-9.c
> @@ -1,5 +1,5 @@
> /* { dg-do compile } */
> -/* { dg-options "-O -fdump-tree-fre-stats" } */
> +/* { dg-options "-O -fno-tree-sra -fdump-tree-fre-stats" } */
>
> union loc {
> unsigned reg;
>
>
--
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 - GF: Markus Rex
More information about the Gcc-patches
mailing list