[clang] [CIR] Implement CK_LValueToRValueBitCast for ComplexType (PR #150296)

Amr Hesham via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 24 09:00:37 PDT 2025


================
@@ -326,3 +326,28 @@ void complex_to_complex_cast() {
 // OGCG: store i32 %[[REAL_INT_CAST]], ptr {{.*}}, align 4
 // OGCG: store i32 %[[IMAG_INT_CAST]], ptr getelementptr inbounds nuw ({ i32, i32 }, ptr {{.*}}, i32 0, i32 1), align 4
 
+
+void lvalue_to_rvalue_bitcast() {
+  void *a;
+  int _Complex b = __builtin_bit_cast(int _Complex, a);
+}
----------------
AmrDeveloper wrote:

Updated, thanks!

https://github.com/llvm/llvm-project/pull/150296


More information about the cfe-commits mailing list