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
RISC-V: Describe -march behavior for dependent extensions
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
20030125-1.c
blob
1c2ae1724dc24eed35f3ce874b2cf7abe2524d61
1
/* Verify whether math functions are simplified. */
2
/* { dg-require-effective-target c99_runtime } */
3
/* { dg-require-weak "" } */
4
void
abort
(
void
);
5
double
sin
(
double
);
6
double
floor
(
double
);
7
float
8
t
(
float
a
)
9
{
10
return
sin
(
a
);
11
}
12
float
13
q
(
float
a
)
14
{
15
return
floor
(
a
);
16
}
17
double
18
q1
(
float
a
)
19
{
20
return
floor
(
a
);
21
}
22
int
23
main
(
void
)
24
{
25
#ifdef __OPTIMIZE__
26
if
(
t
(
0
)!=
0
)
27
abort
();
28
if
(
q
(
0
)!=
0
)
29
abort
();
30
if
(
q1
(
0
)!=
0
)
31
abort
();
32
#endif
33
return
0
;
34
}
35
__attribute__
((
weak
))
36
double
37
floor
(
double
a
)
38
{
39
abort
();
40
}
41
__attribute__
((
weak
))
42
float
43
floorf
(
float
a
)
44
{
45
return
a
;
46
}
47
__attribute__
((
weak
))
48
double
49
sin
(
double
a
)
50
{
51
return
a
;
52
}
53
__attribute__
((
weak
))
54
float
55
sinf
(
float
a
)
56
{
57
abort
();
58
}