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-divconst-1.c
blob
ec0ff8a4ee39e11c9f602bb670c299758fd60df7
1
/*
2
divconst-1.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
typedef
struct
12
{
13
unsigned
a
,
b
,
c
,
d
;
14
}
t1
;
15
16
void
17
f
(
t1
*
ps
)
18
{
19
ps
->
a
=
10000
;
20
ps
->
b
=
ps
->
a
/
3
;
21
ps
->
c
=
10000
;
22
ps
->
d
=
ps
->
c
/
3
;
23
}
24
25
void
26
testTortureExecute
(
void
)
27
{
28
t1 s
;
29
f
(&
s
);
30
ASSERT
(!(
s
.
a
!=
10000
||
s
.
b
!=
3333
||
s
.
c
!=
10000
||
s
.
d
!=
3333
));
31
return
;
32
}