struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20000818-1.c
blobdefa1e172779646b7b8aa5881d82dfbb766a1b29
1 /*
2 20000818-1.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #pragma disable_warning 85
10 #endif
12 /* Copyright (C) 2000 Free Software Foundation.
14 by Manfred Hollstein <manfredh@redhat.com> */
16 void *temporary_obstack;
18 static int input (void);
19 static int ISALNUM (int ch);
20 static void obstack_1grow (void **ptr, int ch);
22 int yylex (void);
24 void
25 testTortureExecute (void)
27 int ch = yylex ();
29 return;
32 int yylex (void)
34 int ch;
36 #ifndef WORK_AROUND
37 for (;;)
39 ch = input ();
40 if (ISALNUM (ch))
41 obstack_1grow (&temporary_obstack, ch);
42 else if (ch != '_')
43 break;
45 #else
48 ch = input ();
49 if (ISALNUM (ch))
50 obstack_1grow (&temporary_obstack, ch);
51 } while (ch == '_');
52 #endif
54 return ch;
57 static int input (void)
59 return 0;
62 static int ISALNUM (int ch)
64 return ((ch >= 'A' && ch <= 'Z')
65 || (ch >= 'a' && ch <= 'z')
66 || (ch >= '0' && ch <= '0'));
69 static void obstack_1grow (void **ptr, int ch)