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-20000412-3.c
blob
65bcb650c3a7659d6d7bfc60294ab5569b4d0226
1
/*
2
20000412-3.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
// TODO: Enable when struct passing is supported.
12
#if 0
13
typedef
struct
{
14
char
y
;
15
char
x
[
32
];
16
}
X
;
17
18
int
f
(
X x
,
X y
);
19
20
int
z
(
void
)
21
{
22
X xxx
;
23
xxx
.
x
[
0
] =
24
xxx
.
x
[
31
] =
'0'
;
25
xxx
.
y
=
0xf
;
26
return
f
(
xxx
,
xxx
);
27
}
28
#endif
29
30
void
31
testTortureExecute
(
void
)
32
{
33
#if 0
34
int
val
;
35
36
val
=
z
();
37
if
(
val
!=
0x60
)
38
ASSERT
(
0
);
39
return
;
40
#endif
41
}
42
43
#if 0
44
int
f
(
X x
,
X y
)
45
{
46
if
(
x
.
y
!=
y
.
y
)
47
return
'F'
;
48
49
return
x
.
x
[
0
] +
y
.
x
[
0
];
50
}
51
#endif
52