summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/tests/warnings/023-switch.vert
blob: 45279710fe82ce09dda69448a3b363c2ac9bdc33 (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
26
27
28
#version 130

void main()
{
  int defined = 2;
  int undefined;
  float fooFloat;
  int fooInt;

  switch(undefined) {
  case 0:
    fooFloat = 0.0;
  case 1:
    fooFloat = 1.0;
  default:
    fooFloat = undefined;
  }

  switch(defined) {
  case 0:
    fooFloat = 0.0;
  case 1:
    fooFloat = 1.0;
  default:
    fooFloat = undefined;
  }
}