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-950809-1.c
blob
864995544e86f912f20a06b28cac4e039fd4d8e8
1
/*
2
950809-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
struct
S
12
{
13
int
*
sp
,
fc
, *
sc
,
a
[
2
];
14
};
15
16
void
17
f
(
struct
S
*
x
)
18
{
19
int
*
t
=
x
->
sc
;
20
int
t1
=
t
[
0
];
21
int
t2
=
t
[
1
];
22
int
t3
=
t
[
2
];
23
int
a0
=
x
->
a
[
0
];
24
int
a1
=
x
->
a
[
1
];
25
t
[
2
] =
t1
;
26
t
[
0
] =
a1
;
27
x
->
a
[
1
] =
a0
;
28
x
->
a
[
0
] =
t3
;
29
x
->
fc
=
t2
;
30
x
->
sp
=
t
;
31
}
32
33
void
34
testTortureExecute
(
void
)
35
{
36
struct
S s
;
37
static int
sc
[
3
] = {
2
,
3
,
4
};
38
s
.
sc
=
sc
;
39
s
.
a
[
0
] =
10
;
40
s
.
a
[
1
] =
11
;
41
f
(&
s
);
42
ASSERT
(
s
.
sp
[
2
] ==
2
);
43
return
;
44
}
45