Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / pr34225.c
blobe3373403a9cd985ee7bc3bb2e5e9f5fbaa8a9f11
1 /* PR target/34225 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fno-strict-aliasing -fstack-protector" } */
4 /* { dg-require-effective-target fstack_protector } */
5 /* { dg-require-effective-target size20plus } */
7 typedef __SIZE_TYPE__ size_t;
8 extern int sscanf (const char *, const char *, ...);
9 struct C
11 char c[240];
13 struct O
15 char **o;
17 struct P
19 int p1;
20 char p2[256];
21 char p3[256];
22 char p4[256];
25 extern void *s;
26 extern int f1 (char *, struct C *);
27 extern void f2 (void *, const char *);
28 extern void f3 (char *, const char *);
29 extern int f4 (int, double *, int);
31 int
32 foo (char *a[], struct O *b, int c, int d, struct P *e, int f, int *h,
33 char *l)
35 int i, g = 7, m = 0, n;
36 struct C j[150];
37 double *k[150];
38 char o[100];
40 if (f1 (o, &j[g]) < 0)
41 g++;
43 while (!m)
45 f2 (s, "xxx");
46 for (i = 0; i < f; i++)
47 if ((!b->o && __builtin_strncmp (l, "abcde", 5) == 0)
48 || (b->o && !b->o[c]))
50 *e[d].p4 = *e[d].p3 = *e[d].p2 = 0;
51 sscanf (l, "%s %s %[^\n]", e[d].p3, e[d].p2, e[d].p4);
53 for (n = 0; n < d; n++)
54 for (i = 0; i < g; i++)
56 f3 (a[i + 1], "foo");
57 if (f4 (h[i], k[i], e[n].p1) < 0)
58 f3 (a[i + 1], "bar");
61 return 0;