diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/bugs/gh-75.hlsl | 24 | ||||
| -rw-r--r-- | tests/bugs/gh-75.hlsl.expected | 6 |
2 files changed, 30 insertions, 0 deletions
diff --git a/tests/bugs/gh-75.hlsl b/tests/bugs/gh-75.hlsl new file mode 100644 index 000000000..fbaaf6a73 --- /dev/null +++ b/tests/bugs/gh-75.hlsl @@ -0,0 +1,24 @@ +//TEST:SIMPLE:-profile cs_5_0 + +// Missing opening `{` sends parser into infinite loop + +struct LightCB +{ + float3 vec3Val; // We're using 2 values. [0]: worldDir [1]: intensity +}; + +StructuredBuffer<LightCB> gLightIn; +AppendStructuredBuffer<LightCB> gLightOut; + +[numthreads(1, 1, 1)] +void main() +{ + uint numLights = 0; + uint stride; + gLightIn.GetDimensions(numLights, stride); + + for (uint i = 0; i < numLights; i++) + + gLightOut.Append(gLightIn[i]); + } +}
\ No newline at end of file diff --git a/tests/bugs/gh-75.hlsl.expected b/tests/bugs/gh-75.hlsl.expected new file mode 100644 index 000000000..345acd804 --- /dev/null +++ b/tests/bugs/gh-75.hlsl.expected @@ -0,0 +1,6 @@ +result code = -1 +standard error = { +tests/bugs/gh-75.hlsl(24): error 20001: unexpected '}', expected identifier +} +standard output = { +} |
