60 lines · cpp
1// RUN: %clang_cc1 -triple powerpc-ibm-aix-xcoff -emit-llvm -x c++ < %s | \2// RUN: FileCheck %s3 4// RUN: %clang_cc1 -triple powerpc64-ibm-aix-xcoff -emit-llvm -x c++ < %s | \5// RUN: FileCheck %s6 7namespace test1 {8struct __attribute__((__aligned__(2))) S {9 double d;10};11 12S s;13 14// CHECK: @{{.*}}test1{{.*}}s{{.*}} = global %"struct.test1::S" zeroinitializer, align 815} // namespace test116 17namespace test2 {18struct __attribute__((__aligned__(2), packed)) S {19 double d;20};21 22S s;23 24// CHECK: @{{.*}}test2{{.*}}s{{.*}} = global %"struct.test2::S" zeroinitializer, align 225} // namespace test226 27namespace test3 {28struct __attribute__((__aligned__(16))) S {29 double d;30};31 32S s;33 34// CHECK: @{{.*}}test3{{.*}}s{{.*}} = global %"struct.test3::S" zeroinitializer, align 1635} // namespace test336 37namespace test4 {38struct __attribute__((aligned(2))) SS {39 double d;40};41 42struct S {43 struct SS ss;44} s;45 46// CHECK: @{{.*}}test4{{.*}}s{{.*}} = global %"struct.test4::S" zeroinitializer, align 847} // namespace test448 49namespace test5 {50struct __attribute__((aligned(2), packed)) SS {51 double d;52};53 54struct S {55 struct SS ss;56} s;57 58// CHECK: @{{.*}}test5{{.*}}s{{.*}} = global %"struct.test5::S" zeroinitializer, align 259} // namespace test560