Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.c-torture / execute / builtins / lib / printf.c
blob2f8c133177c438f073cccd72fe198d2c9c329161
1 #include <stdio.h>
2 #include <stdarg.h>
3 extern void abort (void);
4 extern int inside_main;
6 int
7 printf (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 = vprintf (string, ap);
17 va_end (ap);
18 return r;
22 /* Locking stdio doesn't matter for the purposes of this test. */
23 int
24 printf_unlocked (const char *string, ...)
26 va_list ap;
27 int r;
28 #ifdef __OPTIMIZE__
29 if (inside_main)
30 abort();
31 #endif
32 va_start (ap, string);
33 r = vprintf (string, ap);
34 va_end (ap);
35 return r;