Fix typo
[official-gcc.git] / gcc / testsuite / gcc.dg / 20000807-1.c
blobf654764948320ed2bba0b49bafd342f3484e98d4
1 /* { dg-do compile { target i?86-*-* } } */
2 /* { dg-options "-Os -fpic" } */
4 #include <string.h>
6 typedef struct
8 char *a;
9 char *b;
10 } *foo;
12 void
13 bar (foo x)
15 char *c = x->b;
16 char *d = (void *)0;
17 unsigned int e = 0, f = 0, g;
18 while (*c != ':')
19 if (*c == '%')
21 ++c;
22 switch (*c++)
24 case 'N':
25 g = strlen (x->a);
26 if (e + g >= f) {
27 char *h = d;
28 f += 256 + g;
29 d = (char *) __builtin_alloca (f);
30 memcpy (d, h, e);
32 memcpy (&d[e], x->a, g);
33 e += g;
34 break;