已关闭
【缺陷】cjc -O2 编译 ICE (begin of range is zero) #3351
Xniao创建于 7月12日关闭于 5 天前
7月12日 添加了label:bug
7月13日 将 kongbx 设为负责人
7月17日 关联了pull request:fix(chir): pass source location to VARRAY_GET in compound assign to avoid ICE
7月17日 关联了pull request:fix(chir): pass source location to VARRAY_GET in compound assign to avoid ICE
8月14日 关联了pull request:test(chir): cover VArray compound-assign out-of-bounds diagnostic under -O2
8月14日 关联了pull request:test(chir): cover VArray compound-assign out-of-bounds diagnostic under -O2
22 天前 添加了label:1.3.0-alpha.01
Cangjie-huohuixin
19 天前 评论:
19 天前 评论:
您好,您反馈的问题已经在main分支修复,您可以基于社区的nightly版本验证问题修复,确认无问题后关闭issue。


Cangjie-huohuixin
5 天前 评论:
5 天前 评论:
您好,感谢您的反馈,由于长时间未回复/补充信息,该issue将做关闭处理。如果您后续仍有相关问题,为了更快的响应和解决,请您新建issue,感谢您的配合。


5 天前 关闭了 issue
系统环境
Darwin 25.5.0 Darwin Kernel Version 25.5.0: Mon Apr 27 20:41:26 PDT 2026; root:xnu-12377.121.6~2/RELEASE_ARM64_T8132 arm64
Cangjie Compiler: 1.2.0-alpha.20260711020029 (cjnative)
Target: aarch64-apple-darwin
Ubuntu 22.04
Linux 1a41afa15d2e 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Cangjie Compiler: 1.2.0-alpha.20260711020029 (cjnative)
Target: x86_64-unknown-linux-gnu
问题描述
使用
cjc无优化选项编译test.cj可正常通过;使用cjc -O2开启优化后,编译器崩溃,出现下面的报错信息复现步骤
期望效果
编译器应能够正常退出,而非崩溃
源码/附件
const func getSize<T>(): Int64 { 4 } main(): Int64 { var m = VArray<Int64, $10>(repeat: 0) m[42 / getSize<Int64>()] |= 42 0 }