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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [lto/] [20081024_0.c] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 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.