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-20010106-1.c
blob
553e99881cca4c1e2bc7ce31837e61d14dacced0
1
/*
2
20010106-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
/* Copyright 2001 Free Software Foundation
12
Contributed by Alexandre Oliva <aoliva@redhat.com> */
13
14
int
f
(
int
i
) {
15
switch
(
i
)
16
{
17
case
-
2
:
18
return
33
;
19
case
-
1
:
20
return
0
;
21
case
0
:
22
return
7
;
23
case
1
:
24
return
4
;
25
case
2
:
26
return
3
;
27
case
3
:
28
return
15
;
29
case
4
:
30
return
9
;
31
default
:
32
ASSERT
(
0
);
33
}
34
}
35
36
void
37
testTortureExecute
(
void
) {
38
if
(
f
(-
1
))
39
ASSERT
(
0
);
40
return
;
41
}
42