aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@google.com>2009-07-10 21:36:13 +0000
committerRichard Guenther <rguenther@suse.de>2009-07-10 21:36:13 +0000
commitec87f5898439eec31a2e882c98a145c490750493 (patch)
tree2119a8049beb657a66eeedab471b55fc88c7fe94
parent6bc5591a3d2f9a4071b9383aba3670795e641664 (diff)
2009-07-10 Diego Novillo <dnovillo@google.com>
* lib/gfortran-dg.exp: Add LTO torture options. * lib/fortran-torture.exp: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/lto@149495 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/ChangeLog.lto5
-rw-r--r--gcc/testsuite/lib/fortran-torture.exp17
-rw-r--r--gcc/testsuite/lib/gfortran-dg.exp17
3 files changed, 36 insertions, 3 deletions
diff --git a/gcc/testsuite/ChangeLog.lto b/gcc/testsuite/ChangeLog.lto
index b2fc3484aca..46b7471a447 100644
--- a/gcc/testsuite/ChangeLog.lto
+++ b/gcc/testsuite/ChangeLog.lto
@@ -1,3 +1,8 @@
+2009-07-10 Diego Novillo <dnovillo@google.com>
+
+ * lib/gfortran-dg.exp: Add LTO torture options.
+ * lib/fortran-torture.exp: Likewise.
+
2009-07-07 Diego Novillo <dnovillo@google.com>
* gcc.c-torture/execute/builtins/lib/strcat.c: Declare
diff --git a/gcc/testsuite/lib/fortran-torture.exp b/gcc/testsuite/lib/fortran-torture.exp
index 811b4cfcaad..8d7800e2197 100644
--- a/gcc/testsuite/lib/fortran-torture.exp
+++ b/gcc/testsuite/lib/fortran-torture.exp
@@ -22,11 +22,24 @@
load_lib target-supports.exp
+set LTO_TORTURE_OPTIONS ""
+if [check_effective_target_lto] {
+ set LTO_TORTURE_OPTIONS [list \
+ { -O0 -flto } \
+ { -O2 -flto } \
+ { -O3 -flto } \
+ { -O0 -fwhopr } \
+ { -O2 -fwhopr } \
+ { -O3 -fwhopr }
+ ]
+}
+
+
# Return the list of options to use for fortran torture tests.
# The default option list can be overridden by
# TORTURE_OPTIONS="{ { list1 } ... { listN } }"
proc get-fortran-torture-options { } {
- global TORTURE_OPTIONS
+ global TORTURE_OPTIONS LTO_TORTURE_OPTIONS
if [info exists TORTURE_OPTIONS] {
return $TORTURE_OPTIONS
@@ -86,6 +99,8 @@ proc get-fortran-torture-options { } {
set options [concat $options $ADDITIONAL_TORTURE_OPTIONS]
}
+ set options [concat $options $LTO_TORTURE_OPTIONS]
+
return $options
}
diff --git a/gcc/testsuite/lib/gfortran-dg.exp b/gcc/testsuite/lib/gfortran-dg.exp
index 70a0888a0a4..c7190b1ac80 100644
--- a/gcc/testsuite/lib/gfortran-dg.exp
+++ b/gcc/testsuite/lib/gfortran-dg.exp
@@ -17,6 +17,19 @@
load_lib gcc-dg.exp
load_lib torture-options.exp
+set LTO_TORTURE_OPTIONS ""
+if [check_effective_target_lto] {
+ set LTO_TORTURE_OPTIONS [list \
+ { -O0 -flto } \
+ { -O2 -flto } \
+ { -O3 -flto } \
+ { -O0 -fwhopr } \
+ { -O2 -fwhopr } \
+ { -O3 -fwhopr }
+ ]
+}
+
+
# Define gfortran callbacks for dg.exp.
proc gfortran-dg-test { prog do_what extra_tool_flags } {
@@ -83,10 +96,10 @@ proc gfortran-dg-prune { system text } {
# as c-torture does.
proc gfortran-dg-runtest { testcases default-extra-flags } {
global runtests
- global DG_TORTURE_OPTIONS torture_with_loops
+ global DG_TORTURE_OPTIONS torture_with_loops LTO_TORTURE_OPTIONS
torture-init
- set-torture-options $DG_TORTURE_OPTIONS
+ set-torture-options $DG_TORTURE_OPTIONS [list {}] $LTO_TORTURE_OPTIONS
foreach test $testcases {
# If we're only testing specific files and this isn't one of