summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/uninit-pr61409.c
blob: c27a67bd07ff146d2369beedfde5e86ba8490d62 (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
25
/* { dg-do compile } */
/* { dg-options "-O2 -Wuninitialized" } */

int *rw;
int line_height;
int pixel_width;
int text_cols;
int width1, width2, width3;

void *pointer;

void f (int i, int j)
{
  void *ptr;
  if (i)
    {
      if (j)
	return;
      ptr = pointer;
    }
  pixel_width = 1234 + width1 + 2 * width2 + 2 * width3;
  *rw = text_cols + line_height;
  if (i)
    rw=ptr; /* { dg-bogus "uninitialized" "bogus warning" } */
}