repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
20030125-1.c
blob
def6fabba0087a2ce6f60a8c65880ed31062d122
1
/* 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
float
20
q2
(
double
a
)
21
{
22
return
floor
(
a
);
23
}
24
main
()
25
{
26
#ifdef __OPTIMIZE__
27
if
(
t
(
0
)!=
0
)
28
abort
();
29
if
(
q
(
0
)!=
0
)
30
abort
();
31
if
(
q1
(
0
)!=
0
)
32
abort
();
33
if
(
q2
(
0
)!=
0
)
34
abort
();
35
#endif
36
return
0
;
37
}
38
__attribute__
((
noinline
))
39
double
40
floor
(
double
a
)
41
{
42
abort
();
43
}
44
__attribute__
((
noinline
))
45
float
46
floorf
(
float
a
)
47
{
48
return
a
;
49
}
50
__attribute__
((
noinline
))
51
double
52
sin
(
double
a
)
53
{
54
abort
();
55
}
56
__attribute__
((
noinline
))
57
float
58
sinf
(
float
a
)
59
{
60
return
a
;
61
}