]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/pr34225.c
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / pr34225.c
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 } */
6
7 typedef __SIZE_TYPE__ size_t;
8 extern int sscanf (const char *, const char *, ...);
9 struct C
10 {
11 char c[240];
12 };
13 struct O
14 {
15 char **o;
16 };
17 struct P
18 {
19 int p1;
20 char p2[256];
21 char p3[256];
22 char p4[256];
23 };
24
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);
30
31 int
32 foo (char *a[], struct O *b, int c, int d, struct P *e, int f, int *h,
33 char *l)
34 {
35 int i, g = 7, m = 0, n;
36 struct C j[150];
37 double *k[150];
38 char o[100];
39
40 if (f1 (o, &j[g]) < 0)
41 g++;
42
43 while (!m)
44 {
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]))
49 {
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);
52 }
53 for (n = 0; n < d; n++)
54 for (i = 0; i < g; i++)
55 {
56 f3 (a[i + 1], "foo");
57 if (f4 (h[i], k[i], e[n].p1) < 0)
58 f3 (a[i + 1], "bar");
59 }
60 }
61 return 0;
62 }