summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr42878-1.c
blob: 8c21f0f600d652458c9fd405024e0b051967b787 (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
/* { dg-do compile } */
/* { dg-options "-fcompare-debug" } */

struct S {
  int i;
};

extern struct S *e1(void);
extern int e2(int i);

static inline void f1()
{
  int i;
  struct S *s;
  for (i = 0; i < 10; i++)
    s = e1();
  e2(s->i);
}

static inline void f2(int i)
{
  int j = j;
  j = e2(i);
}

void foo(int i)
{
  f1();
  f2(i);
}