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 inline-asm/84742
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
printf-1.c
blob
654e62766a85e879a3c0a3920788a3845415d1db
1
/* { dg-skip-if "requires io" { freestanding } } */
2
3
#include <stdio.h>
4
#include <stdlib.h>
5
6
int
7
main
(
void
)
8
{
9
#define test(ret, args...) \
10
printf (args); \
11
if (printf (args) != ret) \
12
abort ();
13
test
(
5
,
"hello"
);
14
test
(
6
,
"hello
\n
"
);
15
test
(
1
,
"a"
);
16
test
(
0
,
""
);
17
test
(
5
,
"%s"
,
"hello"
);
18
test
(
6
,
"%s"
,
"hello
\n
"
);
19
test
(
1
,
"%s"
,
"a"
);
20
test
(
0
,
"%s"
,
""
);
21
test
(
1
,
"%c"
,
'x'
);
22
test
(
7
,
"%s
\n
"
,
"hello
\n
"
);
23
test
(
2
,
"%d
\n
"
,
0
);
24
return
0
;
25
}