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 middle-end/77357 - strlen of constant strings not folded
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
20030626-2.c
blob
5483d0cba5471aae7dffd8528bdd26b493b270cc
1
char
buf
[
40
];
2
3
extern
int
sprintf
(
char
*,
const char
*, ...);
4
extern
void
abort
(
void
);
5
6
int
main
()
7
{
8
int
i
=
0
;
9
int
l
=
sprintf
(
buf
,
"%s"
,
i
++ ?
"string"
:
"other string"
);
10
if
(
l
!=
sizeof
(
"other string"
) -
1
||
i
!=
1
)
11
abort
();
12
return
0
;
13
}
14