This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 5/5] "Fix" the rest of the fallouts of new intra-SRA


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...

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.

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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]