summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/uninit-pred-9_a.c
blob: 67fb8ab9778f94ed7d2d6fa9d12f2d036d8bc37d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* { dg-do compile } */
/* { dg-options "-Wuninitialized -O2" } */

int g;
void bar();
void blah(int);

int foo (int n, int l, int m, int r)
{
  int v;

  if ( (n < 10) && (m == l)  && (r < 20) )
    v = r;

  if (m) g++; 
  else  bar();

  if ( (n <= 8) &&  (m == l)  && (r < 19) )
      blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */

  return 0;
}