summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/uninit-pred-6_d.c
blob: 704c3e6e1d1a9dd8278dc70efb8ba8fb3c98cf74 (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
/* { 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)
    v = r;

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

  if ( n && l)
      blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */

  return 0;
}