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-20000801-2.c
blob
76222ccf72cc3cb4f6f4ced68a0f6335c36e46c5
1
/*
2
20000801-2.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
int
bar
(
void
);
12
int
baz
(
void
);
13
14
struct
foo
{
15
struct
foo
*
next
;
16
};
17
18
struct
foo
*
test
(
struct
foo
*
node
)
19
{
20
while
(
node
) {
21
if
(
bar
() && !
baz
())
22
break
;
23
node
=
node
->
next
;
24
}
25
return
node
;
26
}
27
28
int
bar
(
void
)
29
{
30
return
0
;
31
}
32
33
int
baz
(
void
)
34
{
35
return
0
;
36
}
37
38
void
39
testTortureExecute
(
void
)
40
{
41
struct
foo a
,
b
, *
c
;
42
43
a
.
next
= &
b
;
44
b
.
next
= (
struct
foo
*)
0
;
45
c
=
test
(&
a
);
46
if
(
c
)
47
ASSERT
(
0
);
48
return
;
49
}
50