PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20030125-1.c
blob960552c3c3a5b5b4cb8f6a946262446430a6d151
1 /* Verify whether math functions are simplified. */
2 /* { dg-require-effective-target c99_runtime } */
3 /* { dg-require-weak } */
4 double sin(double);
5 double floor(double);
6 float
7 t(float a)
9 return sin(a);
11 float
12 q(float a)
14 return floor(a);
16 double
17 q1(float a)
19 return floor(a);
21 main()
23 #ifdef __OPTIMIZE__
24 if (t(0)!=0)
25 abort ();
26 if (q(0)!=0)
27 abort ();
28 if (q1(0)!=0)
29 abort ();
30 #endif
31 return 0;
33 __attribute__ ((weak))
34 double
35 floor(double a)
37 abort ();
39 __attribute__ ((weak))
40 float
41 floorf(float a)
43 return a;
45 __attribute__ ((weak))
46 double
47 sin(double a)
49 return a;
51 __attribute__ ((weak))
52 float
53 sinf(float a)
55 abort ();