aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJames Greenhalgh <james.greenhalgh@arm.com>2016-11-10 16:53:58 +0000
committerJames Greenhalgh <jgreenhalgh@gcc.gnu.org>2016-11-10 16:53:58 +0000
commit37a16493e4e8f312da299f678b20b45c1815b537 (patch)
treed21df34b5285fbb51a27099162d2d2ba46c5c3ff /gcc
parent98a32a4c844e96d0ca734ce33e3912b22820921d (diff)
downloadgcc-37a16493e4e8f312da299f678b20b45c1815b537.zip
gcc-37a16493e4e8f312da299f678b20b45c1815b537.tar.gz
gcc-37a16493e4e8f312da299f678b20b45c1815b537.tar.bz2
[Patch testsuite] Check range of exponent for tests added in r241817
gcc/ChangeLog 2016-11-10 James Greenhalgh <james.greenhalgh@arm.com> * gcc.dg/torture/fp-int-convert.h (M_OK2): New, use it in WVAL0S tests added in r241817. From-SVN: r242041
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/torture/fp-int-convert.h5
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 03dcd5b..5028157 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2016-11-10 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * gcc.dg/torture/fp-int-convert.h (M_OK2): New, use it in
+ WVAL0S tests added in r241817.
+
2016-11-10 Jakub Jelinek <jakub@redhat.com>
* gfortran.dg/gomp/pr77516.f90: Add dg-warning.
diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert.h b/gcc/testsuite/gcc.dg/torture/fp-int-convert.h
index bbe9666..2b904b6 100644
--- a/gcc/testsuite/gcc.dg/torture/fp-int-convert.h
+++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert.h
@@ -53,13 +53,14 @@ do { \
TEST_I_F_VAL (U, F, HVAL1U (P, U), P_OK (P, U)); \
TEST_I_F_VAL (U, F, HVAL1U (P, U) + 1, P_OK (P, U)); \
TEST_I_F_VAL (U, F, HVAL1U (P, U) - 1, P_OK (P, U)); \
- TEST_I_F_VAL (I, F, WVAL0S (I), 1); \
- TEST_I_F_VAL (I, F, -WVAL0S (I), 1); \
+ TEST_I_F_VAL (I, F, WVAL0S (I), M_OK2 (M, U)); \
+ TEST_I_F_VAL (I, F, -WVAL0S (I), M_OK2 (M, U)); \
} while (0)
#define P_OK(P, T) ((P) >= sizeof(T) * CHAR_BIT)
#define P_OK1(P, T) ((P) >= sizeof(T) * CHAR_BIT - 1)
#define M_OK1(M, T) ((M) > sizeof(T) * CHAR_BIT - 1)
+#define M_OK2(M, T) ((M) > sizeof(T) * CHAR_BIT / 2 - 1)
#define HVAL0U(P, U) (U)(P_OK (P, U) \
? (U)1 \
: (((U)1 << (sizeof(U) * CHAR_BIT - 1)) \