PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / gcc.dg / pr84875.c
blob257176de205c94443d033cb2e9c81810614a0780
1 /* PR debug/84875 */
2 /* { dg-do compile } */
3 /* { dg-options "-Os" } */
4 /* { dg-additional-options "-fpie" { target pie } } */
5 /* { dg-additional-options "-march=z196" { target s390*-*-* } } */
7 static long *a[100];
8 static int b[100];
9 long *c;
10 int d;
11 void foo (long *);
13 void
14 bar ()
16 long *g = c;
17 g--;
18 d = *g;
19 if (d)
20 if (b[d] < 8)
22 *(void **)g = a[d];
23 a[d] = g;
24 b[d]++;
25 return;
27 foo (g);