OSDN Git Service

2004-10-05 Andrew Pinski <pinskia@physics.uc.edu>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.c-torture / unsorted / cp.c
1 struct _obstack_chunk
2 {
3   char  *limit;
4   struct _obstack_chunk *prev;
5   char  contents[4];
6 };
7
8 struct obstack
9 {
10   long  chunk_size;
11   struct _obstack_chunk* chunk;
12   char  *object_base;
13   char  *next_free;
14   char  *chunk_limit;
15   int   temp;
16   int   alignment_mask;
17   struct _obstack_chunk *(*chunkfun) ();
18   void (*freefun) ();
19 };
20
21 struct fooalign {char x; double d;};
22 union fooround {long x; double d;};
23
24 void
25 _obstack_begin (h, size, alignment, chunkfun, freefun)
26      struct obstack *h;
27      int size;
28      int alignment;
29      void *  (*chunkfun) ();
30      void (*freefun) ();
31 {
32   register struct _obstack_chunk* chunk;
33
34   if (alignment == 0)
35     alignment = ((char *)&((struct fooalign *) 0)->d - (char *)0);
36   if (size == 0)
37     {
38       int extra = 4;
39       if (extra < (sizeof (union fooround)))
40         extra = (sizeof (union fooround));
41     }
42 }