summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/uninit-pr19430-2.c
blob: 361a6a0bbdab5878d7c641374894947587a1738a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile } */
/* { dg-options "-O -Wuninitialized" } */

int  *p, *q;

int foo (int b)
{
  int i, j = 0;
  int *x;
  p = &i;
  q = &j;
  if (b)
    x = p;
  else
    x = q;
  return *x;
}