aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.apple/4430041.c
blob: 15ccfa0ca24e3626b49d52c342a6ff20613c6689 (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
29
30
31
32
/* { dg-do compile } */
/* { dg-options "-O3 -gdwarf-2 -fno-common" } */
union {
  int i;
}     a1[10];
int v1;
int v2;
int *p1;

int f1(void);
void f2(void);
static int
f3(int arg1, int arg2, int arg3)
{
  int retval = v2;
  a1[v2++].i = 2;
  a1[v2++].i = arg1;
  a1[v2++].i = arg2;
  a1[v2++].i = arg3;
  if (v2 >= 50000)
    f2();
  return retval;
}

void
f4()
{
  do {
    v1 = f3(v1, p1[1], p1[0]);
    p1 += 2;
  } while (f1());
}