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-3215.c
blob
862d825bdfecd4f7330708f4b5f4efde324969d5
1
/*
2
bug-3215.c
3
A bug in merging sequences of puts
4
*/
5
6
#include <testfwk.h>
7
8
#pragma disable_warning 283
9
10
#include <stdio.h>
11
12
void
foo
(
void
);
13
14
int
15
bug
()
16
{
17
puts
(
"1"
);
18
puts
(
"2"
);
19
20
foo
();
21
22
// Second sequence used same string as first one.
23
puts
(
"4"
);
24
puts
(
"5"
);
25
return
0
;
26
}
27
28
#ifndef PORT_HOST
29
int
putchar
(
int
c
)
30
{
31
static int
i
;
32
ASSERT
(
c
==
"1
\n
2
\n
4
\n
5
\n
"
[
i
++]);
33
}
34
#endif
35
36
void
foo
(
void
)
37
{
38
}
39
40
void
41
testBug
(
void
)
42
{
43
bug
();
44
}
45