summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/uninit-pred-4.C
blob: 94ab13c50d6f147d7c30c516b05da208ff0e48a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile } */
/* { dg-options "-Wuninitialized -Og" } */

int pop ();
int pop_first_bucket;

int my_pop ()
{
  int out;  // { dg-bogus "uninitialized" "uninitialized variable warning" }

  while (pop_first_bucket)
    if (pop_first_bucket && (out = pop()))
      return out;

  return 0;
}