Debian Codegraph @

gcc/testsuite/gcc.target/i386/pr93743.c

raw
1 /* { dg-do run } */
2 /* { dg-options "-O2 -ffast-math -mfpmath=387" } */
3
4 void
5 __attribute__((noinline))
6 test (long double x, long double y)
7 {
8 long double ldbl_n = __builtin_atan2l (x, y);
9 long double ldbl_s = __builtin_atan2l (y, x); // arguments swapped
10
11 if (ldbl_n < 1.L || 1.L < ldbl_s)
12 __builtin_abort ();
13
14 double dbl_n = __builtin_atan2 (x, y);
15 double dbl_s = __builtin_atan2 (y, x); // arguments swapped
16
17 if (dbl_n < 1. || 1. < dbl_s)
18 __builtin_abort ();
19 }
20
21 int
22 main ()
23 {
24 long double x = 0.922766L;
25 long double y = 0.080466L;
26
27 test (x, y);
28
29 return 0;
30 }