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
/
bug-3007.c.in
blob
1acc518e87277d60056443379c14ab4466206fc5
1
/* bug 3007
2
type: char, int, long, long long
3
*/
4
#include <testfwk.h>
5
6
{
type
}
a
=
0
;
7
8
void
inc
(
void
)
9
{
10
a
++;
11
}
12
13
void
testBug
(
void
)
14
{
15
{
type
}
i
;
16
for
(
i
=
0
;
i
< ({
type
})
300
;
i
++)
17
inc
();
18
ASSERT
(
a
== ({
type
})
300
);
19
}
20
21
{
type
}
a1
,
a2
;
22
23
void
inc2
(
void
)
24
{
25
while
(--
a1
)
26
a2
++;
27
}
28
29
void
testBug2
(
void
)
30
{
31
a1
=
31
;
32
inc2
();
33
ASSERT
(
a1
==
0
);
34
ASSERT
(
a2
==
30
);
35
}
36