OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gcc.dg/] [lto/] [20081024_0.c] - Blame information for rev 384

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-lto-do run } */
2
 
3
#include <stdarg.h>
4
#include <stdio.h>
5
#include <string.h>
6
 
7
char *
8
myprintf (const char *fmt, ...)
9
{
10
  va_list args;
11
  static char buf[80];
12
 
13
  va_start (args, fmt);
14
  (void) vsnprintf (buf, sizeof (buf), fmt, args);
15
  va_end (args);
16
  return buf;
17
}
18
 
19
int
20
main ()
21
{
22
  char *s;
23
 
24
  s = myprintf ("%s: %d\n", "foo", 1);
25
  return strcmp (s, "foo: 1\n") != 0;
26
}

powered by: WebSVN 2.1.0

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