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-920520-1.c
blob
27d794ce354ac5b4f4acf2453fe48f1fe011a3f4
1
/*
2
920520-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
void
12
foo
(
int
*
bar
)
13
{
14
*
bar
=
8
;
15
}
16
17
int
18
bugger
(
void
)
19
{
20
int
oldDepth
,
newDepth
;
21
22
foo
(&
oldDepth
);
23
24
switch
(
oldDepth
)
25
{
26
case
8
:
27
case
500
:
28
newDepth
=
8
;
29
break
;
30
31
case
5000
:
32
newDepth
=
500
;
33
break
;
34
35
default
:
36
newDepth
=
17
;
37
break
;
38
}
39
40
return
newDepth
-
oldDepth
;
41
}
42
43
void
44
testTortureExecute
(
void
)
45
{
46
ASSERT
((
bugger
() ==
0
));
47
return
;
48
}
49