target-supports.exp (error_h): New check.
authorAlexander Ivchenko <alexander.ivchenko@intel.com>
Thu, 13 Nov 2014 09:08:18 +0000 (09:08 +0000)
committerKirill Yukhin <kyukhin@gcc.gnu.org>
Thu, 13 Nov 2014 09:08:18 +0000 (09:08 +0000)
gcc/testsuite/
* lib/target-supports.exp (error_h): New check.
(libc_has_complex_functions): Ditto.
(tgmath_h): Ditto.
* gcc.dg/builtins-59.c: Add libc_has_complex_functions check.
* gcc.dg/builtins-61.c: Likewise.
* gcc.dg/builtins-67.c: Disable test for Bionic.
* gcc.dg/strlenopt-14g.c: Likewise.
* gcc.dg/strlenopt-14gf.c: Likewise.
* gcc.dg/c99-tgmath-1.c: Add tgmath_h check.
* gcc.dg/c99-tgmath-2.c: Likewise.
* gcc.dg/c99-tgmath-3.c: Likewise.
* gcc.dg/c99-tgmath-4.c: Likewise.
* gcc.dg/dfp/convert-dfp-round-thread.c: Add error_h check.

From-SVN: r217467

12 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/builtins-59.c
gcc/testsuite/gcc.dg/builtins-61.c
gcc/testsuite/gcc.dg/builtins-67.c
gcc/testsuite/gcc.dg/c99-tgmath-1.c
gcc/testsuite/gcc.dg/c99-tgmath-2.c
gcc/testsuite/gcc.dg/c99-tgmath-3.c
gcc/testsuite/gcc.dg/c99-tgmath-4.c
gcc/testsuite/gcc.dg/dfp/convert-dfp-round-thread.c
gcc/testsuite/gcc.dg/strlenopt-14g.c
gcc/testsuite/gcc.dg/strlenopt-14gf.c
gcc/testsuite/lib/target-supports.exp

index 66c66c49231f4b4ed76e0b138e84f72c68b5ab06..5376ce19432324dd7c547754bbdb8dc870bd2fcc 100644 (file)
@@ -1,3 +1,19 @@
+2014-11-12  Alexander Ivchenko  <alexander.ivchenko@intel.com>
+
+       * lib/target-supports.exp (error_h): New check.
+       (libc_has_complex_functions): Ditto.
+       (tgmath_h): Ditto.
+       * gcc.dg/builtins-59.c: Add libc_has_complex_functions check.
+       * gcc.dg/builtins-61.c: Likewise.
+       * gcc.dg/builtins-67.c: Disable test for Bionic.
+       * gcc.dg/strlenopt-14g.c: Likewise.
+       * gcc.dg/strlenopt-14gf.c: Likewise.
+       * gcc.dg/c99-tgmath-1.c: Add tgmath_h check.
+       * gcc.dg/c99-tgmath-2.c: Likewise.
+       * gcc.dg/c99-tgmath-3.c: Likewise.
+       * gcc.dg/c99-tgmath-4.c: Likewise.
+       * gcc.dg/dfp/convert-dfp-round-thread.c: Add error_h check.
+
 2014-11-12  Jakub Jelinek  <jakub@redhat.com>
 
        PR ipa/63838
index b940d39ed60ea131069298dd67e7bb644085c1fd..f5c1803d5df85f008b674655a6e42c1544813283 100644 (file)
@@ -1,6 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-fdump-tree-gimple" } */
 /* { dg-require-effective-target c99_runtime } */
+/* { dg-require-effective-target libc_has_complex_functions } */
 
 double test (double x)
 {
index dff163ff112e5d724af02865c1ad2bd6036c5e7a..a3310afbac2f19b130492120841ac99816e92cc2 100644 (file)
@@ -1,6 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-O -ffast-math -fdump-tree-optimized" } */
 /* { dg-require-effective-target c99_runtime } */
+/* { dg-require-effective-target libc_has_complex_functions } */
 
 double test1 (double x)
 {
index 22267bd31b91acdea64c32380636283a0f433f12..0992fe1597f6e49b10961077fa4ca39235b6cd27 100644 (file)
@@ -3,6 +3,8 @@
 /* { dg-do link } */
 /* { dg-options "-ffast-math -lm" }  */
 /* { dg-add-options c99_runtime } */
+/* Bionic doesn't have rintl */
+/* { dg-require-effective-target non_bionic } */
 
 #include "builtins-config.h"
 
index c7d848c7a6c13f04ab3af1273d87cde8c9707c57..cfa02a91d33f1672625fc4c7f47c1436eb7a48a5 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-do preprocess { target c99_runtime } } */
 /* { dg-options "-std=iso9899:1999" } */
 /* { dg-add-options c99_runtime } */
+/* { dg-require-effective-target tgmath_h } */
 
 /* Test that tgmath defines the macros it's supposed to. */
 #include <tgmath.h>
index d4f1f87cfa93bed1f1bff928d5049c07ad762ec7..1a1153cc6eaeab1e0d6086b58e91b0bae18bb7ee 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-do compile { target c99_runtime } } */
 /* { dg-options "-std=iso9899:1999" } */
 /* { dg-add-options c99_runtime } */
+/* { dg-require-effective-target tgmath_h } */
 
 /* Test that invoking type-generic sin on a float invokes sinf. */
 #include <tgmath.h>
index 3e983042751f34eaed7d1a1aff7fb96ac2c0e668..a595cf68559a28f0ea13893f643fe78dcdf4ff3f 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-do compile { target c99_runtime } } */
 /* { dg-options "-std=iso9899:1999" } */
 /* { dg-add-options c99_runtime } */
+/* { dg-require-effective-target tgmath_h } */
 
 /* Test that invoking type-generic exp on a complex invokes cexp. */
 #include <tgmath.h>
index d8dc043c261b4bba2cb58d18c9e933c85d485296..c05a1c59ebcaacb8b59095cf66c5dc60a096f6f8 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-do compile { target c99_runtime } } */
 /* { dg-options "-std=iso9899:1999" } */
 /* { dg-add-options c99_runtime } */
+/* { dg-require-effective-target tgmath_h } */
 
 /* Test that invoking type-generic pow on complex float invokes cpowf. */
 #include <tgmath.h>
index 6727e800c3f1dcb13c76edc76f62eede6357afd1..59d9569b84f8de90a6f0f25292fc84cc2148af37 100644 (file)
@@ -1,5 +1,7 @@
 /* { dg-options "-std=gnu99 -D_GNU_SOURCE -pthread" } */
 /* { dg-do run { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } } */
+/* { dg-require-effective-target error_h } */
+
 
 /* N1150 5.2: Conversions among decimal floating types and between
    decimal floating types and generic floating types.
index 86c57f195f09928acb2382eb98b79efaad25372f..8bc47903be17f520b0aa55e6ce7342accd34f8a1 100644 (file)
@@ -1,6 +1,8 @@
 /* This test needs runtime that provides stpcpy and mempcpy functions.  */
 /* { dg-do run { target *-*-linux* *-*-gnu* } } */
 /* { dg-options "-O2 -fdump-tree-strlen" } */
+/* Bionic targets don't have mempcpy */
+/* { dg-require-effective-target non_bionic } */
 
 #define USE_GNU
 #include "strlenopt.h"
index 8b78538d41df55bcf3d89fbc9f6cbf8b0befa8e1..54bb3a1b06555946e0c19fb8033c9b92c746a80d 100644 (file)
@@ -2,6 +2,8 @@
    functions.  */
 /* { dg-do run { target *-*-linux* *-*-gnu* } } */
 /* { dg-options "-O2 -fdump-tree-strlen" } */
+/* Bionic targets don't have mempcpy */
+/* { dg-require-effective-target non_bionic } */
 
 #define FORTIFY_SOURCE 2
 #include "strlenopt-14g.c"
index a31d050b4360c1bb0ba8684a2223c2d98cad8c20..02b2b778418ee9ceb9c4c0526f5d37f80dc70749 100644 (file)
@@ -5124,6 +5124,30 @@ proc check_effective_target_non_bionic {} {
     }]
 }
 
+# Return true if this target has error.h header.
+
+proc check_effective_target_error_h {} {
+    return [check_no_compiler_messages error_h object {
+ #include <error.h>
+    }]
+}
+
+# Return true if this target has tgmath.h header.
+
+proc check_effective_target_tgmath_h {} {
+    return [check_no_compiler_messages tgmath_h object {
+ #include <tgmath.h>
+    }]
+}
+
+# Return true if target's libc supports complex functions.
+
+proc check_effective_target_libc_has_complex_functions {} {
+    return [check_no_compiler_messages libc_has_complex_functions object {
+ #include <complex.h>
+    }]
+}
+
 # Return 1 if
 #   (a) an error of a few ULP is expected in string to floating-point
 #       conversion functions; and