aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr108358-a.c
blob: 342e1c1a5c2d605c2491671074885332543f458d (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
33
/* { dg-do compile } */
/* { dg-options "-Os -fdump-tree-optimized" } */

/* PR tree-optimization/108358 */

struct a {
  int b;
  int c;
  short d;
  int e;
  int f;
};
struct g {
  struct a f;
  struct a h;
};
int i;
void foo();
void bar31_(void);
int main() {
  struct g j, l = {2, 1, 6, 1, 1, 7, 5, 1, 0, 1};
  for (; i; ++i)
    bar31_();
  j = l;
  struct g m = j;
  struct g k = m;
  if (k.h.b)
    ;
  else
    foo();
}
/* The call to foo should be optimized away. */
/* { dg-final { scan-tree-dump-not "foo " "optimized" } } */