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 } */
6
7 #include "sse2-check.h"
8
9 extern void abort (void);
10 extern void exit (int);
11 extern int printf(const char *, ...);
12
13 volatile double d1 = 1.0;
14 volatile double d2 = 0x1.00001p-53;
15 volatile double d3;
16
17 static void
sse2_test(void)18 sse2_test (void)
19 {
20 d3 = (double)((long double)d1 + (long double)d2);
21 if (d3 != d1)
22 abort ();
23 exit (0);
24 }
25