Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.c-torture / execute / builtins / lib / fprintf.c
bloba22db41d800e4f94afa44b3911bc42050208e2b6
1 #include <stdio.h>
2 #include <stdarg.h>
3 extern void abort (void);
4 extern int inside_main;
6 int
7 fprintf (FILE *fp, const char *string, ...)
9 va_list ap;
10 int r;
11 #ifdef __OPTIMIZE__
12 if (inside_main)
13 abort();
14 #endif
15 va_start (ap, string);
16 r = vfprintf (fp, string, ap);
17 va_end (ap);
18 return r;
21 /* Locking stdio doesn't matter for the purposes of this test. */
22 int
23 fprintf_unlocked (FILE *fp, const char *string, ...)
25 va_list ap;
26 int r;
27 #ifdef __OPTIMIZE__
28 if (inside_main)
29 abort();
30 #endif
31 va_start (ap, string);
32 r = vfprintf (fp, string, ap);
33 va_end (ap);
34 return r;