summaryrefslogtreecommitdiff
path: root/gcc/testsuite/lib/fortran-torture.exp
diff options
context:
space:
mode:
authortobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>2006-12-12 20:59:21 +0000
committertobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>2006-12-12 20:59:21 +0000
commit53e605661a7855bf12153c4dc68df9d9745957df (patch)
treeebe6161c8b4daad75b3bc7aef87776ccb21980b5 /gcc/testsuite/lib/fortran-torture.exp
parentc5a4df253229217debaf0a53a8ea210429733c6f (diff)
downloadgcc-53e605661a7855bf12153c4dc68df9d9745957df.tar.gz
fortran/
* trans-expr.c (gfc_conv_substring): Check for empty substring. testsuite/ * lib/fortran-torture.exp: Update copyright years. Remove obsolete comment. Test -ftree-vectorize where it makes sense. * lib/gfortran-dg.exp: Update copyright years. Use settings from fortran-torture.exp. * gfortran.dg/char_transpose_1.f90, gfortran.dg/char_spread_1.f90, gfortran.dg/g77/dnrm2.f, gfortran.dg/dependent_decls_1.f90: Fixout-of-bound errors. * gfortran.dg/enum_10.f90, gfortran.dg/mixed_io_1.f90: Add '-w' to dg-options. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119797 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/lib/fortran-torture.exp')
-rw-r--r--gcc/testsuite/lib/fortran-torture.exp44
1 files changed, 37 insertions, 7 deletions
diff --git a/gcc/testsuite/lib/fortran-torture.exp b/gcc/testsuite/lib/fortran-torture.exp
index 801fb43eb17..b68a05ddad6 100644
--- a/gcc/testsuite/lib/fortran-torture.exp
+++ b/gcc/testsuite/lib/fortran-torture.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,24 +20,54 @@
# This file was written by Steven Bosscher (s.bosscher@student.tudelft.nl)
# based on f-torture.exp, which was written by Rob Savoye.
-# The biggest change from g77 is that we always test all testcases with
-# loop options, because it is much harder to figure out whether a testcase
-# has loops if you have array syntax, like Fortran 95. In fact, the whole
-# point of F95 is arrays, so loops show up in most testcases anyway.
-
# The default option list can be overridden by
# TORTURE_OPTIONS="{ { list1 } ... { listN } }"
if ![info exists TORTURE_OPTIONS] {
+ # determine if host supports vectorization, and the necessary set
+ # of options, based on code from testsuite/vect/vect.exp
+
+ set vectorizer_options [list "-O2" "-ftree-vectorize"]
+
+ if { [istarget "powerpc*-*-*"]
+ && [is-effective-target powerpc_altivec_ok]
+ && [check_vmx_hw_available] } {
+ lappend vectorizer_options "-maltivec"
+ set test_tree_vectorize 1
+ } elseif { [istarget "spu-*-*"] } {
+ set test_tree_vectorize 1
+ } elseif { [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] } {
+ lappend vectorizer_options "-msse2"
+ set test_tree_vectorize 1
+ } elseif { [istarget "mipsisa64*-*-*"]
+ && [check_effective_target_mpaired_single] } {
+ lappend vectorizer_options "-mpaired-single"
+ set test_tree_vectorize 1
+ } elseif [istarget "sparc*-*-*"] {
+ lappend vectorizer_options "-mcpu=ultrasparc" "-mvis"
+ set test_tree_vectorize 1
+ } elseif { [istarget "alpha*-*-*"]
+ && [check_alpha_max_hw_available] } {
+ lappend vectorizer_options "-mmax"
+ set test_tree_vectorize 1
+ } elseif [istarget "ia64-*-*"] {
+ set test_tree_vectorize 1
+ } else {
+ set test_tree_vectorize 0
+ }
+
set TORTURE_OPTIONS [list \
{ -O0 } { -O1 } { -O2 } \
{ -O2 -fomit-frame-pointer -finline-functions } \
{ -O2 -fomit-frame-pointer -finline-functions -funroll-loops } \
{ -O2 -fbounds-check } \
- { -O2 -fno-repack-arrays } \
{ -O3 -g } \
{ -Os }]
+
+ if { $test_tree_vectorize } {
+ lappend TORTURE_OPTIONS $vectorizer_options
+ }
}