OSDN Git Service

4f98da4a3a7f058b56f4ef2fc5a5613646f83567
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / lto / 20100423-2_0.c
1 /* { dg-lto-do link } */
2 /* { dg-lto-options {{-O2 -flto} {-O2 -fwhopr} {-O3 -flto} {-O3 -fwhopr}} } */
3
4 typedef unsigned int size_t;
5 extern struct _IO_FILE *stderr;
6 typedef unsigned char uch;
7 extern uch inbuf[];
8 unsigned insize;
9 char *progname;
10 extern void read_error (void);
11 int fill_inbuf(int eof_ok)
12 {
13   if (insize == 0) 
14     {
15       if (eof_ok)
16         return -1;
17       read_error();
18     }
19   return inbuf[0];
20 }
21 void read_error(void)
22 {
23   __builtin_fprintf(stderr, "\n%s: ", progname);
24 }
25