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-20011109-1.c
blob
89e43272cadc5980345bcb5210900e41fb581987
1
/*
2
20011109-1.c from the execute part of the gcc torture tests.
3
*/
4
5
#include <testfwk.h>
6
7
#ifdef __SDCC
8
#pragma std_c99
9
#endif
10
11
void
fail1
(
void
)
12
{
13
ASSERT
(
0
);
14
}
15
void
fail2
(
void
)
16
{
17
ASSERT
(
0
);
18
}
19
void
fail3
(
void
)
20
{
21
ASSERT
(
0
);
22
}
23
void
fail4
(
void
)
24
{
25
ASSERT
(
0
);
26
}
27
28
29
void
foo
(
long
x
)
30
{
31
switch
(
x
)
32
{
33
case
-
6
:
34
fail1
();
break
;
35
case
0
:
36
fail2
();
break
;
37
case
1
:
case
2
:
38
break
;
39
case
3
:
case
4
:
case
5
:
40
fail3
();
41
break
;
42
default
:
43
fail4
();
44
break
;
45
}
46
switch
(
x
)
47
{
48
49
case
-
3
:
50
fail1
();
break
;
51
case
0
:
case
4
:
52
fail2
();
break
;
53
case
1
:
case
3
:
54
break
;
55
case
2
:
case
8
:
56
ASSERT
(
0
);
57
break
;
58
default
:
59
fail4
();
60
break
;
61
}
62
}
63
64
void
65
testTortureExecute
(
void
)
66
{
67
foo
(
1
);
68
return
;
69
}
70