Skip to content

Commit 521b468

Browse files
authored
[SystemZ] Move new test into existing CodeGen test. (#73230)
The test for emitted alignments is better placed in CodeGen.
1 parent ce1b243 commit 521b468

File tree

2 files changed

+13
-32
lines changed

2 files changed

+13
-32
lines changed

clang/test/CodeGen/SystemZ/align-systemz.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,19 @@ void func (void)
2525
s = es;
2626
}
2727

28+
// Test that a global variable with an incomplete type gets the minimum
29+
// alignment of 2 per the ABI if no alignment was specified by user.
30+
//
31+
// CHECK-DAG: @VarNoAl {{.*}} align 2
32+
// CHECK-DAG: @VarExplAl1 {{.*}} align 1
33+
// CHECK-DAG: @VarExplAl4 {{.*}} align 4
34+
struct incomplete_ty;
35+
extern struct incomplete_ty VarNoAl;
36+
extern struct incomplete_ty __attribute__((aligned(1))) VarExplAl1;
37+
extern struct incomplete_ty __attribute__((aligned(4))) VarExplAl4;
38+
struct incomplete_ty *fun0 (void) { return &VarNoAl; }
39+
struct incomplete_ty *fun1 (void) { return &VarExplAl1; }
40+
struct incomplete_ty *fun2 (void) { return &VarExplAl4; }
2841

2942
// The SystemZ ABI aligns __int128_t to only eight bytes.
3043

clang/test/Driver/systemz-alignment.c

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)