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-961223-1.c
blob
947f7eafca0eb1dab4f593b0d26e2de179450a32
1
/*
2
961223-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
// TODO: Enable when sdcc can pass struct!
12
#if 0
13
struct
s
{
14
double
d
;
15
};
16
17
inline
struct
s
18
sub
(
struct
s s
)
19
{
20
s
.
d
+=
1.0
;
21
return
s
;
22
}
23
#endif
24
25
void
26
testTortureExecute
(
void
)
27
{
28
#if 0
29
struct
s t
= {
2.0
};
30
t
=
sub
(
t
);
31
if
(
t
.
d
!=
3.0
)
32
ASSERT
(
0
);
33
return
;
34
#endif
35
}
36