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-pr83362.c
blob
c00a6066ce9cc21c9f78a7ae6a56f12793164a5e
1
/*
2
pr83362.c from the execute part of the gcc torture tests.
3
*/
4
5
#include <testfwk.h>
6
7
#include <stdint.h>
8
9
typedef
uint8_t
u8
;
10
typedef
uint32_t
u32
;
11
12
#if !defined(__SDCC_pdk14)
// Lack of memory
13
u32 a
,
b
,
d
,
e
;
14
u8 c
;
15
16
static
u32
17
foo
(
u32 p
)
18
{
19
do
20
{
21
e
/=
0xfff
;
22
if
(
p
>
c
)
23
d
=
0
;
24
e
-=
3
;
25
e
*=
b
<=
a
;
26
}
27
while
(
e
>=
88030
);
28
return
e
;
29
}
30
#endif
31
32
void
33
testTortureExecute
(
void
)
34
{
35
#if !defined(__SDCC_pdk14)
// Lack of memory
36
u32 x
=
foo
(
1164
);
37
if
(
x
!=
0xfd
)
38
ASSERT
(
0
);
39
return
;
40
#endif
41
}
42
43