repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR tree-optimization/84740
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
lto
/
20081024_0.c
blob
9fa297abc0e5e15e5be780e5e0de5a200afb8438
1
/* { dg-lto-do run } */
2
3
#include <stdarg.h>
4
#include <stdio.h>
5
#include <string.h>
6
7
char
*
8
myprintf
(
const char
*
fmt
, ...)
9
{
10
va_list
args
;
11
static char
buf
[
80
];
12
13
va_start
(
args
,
fmt
);
14
(
void
)
vsnprintf
(
buf
,
sizeof
(
buf
),
fmt
,
args
);
15
va_end
(
args
);
16
return
buf
;
17
}
18
19
int
20
main
()
21
{
22
char
*
s
;
23
24
s
=
myprintf
(
"%s: %d
\n
"
,
"foo"
,
1
);
25
return
strcmp
(
s
,
"foo: 1
\n
"
) !=
0
;
26
}