repo.or.cz
/
sdcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
struct / union in initializer, RFE #901.
[sdcc.git]
/
sdcc
/
support
/
regression
/
tests
/
gcc-torture-execute-20020413-1.c
blob
3b973b5a28ac5d4408facdf4c5768dff19cf5ebb
1
/*
2
20020413-1.c from the execute part of the gcc torture suite.
3
*/
4
5
#include <testfwk.h>
6
7
#ifdef __SDCC
8
#pragma std_c99
9
#endif
10
11
#if 0
// TODO: Enable when long double is supported!
12
void
ftest
(
long double
val
,
int
*
eval
)
13
{
14
long double
tmp
=
1.0l
;
15
int
i
=
0
;
16
17
if
(
val
<
0.0l
)
18
val
= -
val
;
19
20
if
(
val
>=
tmp
)
21
while
(
tmp
<
val
)
22
{
23
tmp
*=
2.0l
;
24
if
(
i
++ >=
10
)
25
ASSERT
(
0
);
26
}
27
else if
(
val
!=
0.0l
)
28
while
(
val
<
tmp
)
29
{
30
tmp
/=
2.0l
;
31
if
(
i
++ >=
10
)
32
ASSERT
(
0
);
33
}
34
35
*
eval
=
i
;
36
}
37
#endif
38
39
void
testTortureExecute
(
void
)
40
{
41
#if 0
42
int
eval
;
43
44
ftest
(
3.0
, &
eval
);
45
ftest
(
3.5
, &
eval
);
46
ftest
(
4.0
, &
eval
);
47
ftest
(
5.0
, &
eval
);
48
return
;
49
#endif
50
}
51