OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20030125-1.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 688 jeremybenn
/* Verify whether math functions are simplified.  */
2
double sin(double);
3
double floor(double);
4
float
5
t(float a)
6
{
7
        return sin(a);
8
}
9
float
10
q(float a)
11
{
12
        return floor(a);
13
}
14
double
15
q1(float a)
16
{
17
        return floor(a);
18
}
19
main()
20
{
21
#ifdef __OPTIMIZE__
22
        if (t(0)!=0)
23
                abort ();
24
        if (q(0)!=0)
25
                abort ();
26
        if (q1(0)!=0)
27
                abort ();
28
#endif
29
        return 0;
30
}
31
__attribute__ ((noinline))
32
double
33
floor(double a)
34
{
35
        abort ();
36
}
37
__attribute__ ((noinline))
38
float
39
floorf(float a)
40
{
41
        return a;
42
}
43
__attribute__ ((noinline))
44
double
45
sin(double a)
46
{
47
        abort ();
48
}
49
__attribute__ ((noinline))
50
float
51
sinf(float a)
52
{
53
        return a;
54
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.