summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4>2013-07-19 07:53:11 +0000
committergjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4>2013-07-19 07:53:11 +0000
commitc3494c6acd92d71f865648f9228f3ffb278d90b0 (patch)
treec6d6b586f9c049a033b8f632ff8dd04679069dc0
parent94d09da7725c18f7a9790f4eef7f54dad7d3b13a (diff)
downloadgcc-c3494c6acd92d71f865648f9228f3ffb278d90b0.tar.gz
* lib/target-supports.exp (check_effective_target_cilkplus): New proc.
* gcc.dg/cilk-plus/cilk-plus.exp: only run if check_effective_target_cilkplus. * g++.dg/cilk-plus/cilk-plus.exp: Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201048 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/g++.dg/cilk-plus/cilk-plus.exp4
-rw-r--r--gcc/testsuite/gcc.dg/cilk-plus/cilk-plus.exp4
-rw-r--r--gcc/testsuite/lib/target-supports.exp18
4 files changed, 33 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 53dd6c1c53a..d5f4c32de02 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2013-07-19 Georg-Johann Lay <avr@gjlay.de>
+
+ * lib/target-supports.exp (check_effective_target_cilkplus): New proc.
+ * gcc.dg/cilk-plus/cilk-plus.exp: only run if
+ check_effective_target_cilkplus.
+ * g++.dg/cilk-plus/cilk-plus.exp: Same.
+
2013-07-18 Pat Haugen <pthaugen@us.ibm.com>
* gcc.target/powerpc/pr57744.c: Fix typo.
diff --git a/gcc/testsuite/g++.dg/cilk-plus/cilk-plus.exp b/gcc/testsuite/g++.dg/cilk-plus/cilk-plus.exp
index a1535290a5c..7e0fda57b27 100644
--- a/gcc/testsuite/g++.dg/cilk-plus/cilk-plus.exp
+++ b/gcc/testsuite/g++.dg/cilk-plus/cilk-plus.exp
@@ -19,6 +19,10 @@
load_lib g++-dg.exp
+if { ![check_effective_target_cilkplus] } {
+ return;
+}
+
dg-init
dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -fcilkplus" " "
dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -O0 -fcilkplus" " "
diff --git a/gcc/testsuite/gcc.dg/cilk-plus/cilk-plus.exp b/gcc/testsuite/gcc.dg/cilk-plus/cilk-plus.exp
index 59b23056c72..2533febc8ab 100644
--- a/gcc/testsuite/gcc.dg/cilk-plus/cilk-plus.exp
+++ b/gcc/testsuite/gcc.dg/cilk-plus/cilk-plus.exp
@@ -19,6 +19,10 @@
load_lib gcc-dg.exp
+if { ![check_effective_target_cilkplus] } {
+ return;
+}
+
dg-init
dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -fcilkplus" " "
dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -O0 -fcilkplus" " "
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 936c97af906..fe51fde52d3 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -1132,6 +1132,24 @@ proc check_effective_target_static_libgfortran { } {
} "-static"]
}
+# Return 1 if cilk-plus is supported by the target, 0 otherwise.
+
+proc check_effective_target_cilkplus { } {
+ # Skip cilk-plus tests on int16 and size16 targets for now.
+ # The cilk-plus tests are not generic enough to cover these
+ # cases and would throw hundreds of FAILs.
+ if { [check_effective_target_int16]
+ || ![check_effective_target_size32plus] } {
+ return 0;
+ }
+
+ # Skip AVR, its RAM is too small and too many tests would fail.
+ if { [istarget avr-*-*] } {
+ return 0;
+ }
+ return 1
+}
+
proc check_linker_plugin_available { } {
return [check_no_compiler_messages_nocache linker_plugin executable {
int main() { return 0; }