]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.c-torture/execute/20030125-1.c
Move fold_trunc_transparent_mathfn to match.pd
[thirdparty/gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20030125-1.c
CommitLineData
bf3aff48 1/* Verify whether math functions are simplified. */
42360811 2/* { dg-require-effective-target c99_runtime } */
67dbe582 3/* { dg-require-weak } */
c5061554
JH
4double sin(double);
5double floor(double);
6float
7t(float a)
8{
9 return sin(a);
10}
11float
12q(float a)
13{
14 return floor(a);
15}
16double
17q1(float a)
18{
19 return floor(a);
20}
c5061554
JH
21main()
22{
23#ifdef __OPTIMIZE__
24 if (t(0)!=0)
25 abort ();
26 if (q(0)!=0)
27 abort ();
28 if (q1(0)!=0)
29 abort ();
c5061554
JH
30#endif
31 return 0;
32}
67dbe582 33__attribute__ ((weak))
c5061554
JH
34double
35floor(double a)
36{
37 abort ();
38}
67dbe582 39__attribute__ ((weak))
c5061554
JH
40float
41floorf(float a)
42{
43 return a;
44}
67dbe582 45__attribute__ ((weak))
c5061554
JH
46double
47sin(double a)
48{
247dbcf4 49 return a;
c5061554 50}
67dbe582 51__attribute__ ((weak))
c5061554
JH
52float
53sinf(float a)
54{
247dbcf4 55 abort ();
c5061554 56}