align-systemz.c 392 B

1234567891011121314151617
  1. // RUN: %clang_cc1 -triple s390x-linux-gnu -fsyntax-only -verify %s
  2. // expected-no-diagnostics
  3. // SystemZ prefers to align all global variables to two bytes,
  4. // but this should *not* be reflected in the ABI alignment as
  5. // retrieved via __alignof__.
  6. struct test {
  7. signed char a;
  8. };
  9. char c;
  10. struct test s;
  11. int chk1[__alignof__(c) == 1 ? 1 : -1];
  12. int chk2[__alignof__(s) == 1 ? 1 : -1];