OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [charset/] [builtin2.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* Ensure that transformations of *printf are performed correctly
2
   regardless of -fexec-charset.  See PR 25120.  */
3
 
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" } } */
10
 
11
#include <stdio.h>
12
 
13
void foo (char *dst, const char *src)
14
{
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);
22
 
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);
29
 
30
  sprintf (dst, "hello world\n");
31
  sprintf (dst, "%s", src);
32
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.