summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/vrp42.c
blob: 79eb22cb1e4f35bb223375b823932a214dfcfd46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do compile } */
/* { dg-options "-O2 -Wuninitialized" } */

int foo(int val)
{
  int tmp;
  if ((val > 5) && (val < 8))
    {
      switch (val)
        {
        case 6:
          tmp = 1;
          break;
        case 7:
          tmp = 2;
          break;
        }
      return tmp; /* { dg-bogus "used uninitialized" } */
    }
  return 0;
}