aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr61197.c
blob: 919578b7ff7f953be8bd6de96c09c8ffeadab555 (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
/* { dg-do run } */
/* { dg-options "-O3" } */

int a, b = 1, *c = &a; 

int
foo ()
{
  if (b)
    b |= 1;
  else
    {
      b = 1;
      return 0;
    }
  return 1;
}

int
main ()
{
  *c = foo ();
  if (a != 1) 
    __builtin_abort (); 
  return 0;
}