[clang] [CIR] Implement ArraySubscript for ComplexType (PR #146283)
Henrich Lauko via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 29 12:50:34 PDT 2025
================
@@ -442,3 +442,35 @@ bool foo19(double _Complex a, double _Complex b) {
// OGCG: %[[CMP_IMAG:.*]] = fcmp oeq double %[[A_IMAG]], %[[B_IMAG]]
// OGCG: %[[RESULT:.*]] = and i1 %[[CMP_REAL]], %[[CMP_IMAG]]
+
+void foo24() {
+ int _Complex arr[2];
+ int _Complex r = arr[1];
----------------
xlauko wrote:
```suggestion
int _Complex r = arr[1];
```
https://github.com/llvm/llvm-project/pull/146283
More information about the cfe-commits
mailing list