summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr77445.c
blob: 98eb0f2cec61c24a8ecc09505f2cd98aa6cd13bd (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
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-thread3-details-blocks -fno-early-inlining -fno-tree-vrp -fno-tree-dominator-opts" } */

static int a;
static int b;
void test2 ();
void
test ()
{
  b = 7;
}

void
main (int argc)
{
  if (argc)
    {
      a = 7;
      test ();
    }
  else
    a = 0;
  if (a)
    test2 ();
  if (b)
    test2 ();
}
/* { dg-final { scan-tree-dump-times "Registering FSM jump thread" 2 "thread3" } } */
/* { dg-final { scan-tree-dump-not "Invalid sum" "thread3" } } */