aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/uninit-B-O0.c
blob: e2883a38ea876652d58054bf739924d7b85f2230 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* Origin: PR c/179 from Gray Watson <gray@256.com>, adapted as a testcase
   by Joseph Myers <jsm28@cam.ac.uk>.  */
/* { dg-do compile } */
/* { dg-options "-Wuninitialized" } */
extern void foo (int *);
extern void bar (int);

void
baz (void)
{
  int i;
  if (i) /* { dg-warning "uninit" "uninit i warning" { xfail *-*-* } } */
    bar (i);
  foo (&i);
}