Sign in
gnu
/
gcc
/
d769c5040874bf9546f2524f3f1d2a894165f92a
/
.
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
20030626-2.c
blob: 5483d0cba5471aae7dffd8528bdd26b493b270cc [
file
] [
log
] [
blame
]
char
buf
[
40
];
extern
int
sprintf
(
char
*,
const
char
*,
...);
extern
void
abort
(
void
);
int
main
()
{
int
i
=
0
;
int
l
=
sprintf
(
buf
,
"%s"
,
i
++
?
"string"
:
"other string"
);
if
(
l
!=
sizeof
(
"other string"
)
-
1
||
i
!=
1
)
abort
();
return
0
;
}