aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr17141-2.c
blob: 37782cafe8f293a592c1ea9a2ee36d051cd93950 (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 "-O2 -fdump-tree-optimized" } */



void abort (void);
struct a
{
  int i;
} *a;
int f(void)
{
  int *ii = &a->i;
  void *l;
  a->i = 1;
  if (*ii)
   l = &&l1;
  else
   l = &&l2;
  goto *l;
l1:
  return 0;
l2:
  abort ();
}


/* { dg-final { scan-tree-dump-times "&" 0 "optimized" } } */
/* { dg-final { scan-tree-dump-times "abort" 0 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */