Add test case for continue out of switch default block.

This commit is contained in:
Hans-Kristian Arntzen 2018-09-18 10:58:24 +02:00
parent de365f2e21
commit a985ac9499
3 changed files with 152 additions and 0 deletions

View File

@ -0,0 +1,68 @@
#version 310 es
precision mediump float;
precision highp int;
layout(location = 0) out vec4 fragColor;
vec4 _83;
void main()
{
mediump int _18 = int(_83.x);
highp vec4 _85;
_85 = _83;
highp vec4 _92;
for (int _84 = 0; _84 < _18; _85 = _92, _84++)
{
highp vec4 _86;
switch (_18)
{
case 0:
{
highp vec4 _76 = _85;
_76.y = 0.0;
_86 = _76;
break;
}
case 1:
{
highp vec4 _78 = _85;
_78.y = 1.0;
_86 = _78;
break;
}
default:
{
int _87;
highp vec4 _91;
_91 = _85;
_87 = 0;
mediump int _50;
for (;;)
{
_50 = _87 + 1;
if (_87 < _18)
{
highp vec4 _74 = _91;
_74.y = _91.y + 0.5;
_91 = _74;
_87 = _50;
continue;
}
else
{
break;
}
}
_92 = _91;
continue;
}
}
highp vec4 _82 = _86;
_82.y = _86.y + 0.5;
_92 = _82;
continue;
}
fragColor = _85;
}

View File

@ -0,0 +1,50 @@
#version 310 es
precision mediump float;
precision highp int;
layout(location = 0) out vec4 fragColor;
void main()
{
vec4 f4;
mediump int c = int(f4.x);
for (mediump int j = 0; j < c; j++)
{
switch (c)
{
case 0:
{
f4.y = 0.0;
break;
}
case 1:
{
f4.y = 1.0;
break;
}
default:
{
mediump int i = 0;
for (;;)
{
mediump int _48 = i;
mediump int _50 = _48 + 1;
i = _50;
if (_48 < c)
{
f4.y += 0.5;
continue;
}
else
{
break;
}
}
continue;
}
}
f4.y += 0.5;
}
fragColor = f4;
}

View File

@ -0,0 +1,34 @@
#version 310 es
precision mediump float;
layout(location = 0) out vec4 fragColor;
void main()
{
vec4 f4;
int c = int(f4.x);
for (int j = 0; j < c; j++)
{
switch (c)
{
case 0:
f4.y = 0.0;
break;
case 1:
f4.y = 1.0;
break;
default:
{
int i = 0;
while (i++ < c) {
f4.y += 0.5;
}
continue;
}
}
f4.y += 0.5;
}
fragColor = f4;
}