summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-02-21 13:59:30 -0800
committerGitHub <noreply@github.com>2024-02-21 13:59:30 -0800
commit0b46715bff7f047fefed303ae149d3de8eb6be4f (patch)
tree3254b6d8fb97926f2c8831e344606a5f6dcfa97e /tests
parent255ecf7993cc69d38525af7e711c24fae6f94ba5 (diff)
Fix parsing of literals in stdlib. (#3610)
* Fix parsing of literals in stdlib. * Fix double lit limits.
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs/gh-3589.slang18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/bugs/gh-3589.slang b/tests/bugs/gh-3589.slang
new file mode 100644
index 000000000..58bb74f37
--- /dev/null
+++ b/tests/bugs/gh-3589.slang
@@ -0,0 +1,18 @@
+//TEST:SIMPLE(filecheck=CHECK): -target hlsl -entry main -profile cs_6_0
+RWStructuredBuffer<int64_t> outputBuffer;
+RWStructuredBuffer<double> outputBuffer2;
+
+void main(uint id: SV_DispatchThreadID)
+{
+ let i = int64_t.maxValue;
+ let m = int64_t.minValue;
+ // CHECK: 9223372036854775807LL
+ // CHECK: -9223372036854775808LL
+ outputBuffer[0] = i;
+ outputBuffer[1] = m;
+
+ // CHECK: -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0
+ outputBuffer2[0] = double.minValue;
+ // CHECK: 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0
+ outputBuffer2[1] = double.maxValue;
+} \ No newline at end of file