aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2019-01-25 13:36:37 +0000
committerChristophe Lyon <clyon@gcc.gnu.org>2019-01-25 14:36:37 +0100
commit55ac4e01c17abf9122c01e7cac799c215bc22925 (patch)
tree1237b0fd1eac84b20df6c5746107765035a08d87 /gcc
parentf73dc006049cd217fdd2fa943b861ad9f517aa66 (diff)
downloadgcc-55ac4e01c17abf9122c01e7cac799c215bc22925.zip
gcc-55ac4e01c17abf9122c01e7cac799c215bc22925.tar.gz
gcc-55ac4e01c17abf9122c01e7cac799c215bc22925.tar.bz2
[testsuite] Add missing fenv effective target to fp-int-convert-timode* tests.
2019-01-25 Christophe Lyon <christophe.lyon@linaro.org> gcc/ * doc/sourcebuild.texi (Environment attributes): Add fenv and fenv_exceptions description. 2019-01-25 Christophe Lyon <christophe.lyon@linaro.org> gcc/testsuite/ * lib/target-supports.exp (check_effective_target_fenv): New. * gcc.dg/torture/fp-int-convert-float128-timode-3.c: Add missing fenv effective target. * gcc.dg/torture/fp-int-convert-timode-1.c: Likewise. * gcc.dg/torture/fp-int-convert-timode-2.c: Likewise. * gcc.dg/torture/fp-int-convert-timode-3.c: Likewise. * gcc.dg/torture/fp-int-convert-timode-4.c: Likewise. From-SVN: r268266
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/doc/sourcebuild.texi7
-rw-r--r--gcc/testsuite/ChangeLog10
-rw-r--r--gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c1
-rw-r--r--gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-3.c1
-rw-r--r--gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-4.c1
-rw-r--r--gcc/testsuite/lib/target-supports.exp8
9 files changed, 35 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8779446..ff46540 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2019-01-25 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * doc/sourcebuild.texi (Environment attributes): Add fenv and
+ fenv_exceptions description.
+
2019-01-25 Wilco Dijkstra <wdijkstr@arm.com>
PR rtl-optimization/87763
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index 32a8f6a..a670456 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -2128,6 +2128,13 @@ Target can truncate a file from a file descriptor, as used by
@file{libgfortran/io/unix.c:fd_truncate}; i.e.@: @code{ftruncate} or
@code{chsize}.
+@item fenv
+Target provides @file{fenv.h} include file.
+
+@item fenv_exceptions
+Target supports @file{fenv.h} with all the standard IEEE exceptions
+and floating-point exceptions are raised by arithmetic operations.
+
@item freestanding
Target is @samp{freestanding} as defined in section 4 of the C99 standard.
Effectively, it is a target which supports no extra headers or libraries
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 9803c91..10536c9 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,13 @@
+2019-01-25 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * lib/target-supports.exp (check_effective_target_fenv): New.
+ * gcc.dg/torture/fp-int-convert-float128-timode-3.c: Add missing
+ fenv effective target.
+ * gcc.dg/torture/fp-int-convert-timode-1.c: Likewise.
+ * gcc.dg/torture/fp-int-convert-timode-2.c: Likewise.
+ * gcc.dg/torture/fp-int-convert-timode-3.c: Likewise.
+ * gcc.dg/torture/fp-int-convert-timode-4.c: Likewise.
+
2019-01-25 Richard Biener <rguenther@suse.de>
PR tree-optimization/86865
diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c
index fa6eb6b..c445d10 100644
--- a/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c
+++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c
@@ -4,6 +4,7 @@
/* { dg-require-effective-target __float128 } */
/* { dg-require-effective-target base_quadfloat_support } */
/* { dg-require-effective-target int128 } */
+/* { dg-require-effective-target fenv } */
/* { dg-options "-frounding-math" } */
/* { dg-add-options __float128 } */
diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-1.c b/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-1.c
index d6454fa..0c524a8 100644
--- a/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-1.c
+++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-1.c
@@ -2,6 +2,7 @@
float. */
/* { dg-do run } */
/* { dg-require-effective-target int128 } */
+/* { dg-require-effective-target fenv } */
/* { dg-options "-frounding-math" } */
#include <fenv.h>
diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-2.c b/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-2.c
index dbfa481..a82f03d 100644
--- a/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-2.c
+++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-2.c
@@ -2,6 +2,7 @@
float. */
/* { dg-do run } */
/* { dg-require-effective-target int128 } */
+/* { dg-require-effective-target fenv } */
/* { dg-options "-frounding-math" } */
#include <fenv.h>
diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-3.c b/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-3.c
index 63a305e..707d539 100644
--- a/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-3.c
+++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-3.c
@@ -2,6 +2,7 @@
float. */
/* { dg-do run } */
/* { dg-require-effective-target int128 } */
+/* { dg-require-effective-target fenv } */
/* { dg-options "-frounding-math" } */
#include <fenv.h>
diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-4.c b/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-4.c
index e716109..09600f9 100644
--- a/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-4.c
+++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-4.c
@@ -2,6 +2,7 @@
float. */
/* { dg-do run } */
/* { dg-require-effective-target int128 } */
+/* { dg-require-effective-target fenv } */
/* { dg-options "-frounding-math" } */
#include <fenv.h>
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index c0df467..92202ff 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -8536,6 +8536,14 @@ proc check_effective_target_avr_tiny { } {
}
}
+# Return 1 if <fenv.h> is available.
+
+proc check_effective_target_fenv {} {
+ return [check_no_compiler_messages fenv object {
+ #include <fenv.h>
+ } [add_options_for_ieee "-std=gnu99"]]
+}
+
# Return 1 if <fenv.h> is available with all the standard IEEE
# exceptions and floating-point exceptions are raised by arithmetic
# operations. (If the target requires special options for "inexact"