PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr36578-1.c
blob5ede23a11a8f0c17193cad67b3469409acf35ed2
1 /* Test for unsafe floating-point conversions. PR 36578. */
2 /* { dg-do run } */
3 /* { dg-options "-msse2 -mfpmath=sse" } */
4 /* { dg-require-effective-target sse2 } */
5 /* { dg-require-effective-target large_long_double } */
7 #include "sse2-check.h"
9 extern void abort (void);
10 extern void exit (int);
11 extern int printf(const char *, ...);
13 volatile double d1 = 1.0;
14 volatile double d2 = 0x1.00001p-53;
15 volatile double d3;
17 static void
18 sse2_test (void)
20 d3 = (double)((long double)d1 + (long double)d2);
21 if (d3 != d1)
22 abort ();
23 exit (0);