Fix gcc.dg/torture/fp-int-convert.h for excess precision after PR c/87390.
commit889eb06af35f084a0ab5ba6e0774bade4d5e3c53
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 28 Sep 2018 15:45:51 +0000 (28 15:45 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 28 Sep 2018 15:45:51 +0000 (28 15:45 +0000)
treea880fc39f7bad1c3b55e0f5003ad2450d27341e2
parente835b1e927e46df9d3283ff4a0b3406ebafe125b
Fix gcc.dg/torture/fp-int-convert.h for excess precision after PR c/87390.

As reported in
<https://gcc.gnu.org/ml/gcc-patches/2018-09/msg01684.html>, some
fp-int-convert tests fail after my fix for PR c/87390, in Arm /
AArch64 configurations where _Float16 uses excess precision by
default.  The issue is comparisons of the results of a conversion by
assignment (compile-time or run-time) from integer to floating-point
with the original integer value; previously this would compare against
an implicit compile-time conversion to the target type, but now, for
C11 and later, it compares against an implicit compile-time conversion
to a possibly wider evaluation format.  This is fixed by adding casts
to the test so that the comparison is with a value converted
explicitly to the target type at compile time, without any use of a
wider evaluation format.

PR c/87390
* gcc.dg/torture/fp-int-convert.h (TEST_I_F_VAL): Convert integer
values explicitly to target type for comparison.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264696 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/fp-int-convert.h