aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr84875.c
blob: 257176de205c94443d033cb2e9c81810614a0780 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* PR debug/84875 */
/* { dg-do compile } */
/* { dg-options "-Os" } */
/* { dg-additional-options "-fpie" { target pie } } */
/* { dg-additional-options "-march=z196" { target s390*-*-* } } */

static long *a[100];
static int b[100];
long *c;
int d;
void foo (long *);

void
bar ()
{
  long *g = c;
  g--;
  d = *g;
  if (d)
    if (b[d] < 8)
      {
	*(void **)g = a[d];
	a[d] = g;
	b[d]++;
	return;
      }
  foo (g);
}