]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
target-supports.exp: Add check for "inf" effective target keyword.
authorPaul Koning <ni1d@arrl.net>
Mon, 5 Nov 2018 19:36:16 +0000 (14:36 -0500)
committerPaul Koning <pkoning@gcc.gnu.org>
Mon, 5 Nov 2018 19:36:16 +0000 (14:36 -0500)
* lib/target-supports.exp: Add check for "inf" effective target
keyword.
* gcc.dg/builtins-44.c: Skip if no infinite support.
* gcc.dg/builtins-45.c: Ditto.
* gcc.dg/torture/builtin-complex-1.c: Ditto.
* gcc.dg/torture/builtin-cproj-1.c: Ditto.
* gcc.dg/torture/builtin-frexp-1.c: Ditto.
* gcc.dg/torture/builtin-ldexp-1.c: Ditto.
* gcc.dg/torture/builtin-logb-1.c: Ditto.
* gcc.dg/torture/builtin-math-2.c: Ditto.
* gcc.dg/torture/builtin-math-5.c: Ditto.
* gcc.dg/torture/builtin-math-7.c: Ditto.
* gcc.dg/torture/builtin-modf-1.c: Ditto.
* gcc.dg/torture/type-generic-1.c: Ditto.

From-SVN: r265816

14 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/builtins-44.c
gcc/testsuite/gcc.dg/builtins-45.c
gcc/testsuite/gcc.dg/torture/builtin-complex-1.c
gcc/testsuite/gcc.dg/torture/builtin-cproj-1.c
gcc/testsuite/gcc.dg/torture/builtin-frexp-1.c
gcc/testsuite/gcc.dg/torture/builtin-ldexp-1.c
gcc/testsuite/gcc.dg/torture/builtin-logb-1.c
gcc/testsuite/gcc.dg/torture/builtin-math-2.c
gcc/testsuite/gcc.dg/torture/builtin-math-5.c
gcc/testsuite/gcc.dg/torture/builtin-math-7.c
gcc/testsuite/gcc.dg/torture/builtin-modf-1.c
gcc/testsuite/gcc.dg/torture/type-generic-1.c
gcc/testsuite/lib/target-supports.exp

index 665c049e7cbdf6a886eefd23ffdcbdaa73c639b7..78a1b05fcfeff282d70b609e50f34d3c2ce60f6a 100644 (file)
@@ -1,3 +1,20 @@
+2018-11-05  Paul Koning  <ni1d@arrl.net>
+
+       * lib/target-supports.exp: Add check for "inf" effective target
+       keyword.
+       * gcc.dg/builtins-44.c: Skip if no infinite support.
+       * gcc.dg/builtins-45.c: Ditto.
+       * gcc.dg/torture/builtin-complex-1.c: Ditto.
+       * gcc.dg/torture/builtin-cproj-1.c: Ditto.
+       * gcc.dg/torture/builtin-frexp-1.c: Ditto.
+       * gcc.dg/torture/builtin-ldexp-1.c: Ditto.
+       * gcc.dg/torture/builtin-logb-1.c: Ditto.
+       * gcc.dg/torture/builtin-math-2.c: Ditto.
+       * gcc.dg/torture/builtin-math-5.c: Ditto.
+       * gcc.dg/torture/builtin-math-7.c: Ditto.
+       * gcc.dg/torture/builtin-modf-1.c: Ditto.
+       * gcc.dg/torture/type-generic-1.c: Ditto.
+
 2018-11-05  Ilya Leoshkevich  <iii@linux.ibm.com>
 
        * gcc.target/s390/md/andc-splitter-1.c: Add colon to
index 12676239b06669390bcfdd97f31f290436846f64..8a06b5969957ee7937fbf2e0c9466fe1c01fe732 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-require-effective-target inf } */
 /* { dg-options "-O1 -fno-trapping-math -fno-finite-math-only -fdump-tree-optimized" } */
   
 extern void f(int);
index 4e354a180e2f90e43323973a146f3e047a7d182f..0fa801b330798371101f35d69d4c714df3a98012 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-require-effective-target inf } */
 /* { dg-options "-O1 -fno-trapping-math -fno-finite-math-only -fdump-tree-optimized" } */
   
 extern void f(int);
index 0d26c9cc707dc3a9acfcfee3963986372e893a75..5a4ed3cce4f4176f610cb4af591278b98e1543fe 100644 (file)
@@ -1,6 +1,7 @@
 /* Test __builtin_complex semantics.  */
 /* { dg-do run } */
 /* { dg-options "-std=c11 -pedantic-errors" } */
+/* { dg-require-effective-target inf } */
 /* { dg-add-options ieee } */
 
 extern void exit (int);
index 9aa6691b7b933f892cb7f36e480ee590ea8fc56f..d79f34acba6b96ae4f232e397ac1f3d9e0970dad 100644 (file)
@@ -7,6 +7,7 @@
 
 /* { dg-do link } */
 /* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
+/* { dg-require-effective-target inf } */
 /* { dg-add-options ieee } */
 
 /* All references to link_error should go away at compile-time.  The
index a66ce51fcc3a62fa279469e60148a4263c34aa7c..2f1708b8030db25748a215e9f81d2ef0dd71bad7 100644 (file)
@@ -9,6 +9,7 @@
 /* { dg-options "-fno-finite-math-only" { target sh*-*-* } } */
 /* In order to fold algebraic exprs below, targets with "composite"
    floating point formats need -funsafe-math-optimizations.  */
+/* { dg-require-effective-target inf } */
 /* { dg-options "-funsafe-math-optimizations" { target powerpc*-*-* } } */
 
 extern void link_error(int);
index 64122747570df48dc4e0d2493b2a978e8de5578a..05fa2b921e7c6ea2b27141d5f02b370ddbc1faa1 100644 (file)
@@ -7,6 +7,7 @@
 
 /* { dg-do link } */
 /* { dg-options "-fno-finite-math-only" { target sh*-*-* } } */
+/* { dg-require-effective-target inf } */
 /* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
 
 extern void link_error(int);
index d759d1c6c8ef671a14097b2d4c6b90523b2c6ded..087d87f01fbc3f89fe6ea2bd837f79a71027a35d 100644 (file)
@@ -9,6 +9,7 @@
 /* { dg-options "-fno-finite-math-only" { target sh*-*-* } } */
 /* In order to fold algebraic exprs below, targets with "composite"
    floating point formats need -funsafe-math-optimizations.  */
+/* { dg-require-effective-target inf } */
 /* { dg-options "-funsafe-math-optimizations" { target powerpc*-*-* } } */
 
 extern void link_error(int);
index e8f2c440736329e23e99dd4e67e7af20b5dbfa93..73db91681effc9396198c1909a0c56d9ae92d42f 100644 (file)
@@ -6,6 +6,7 @@
    Origin: Kaveh R. Ghazi,  October 22, 2006.  */
 
 /* { dg-do compile } */
+/* { dg-require-effective-target inf } */
 /* { dg-options "-fdump-tree-original" } */
 
 extern void foof (float);
index 025f4d0c025570f43ef453a73ee56153040ee644..9ea906c568a8d0f5ee9039bea4dd8f439e7e02ab 100644 (file)
@@ -6,6 +6,7 @@
    Origin: Kaveh R. Ghazi,  January 28, 2009.  */
 
 /* { dg-do compile } */
+/* { dg-require-effective-target inf } */
 /* { dg-options "-fdump-tree-original" } */
 
 extern void foof (_Complex float);
index d4ff1c8c179a5fe1720a54052e3d897278369eec..bdd5907177d95c0939fe2d8bcf4e15f391cea550 100644 (file)
@@ -7,6 +7,7 @@
 /* { dg-do run } */
 /* C6X fails due to -freciprocal-math default.  */
 /* { dg-skip-if "" { tic6x-*-* } } */
+/* { dg-require-effective-target inf } */
 /* { dg-add-options ieee } */
 /* { dg-require-effective-target large_double } */
 
index 05e16ac2cc473bd98395653a69be8575a051b1af..78d3032430792cbe22ab88bc60774b76e58c02ae 100644 (file)
@@ -6,6 +6,7 @@
    Origin: Kaveh R. Ghazi,  February 23, 2007.  */
 
 /* { dg-do link } */
+/* { dg-require-effective-target inf } */
 /* { dg-options "-fno-finite-math-only" { target sh*-*-* } } */
 /* { dg-options "-funsafe-math-optimizations -fsigned-zeros -fno-associative-math" { target powerpc-*-darwin* powerpc*-*-linux* } } */
 
index a5fa8e83f7f6223b4471d63a930679bbd81474aa..3df6f9b2d93cfdbb76f0e4298859b8fa47312e75 100644 (file)
@@ -2,6 +2,7 @@
    without any fast-math flags.  */
 
 /* { dg-do run } */
+/* { dg-require-effective-target inf } */
 /* { dg-skip-if "No Inf/NaN support" { spu-*-* } } */
 /* { dg-skip-if "No subnormal support" { csky-*-* } { "-mhard-float" } } */
 /* { dg-options "-DUNSAFE" { target tic6x*-*-* visium-*-* nvptx-*-* } } */
index fd74c04d092b0e2341b85eefbebb1f0df9423492..9780e53dfc0b4be920675f54b164e79582fe17f0 100644 (file)
@@ -8933,3 +8933,10 @@ proc check_effective_target_cet { } {
        }
     } "-O2" ]
 }
+
+# Return 1 if target supports floating point "infinite"
+proc check_effective_target_inf { } {
+    return [check_no_compiler_messages supports_inf assembly {
+        const double pinf = __builtin_inf ();
+    }]
+}