[clang] [clang] Add zero-initialization for fixed point types (PR #80781)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 5 20:03:47 PST 2024


================
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -ffixed-point -S -emit-llvm %s -o - | FileCheck %s
+
+// CHECK: @_ZL1a = internal constant [2 x i32] zeroinitializer
+constexpr _Accum a[2] = {};
----------------
MaskRay wrote:

Consider a `test/AST/` test like `static_assert(a[0] == 0 && a[0] != 1);`

This is not supported by -fexperimental-new-constant-interpreter, but I think it is ok.

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


More information about the cfe-commits mailing list