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-20140828-1.c
blob
c2c3975e08419f2222d712c92f6a3b460f6ce1ca
1
/*
2
20140828-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
short
*
f
(
short
*
a
,
int
b
,
int
*
d
);
12
13
short
*
f
(
short
*
a
,
int
b
,
int
*
d
)
14
{
15
short
c
= *
a
;
16
a
++;
17
c
=
b
<<
c
;
18
*
d
=
c
;
19
return
a
;
20
}
21
22
void
23
testTortureExecute
(
void
)
24
{
25
int
d
;
26
short
a
[
2
];
27
a
[
0
] =
0
;
28
if
(
f
(
a
,
1
, &
d
) != &
a
[
1
])
29
ASSERT
(
0
);
30
if
(
d
!=
1
)
31
ASSERT
(
0
);
32
}