Debian Codegraph @

gcc/testsuite/gcc.target/avr/sincos-1.c

raw
1 /* { dg-do run { target { ! avr_tiny } } } */
2 /* { dg-additional-options { -std=gnu99 -Os -mcall-prologues } } */
3
4 #if __SIZEOF_LONG_DOUBLE__ == 8
5 typedef long double D;
6
7 extern void sincosl (D, D*, D*);
8 extern D sinl (D);
9 extern D cosl (D);
10
11 D s1, c1;
12
13 int main (void)
14 {
15 for (D x = -20; x < 20; x += 1.1)
16 {
17 sincosl (x, &s1, &c1);
18
19 __asm ("" : "+r" (x) :: "memory");
20
21 if (s1 != sinl (x))
22 __builtin_exit (1);
23
24 if (c1 != cosl (x))
25 __builtin_exit (2);
26 }
27
28 return 0;
29 }
30 #else
31 int main (void)
32 {
33 return 0;
34 }
35 #endif