target-supports.exp (check_effective_target_cilkplus): New proc.
authorGeorg-Johann Lay <avr@gjlay.de>
Fri, 19 Jul 2013 07:53:11 +0000 (07:53 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Fri, 19 Jul 2013 07:53:11 +0000 (07:53 +0000)
* 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.

From-SVN: r201048

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cilk-plus/cilk-plus.exp
gcc/testsuite/gcc.dg/cilk-plus/cilk-plus.exp
gcc/testsuite/lib/target-supports.exp

index 53dd6c1c53a3f514a6b47edf7097aebd0bf1583d..d5f4c32de0272484ff3cde53c83f8b1361067f91 100644 (file)
@@ -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.
index a1535290a5c026ccd9e39ccd2d00f9e12dcd8923..7e0fda57b27ffedeeaf55ca2177f54ef47df5d70 100644 (file)
 
 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" " "
index 59b23056c722fc1b7d112eabbedc7505b392918f..2533febc8ab78b6667d35ecf43f39600ca2723da 100644 (file)
 
 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" " "
index 936c97af9067f484a889a216a3cdff8efb3bace5..fe51fde52d3cdcf0cd854761766efefb6b71bf6f 100644 (file)
@@ -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; }