PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / gcc.dg / pr64007.c
blobcb0e50f6cb8dd155eb6535f3a881fed6c4f94507
1 /* { dg-options " -O3 " } */
2 /* { dg-do run } */
4 #include <assert.h>
6 int d, i;
8 struct S
10 int f0;
11 } *b, c, e, h, **g = &b;
13 static struct S *f = &e;
15 int
16 fn1 (int p)
18 int a = 0;
19 return a || p < 0 || p >= 2 || 1 >> p;
22 int
23 main ()
25 int k = 1, l, *m = &c.f0;
27 for (;;)
29 l = fn1 (i);
30 *m = k && i;
31 if (l)
33 int n[1] = {0};
35 break;
38 *g = &h;
40 assert (b);
42 if (d)
43 (*m)--;
44 d = (f != 0) | (i >= 0);
46 if (c.f0 != 0)
47 __builtin_abort ();
49 return 0;