summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/gcc.c-torture/execute/builtins/lib/fprintf.c
blob: f32cf3a050b0110224aae46d32a474f969c231b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <stdio.h>
#include <stdarg.h>
extern void abort (void);
extern int inside_main;

int
fprintf (FILE *fp, const char *string, ...)
{
  va_list ap;
  int r;
#ifdef __OPTIMIZE__
  if (inside_main)
    abort();
#endif
  va_start (ap, string);
  r = vfprintf (fp, string, ap);
  va_end (ap);
  return r;
}
OpenPOWER on IntegriCloud