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
Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git]
/
sdcc
/
support
/
regression
/
tests
/
gcc-torture-execute-990525-2.c
blob
2b2411e4589ff27fa468a377d0a553a474cd01b1
1
/*
2
990525-2.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 return struct!
12
#if 0
13
typedef
struct
{
14
int
v
[
4
];
15
}
Test1
;
16
17
Test1
func2
();
18
19
int
func1
()
20
{
21
Test1 test
;
22
test
=
func2
();
23
24
if
(
test
.
v
[
0
] !=
10
)
25
ASSERT
(
0
);
26
if
(
test
.
v
[
1
] !=
20
)
27
ASSERT
(
0
);
28
if
(
test
.
v
[
2
] !=
30
)
29
ASSERT
(
0
);
30
if
(
test
.
v
[
3
] !=
40
)
31
ASSERT
(
0
);
32
}
33
34
Test1
func2
()
35
{
36
Test1 tmp
;
37
tmp
.
v
[
0
] =
10
;
38
tmp
.
v
[
1
] =
20
;
39
tmp
.
v
[
2
] =
30
;
40
tmp
.
v
[
3
] =
40
;
41
return
tmp
;
42
}
43
#endif
44
45
void
46
testTortureExecute
(
void
)
47
{
48
#if 0
49
func1
();
50
return
;
51
#endif
52
}
53