]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR tree-optimization/48497 (gfortran.dg/graphite/vect-pr40979.f90 FAILs without...
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Tue, 7 Jun 2011 16:43:29 +0000 (16:43 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Tue, 7 Jun 2011 16:43:29 +0000 (16:43 +0000)
gcc:
PR tree-optimization/48497
* doc/sourcebuild.texi (Directives, dg-additional-options): Document.

gcc/testsuite:
PR tree-optimization/48497
* lib/gcc-defs.exp (dg-additional-options): New proc.
* gfortran.dg/graphite/vect-pr40979.f90: Use dg-additional-options
-msse2 on 32-bit x86.

From-SVN: r174759

gcc/ChangeLog
gcc/doc/sourcebuild.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/graphite/vect-pr40979.f90
gcc/testsuite/lib/gcc-defs.exp

index 932e8e1d1ff4b3e2c661fa270f63791e33948998..1986a88926385cd849aac3563cb785691b0d11ae 100644 (file)
@@ -1,3 +1,8 @@
+2011-06-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       PR tree-optimization/48497
+       * doc/sourcebuild.texi (Directives, dg-additional-options): Document.
+
 2011-06-07  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
        PR tree-optimization/46728
index 1e02809dd65695926e7bd9ec02e8b272e71305b4..64210c21bc92972c8a58ae79686c6341e09b5d3a 100644 (file)
@@ -1016,6 +1016,11 @@ This directive does nothing on targets that enable the features by
 default, or that don't provide them at all.  It must come after
 all @code{dg-options} directives.
 For supported values of @var{feature} see @ref{Add Options, ,}.
+
+@item @{ dg-additional-options @var{options} [@{ target @var{selector} @}] @}
+This directive provides a list of compiler options, to be used
+if the target system matches @var{selector}, that are added to the default
+options used for this set of tests.
 @end table
 
 @subsubsection Modify the test timeout value
index b38cd1e677036fc13015e1f45743ef1bceb63135..1372638aef83ec85a344e85be7bc2cf2f0ce18bd 100644 (file)
@@ -1,3 +1,11 @@
+2011-06-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       gcc/testsuite:
+       PR tree-optimization/48497
+       * lib/gcc-defs.exp (dg-additional-options): New proc.
+       * gfortran.dg/graphite/vect-pr40979.f90: Use dg-additional-options
+       -msse2 on 32-bit x86.
+
 2011-06-06  Jason Merrill  <jason@redhat.com>
 
        * g++.dg/cpp0x/enum19.C: New.
index 662b82a12a014bc87e676f73d78eb5c5b46cd6ea..f620d0c85cca795ce1d7e74eb436ba4f6e88f227 100644 (file)
@@ -1,5 +1,6 @@
 ! { dg-do compile }
 ! { dg-require-effective-target vect_double }
+! { dg-additional-options "-msse2" { target { { i?86-*-* x86_64-*-* } && ilp32 } } }
 
 module mqc_m
 integer, parameter, private :: longreal = selected_real_kind(15,90)
index ed8c04170f51a6428606cef25c415666a4eb4d46..f48520e46ab7fb243b1bd55ac012a2f0d16aa5ff 100644 (file)
@@ -183,6 +183,28 @@ if { [info procs runtest_file_p] == "" } then {
     }
 }
 
+# Like dg-options, but adds to the default options rather than replacing them.
+
+proc dg-additional-options { args } {
+    upvar dg-extra-tool-flags extra-tool-flags
+
+    if { [llength $args] > 3 } {
+       error "[lindex $args 0]: too many arguments"
+       return
+    }
+
+    if { [llength $args] >= 3 } {
+       switch [dg-process-target [lindex $args 2]] {
+           "S" { eval lappend extra-tool-flags [lindex $args 1] }
+           "N" { }
+           "F" { error "[lindex $args 0]: `xfail' not allowed here" }
+           "P" { error "[lindex $args 0]: `xfail' not allowed here" }
+       }
+    } else {
+       eval lappend extra-tool-flags [lindex $args 1]
+    }
+}
+
 # Record additional sources files that must be compiled along with the
 # main source file.