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-pr38236.c
blob
554026b1ce4be6175e8485603905ad9e6a233a8d
1
/*
2
pr15262.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
struct
X
{
int
i
; };
12
13
int
14
foo
(
struct
X
*
p
,
int
*
q
,
int
a
,
int
b
)
15
{
16
struct
X x
,
y
;
17
if
(
a
)
18
p
= &
x
;
19
if
(
b
)
20
q
= &
x
.
i
;
21
else
22
q
= &
y
.
i
;
23
*
q
=
1
;
24
return
p
->
i
;
25
}
26
27
void
28
testTortureExecute
(
void
)
29
{
30
if
(
foo
((
void
*)
0
, (
void
*)
0
,
1
,
1
) !=
1
)
31
ASSERT
(
0
);
32
return
;
33
}
34