[clang] f1e0c7f - [SystemZ][z/OS] Add test of leading zero length bitfield in const/volatile struct
Fanbo Meng via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 29 09:06:37 PDT 2021
Author: Fanbo Meng
Date: 2021-03-29T12:06:30-04:00
New Revision: f1e0c7fdd72026f62e2c38ee249705fbb9213a30
URL: https://github.com/llvm/llvm-project/commit/f1e0c7fdd72026f62e2c38ee249705fbb9213a30
DIFF: https://github.com/llvm/llvm-project/commit/f1e0c7fdd72026f62e2c38ee249705fbb9213a30.diff
LOG: [SystemZ][z/OS] Add test of leading zero length bitfield in const/volatile struct
Reviewed By: abhina.sreeskantharajan
Differential Revision: https://reviews.llvm.org/D99508
Added:
Modified:
clang/test/CodeGen/SystemZ/zos-alignment.c
Removed:
################################################################################
diff --git a/clang/test/CodeGen/SystemZ/zos-alignment.c b/clang/test/CodeGen/SystemZ/zos-alignment.c
index 9371a54403e4..b43968410cec 100644
--- a/clang/test/CodeGen/SystemZ/zos-alignment.c
+++ b/clang/test/CodeGen/SystemZ/zos-alignment.c
@@ -12,6 +12,24 @@ int f0() { return v0 + v1 + v2 + v3; }
// DECL-NEXT: @v2 {{.*}} align 16
// DECL-NEXT: @v3 {{.*}} align 32
+const struct cs0 {
+ unsigned long :0;
+ long long a;
+} CS0 = {};
+// CHECK: 0 | struct cs0
+// CHECK-NEXT: 0:- | unsigned long
+// CHECK-NEXT: 0 | long long a
+// CHECK-NEXT: | [sizeof=8, align=8]
+
+volatile struct vs0 {
+ long :0;
+ short a;
+} VS0;
+// CHECK: 0 | struct vs0
+// CHECK-NEXT: 0:- | long
+// CHECK-NEXT: 0 | short a
+// CHECK-NEXT: | [sizeof=2, align=2]
+
struct s0 {
short a:3;
long b:5;
More information about the cfe-commits
mailing list