[clang] [Clang] [CodeGen] Fix codegen bug in constant initialisation in C23 mode (PR #84981)

via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 13 06:30:08 PDT 2024


================
@@ -216,3 +216,6 @@ int PR4517_x2 = PR4517_arrc[PR4517_idx];
 // CHECK: @PR4517_x = global i32 42, align 4
 // CHECK: @PR4517_idx = constant i32 1, align 4
 // CHECK: @PR4517_x2 = global i32 42, align 4
+
+// CHECK: @GH84784_inf = constant i8 1
+_Bool const GH84784_inf = (1.0/0.0);
----------------
Sirraide wrote:

Iirc we already have `constexpr` tests somewhere, but probably none for that exact code, so we should probably do that yeah.

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


More information about the cfe-commits mailing list