Commit e9daced3 by Tamar Christina Committed by Tamar Christina

Testsuite: Enable fp-int-convert-timode-1.c unconditionally when int128 supported.

This removes the call to fesetround as FE_TONEAREST
is the default and so the guard can be removed as well.

The test will then run as long as there's int128 support.

gcc/testsuite/ChangeLog:

	* gcc.dg/torture/fp-int-convert-timode-1.c: Always run if int128.

From-SVN: r278680
parent c6aef8d8
2019-11-25 Tamar Christina <tamar.christina@arm.com>
* gcc.dg/torture/fp-int-convert-timode-1.c: Always run if int128.
2019-11-25 Eric Botcazou <ebotcazou@adacore.com> 2019-11-25 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/addr14.adb: New test. * gnat.dg/addr14.adb: New test.
......
...@@ -2,27 +2,22 @@ ...@@ -2,27 +2,22 @@
float. */ float. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target int128 } */ /* { dg-require-effective-target int128 } */
/* { dg-require-effective-target fenv } */
/* { dg-options "-frounding-math" } */ /* { dg-options "-frounding-math" } */
#include <fenv.h>
#include <stdlib.h> #include <stdlib.h>
int int
main (void) main (void)
{ {
#ifdef FE_TONEAREST
volatile unsigned long long h = 0x8000000000000000LL; volatile unsigned long long h = 0x8000000000000000LL;
volatile unsigned long long l = 0xdLL; volatile unsigned long long l = 0xdLL;
volatile unsigned __int128 u128 = (((unsigned __int128) h) << 64) | l; volatile unsigned __int128 u128 = (((unsigned __int128) h) << 64) | l;
volatile __int128 s128 = u128; volatile __int128 s128 = u128;
fesetround (FE_TONEAREST);
float fs = s128; float fs = s128;
if (fs != -0x1p+127) if (fs != -0x1p+127)
abort (); abort ();
double ds = s128; double ds = s128;
if (ds != -0x1p+127) if (ds != -0x1p+127)
abort (); abort ();
#endif
exit (0); exit (0);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment