llvm-project/clang/test/CodeGen/PR5060-align.c
Nancy Wang f46c41febb [SystemZ][z/OS] fix lit test related to alignment
This patch is to fix lit test case failure relate to alignment, on z/OS, maximum alignment value for 64 bit mode is 16 and also fixed clang/test/Layout/itanium-union-bitfield.cpp, attribute ((aligned(4))) is needed for bit-field member in Union for z/OS because single bit-field has one byte alignment, this will make sure size and alignment will be correct value on z/OS.

Differential Revision: https://reviews.llvm.org/D98793
2021-03-23 13:15:19 -04:00

14 lines
269 B
C

// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
// CHECK: @foo.p = internal global i8 0, align 16
char *foo(void) {
static char p __attribute__((aligned(16)));
return &p;
}
void bar(long n) {
// CHECK: align 16
char p[n] __attribute__((aligned(16)));
}