[PATCH] D99508: [SystemZ][z/OS] Add test of leading zero length bitfield in const/volatile struct

Fanbo Meng via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 29 09:06:47 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rGf1e0c7fdd720: [SystemZ][z/OS] Add test of leading zero length bitfield in const/volatile… (authored by fanbo-meng).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99508/new/

https://reviews.llvm.org/D99508

Files:
  clang/test/CodeGen/SystemZ/zos-alignment.c


Index: clang/test/CodeGen/SystemZ/zos-alignment.c
===================================================================
--- clang/test/CodeGen/SystemZ/zos-alignment.c
+++ clang/test/CodeGen/SystemZ/zos-alignment.c
@@ -12,6 +12,24 @@
 // 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;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99508.333894.patch
Type: text/x-patch
Size: 835 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210329/dca0d459/attachment-0001.bin>


More information about the cfe-commits mailing list