* gcc.dg/stack-check-5.c: Skip with -fstack-protector.
[official-gcc.git] / gcc / testsuite / gcc.dg / pr55019.c
blob1548fb258c0677802d86ce014c44e2cf3bcbd4ad
1 /* { dg-do run } */
2 /* { dg-options "-O1 -funroll-loops" } */
3 /* { dg-add-options ieee } */
5 extern void exit (int);
6 extern void abort (void);
8 void
9 compare (double a, double b)
13 double s1 = __builtin_copysign ((double) 1.0, a);
14 double s2 = __builtin_copysign ((double) 1.0, b);
16 if (s1 != s2)
17 abort ();
19 if ((__builtin_isnan (a) != 0) != (__builtin_isnan (b) != 0))
20 abort ();
22 if ((a != b) != (__builtin_isnan (a) != 0))
23 abort ();
24 } while (0);
27 int
28 main ()
30 double a = 0.0;
31 double b = 0.0;
32 _Complex double cr = __builtin_complex (a, b);
33 static _Complex double cs = __builtin_complex (0.0, 0.0);
35 compare (__real__ cr, 0.0);
36 compare (__imag__ cr, 0.0);
37 compare (__real__ cs, 0.0);
38 compare (__imag__ cs, 0.0);
40 exit (0);