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