summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr46440.c
blob: 12a99970348dfcdb29e5cfcd8913fc2166a93c61 (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
/* PR rtl-optimization/46440 */
/* { dg-do compile } */
/* { dg-options "-O -fstack-protector -fno-tree-dominator-opts -fno-tree-fre" } */
/* { dg-require-effective-target fstack_protector } */

int i;

void bar (char *);

void
foo (void)
{
  void *l;
  char c[64];
  bar (c);
  i = 1;
  if (i)
    l = &&l1;
  else
    l = &&l2;
  goto *l;
l2:
  __builtin_abort ();
l1:;
}