Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.dg / charset / builtin2.c
blobbfe9a20e25b3ed3971f6b0aa1946894a38e08d4c
1 /* Ensure that transformations of *printf are performed correctly
2 regardless of -fexec-charset. See PR 25120. */
4 /* { dg-do compile } */
5 /* { dg-require-iconv "IBM1047" } */
6 /* { dg-options "-O2 -fexec-charset=IBM1047" } */
7 /* { dg-final { scan-assembler-not "printf" } } */
8 /* { dg-final { scan-assembler-not "fprintf" } } */
9 /* { dg-final { scan-assembler-not "sprintf" } } */
11 #include <stdio.h>
13 void foo (char *dst, const char *src)
15 printf ("\n");
16 printf ("hello world\n");
17 printf ("%s", "\n");
18 printf ("%s", "hello world\n");
19 printf ("%c", '\n');
20 printf ("%s\n", "hello world");
21 printf ("%s\n", src);
23 fprintf (stdout, "\n");
24 fprintf (stdout, "hello world\n");
25 fprintf (stdout, "%s", "\n");
26 fprintf (stdout, "%s", "hello world\n");
27 fprintf (stdout, "%c", '\n');
28 fprintf (stdout, "%s", src);
30 sprintf (dst, "hello world\n");
31 sprintf (dst, "%s", src);