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-950322-1.c
blob
0b92c60369a2e8c4927a762fb7fb0d2566d4bcbc
1
/*
2
950322-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
int
12
f
(
unsigned char
*
a
)
13
{
14
int
i
,
j
;
15
int
x
,
y
;
16
17
j
=
a
[
1
];
18
i
=
a
[
0
] -
j
;
19
if
(
i
<
0
)
20
{
21
x
=
1
;
22
y
= -
i
;
23
}
24
else
25
{
26
x
=
0
;
27
y
=
i
;
28
}
29
return
x
+
y
;
30
}
31
32
void
33
testTortureExecute
(
void
)
34
{
35
unsigned char
a
[
2
];
36
a
[
0
] =
8
;
37
a
[
1
] =
9
;
38
ASSERT
(
f
(
a
) ==
2
);
39
return
;
40
}
41