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-loop-2c.c
blob
89f08ab6106e21ba82b423acd9df09ac8c7c28db
1
/*
2
loop-2c.c from the execute part of the gcc torture tests.
3
*/
4
5
#include <testfwk.h>
6
7
#ifdef __SDCC
8
#pragma std_c99
9
#endif
10
11
int
a
[
2
];
12
13
static
14
inline
void
f
(
int
b
,
int
o
)
15
{
16
unsigned int
i
;
17
int
*
p
;
18
for
(
p
= &
a
[
b
],
i
=
b
; --
i
< ~
0
; )
19
*--
p
=
i
*
3
+
o
;
20
}
21
22
void
g
(
int
b
)
23
{
24
f
(
b
, (
int
)
a
);
25
}
26
27
void
28
testTortureExecute
(
void
)
29
{
30
a
[
0
] =
a
[
1
] =
0
;
31
g
(
2
);
32
if
(
a
[
0
] != (
int
)
a
||
a
[
1
] != (
int
)
a
+
3
)
33
ASSERT
(
0
);
34
return
;
35
}