summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/ipa/pr42706.c
blob: 9c5f43af36fbba3720c081fcc7dd933833c55951 (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
/* { dg-do compile } */
/* { dg-options "-O2 -fno-early-inlining -fipa-sra"  } */

struct S
{
  float red;
  int green;
  void *blue;
};

extern int gi;
static int foo ();

int
bar (void)
{
  foo ();
  return 0;
}

static int
foo (struct S s)
{
  gi = s.green;
  return 0;
}