xgopilot
8a451eef09
test: Add issue #961 examples to _cmptest for Go vs LLGo comparison
Created _cmptest/issue961/typeconv.go with 15 test cases covering:
- Integer overflow wrapping (int8, int16)
- Signed/unsigned conversions
- Float-to-int conversions
- Sign extension and zero extension
- Type truncation
- Edge cases (negation overflow, division by -1)
Test reveals 9 differences between Go and LLGo output, confirming
the bugs reported in issue #961:
1. int8(127) + 1: LLGo outputs 128 instead of -128
2. int8(100) + int8(50): LLGo outputs 150 instead of -106
3. int8(64) * 2: LLGo outputs 128 instead of -128
4. Float conversion: LLGo outputs 0 instead of -2147483648
5. uint32->int32: LLGo outputs 4294967295 instead of -1
6. Sign extension: LLGo outputs 4294967295 instead of -1
7. Negation overflow: LLGo outputs 128 instead of -128
8. Division edge: LLGo outputs 0 instead of -128
9. int16 overflow: LLGo outputs 32768 instead of -32768
Note: CI integration for `llgo cmptest` needs to be added manually
to .github/workflows/llgo.yml (cannot modify workflow files via bot).
Related to #961
Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: cpunion <cpunion@users.noreply.github.com>
2025-10-22 05:49:18 +00:00
..
2024-07-30 21:41:26 +08:00
2024-07-13 12:33:37 +08:00
2025-04-28 01:03:13 +08:00
2024-07-29 01:56:39 +08:00
2024-07-29 01:56:39 +08:00
2024-07-30 00:33:44 +08:00
2024-08-08 13:33:14 +08:00
2024-07-02 21:04:34 +08:00
2024-07-07 15:12:20 +08:00
2024-07-30 19:36:36 +08:00
2024-07-30 00:44:03 +08:00
2024-07-09 14:26:02 +08:00
2024-06-23 00:48:38 +08:00
2024-07-29 11:06:33 +08:00
2024-06-23 00:48:38 +08:00
2024-07-18 00:09:21 +08:00
2024-07-04 17:39:02 +08:00
2025-04-28 00:35:45 +08:00
2024-07-31 11:33:15 +08:00
2024-08-06 17:03:22 +08:00
2024-06-23 01:00:02 +08:00
2024-07-02 16:00:43 +08:00
2024-08-02 14:26:13 +08:00
2025-10-22 05:49:18 +00:00
2025-04-28 01:03:13 +08:00
2024-07-31 18:59:25 +08:00
2024-06-25 18:07:58 +08:00
2024-07-29 00:17:53 +08:00
2024-07-18 22:27:00 +08:00
2024-07-27 16:03:22 +08:00
2024-07-29 01:56:39 +08:00
2024-07-30 17:14:59 +08:00
2024-06-23 01:00:02 +08:00
2024-07-29 16:31:59 +08:00
2024-06-23 01:00:02 +08:00
2024-07-31 14:28:15 +08:00
2024-07-31 14:36:42 +08:00
2024-07-31 14:36:42 +08:00
2024-06-25 12:40:28 +08:00
2024-07-16 22:36:38 +08:00
2024-06-23 01:00:02 +08:00
2024-06-26 17:17:10 +08:00
2024-08-05 18:00:27 +08:00