[PATCH] D89127: [SystemZ][z/OS] Update target specific __attribute__((aligned)) value for test

Fanbo Meng via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 9 06:32:46 PDT 2020


fanbo-meng created this revision.
fanbo-meng added reviewers: abhina.sreeskantharajan, uweigand, Kai, hubert.reinterpretcast.
Herald added subscribers: cfe-commits, krytarowski.
Herald added a project: clang.
fanbo-meng requested review of this revision.

z/OS defaults to 16 bytes for  __attribute__((aligned)), modify the test to differentiate between z/OS and Linux on s390x.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D89127

Files:
  clang/test/Sema/struct-packed-align.c


Index: clang/test/Sema/struct-packed-align.c
===================================================================
--- clang/test/Sema/struct-packed-align.c
+++ clang/test/Sema/struct-packed-align.c
@@ -59,7 +59,7 @@
 struct __attribute__((aligned)) as1_2 {
     char c;
 };
-#if ( defined(__s390x__) || ( defined (__ARM_32BIT_STATE) && ! defined(__ANDROID__) ) )
+#if ((defined(__s390x__) && !defined(__MVS__)) || (defined(__ARM_32BIT_STATE) && !defined(__ANDROID__)))
 extern int e1_2[sizeof(struct as1_2) == 8 ? 1 : -1];
 extern int e2_2[__alignof(struct as1_2) == 8 ? 1 : -1];
 #else


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89127.297221.patch
Type: text/x-patch
Size: 586 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201009/05ebc6ac/attachment-0001.bin>


More information about the cfe-commits mailing list