Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/aapcs64/test_align-12.c

raw
1 /* Test AAPCS layout (alignment). */
2
3 /* { dg-do run { target aarch64*-*-* } } */
4
5 #ifndef IN_FRAMEWORK
6 #define TESTFILE "test_align-12.c"
7
8 struct s
9 {
10 /* Should have 64-bit alignment. */
11 long long y : 57;
12 char z: 7;
13 };
14
15 typedef struct s T;
16
17 #define EXPECTED_STRUCT_SIZE 8
18 extern void link_failure (void);
19 int
20 foo ()
21 {
22 /* Optimization gets rid of this before linking. */
23 if (sizeof (struct s) != EXPECTED_STRUCT_SIZE)
24 link_failure ();
25 }
26
27 T a = { 1, 4 };
28 T b = { 9, 16 };
29 T c = { 25, 36 };
30
31 #include "abitest.h"
32 #else
33 ARG (int, 3, W0)
34 ARG (T, a, X1)
35 ARG (int, 5, W2)
36 ARG (T, b, X3)
37 ARG (__int128, 11, X4)
38 ARG (__int128, 13, X6)
39 #ifndef __AAPCS64_BIG_ENDIAN__
40 ARG (int, 7, STACK)
41 #else
42 ARG (int, 7, STACK + 4)
43 #endif
44 LAST_ARG (T, c, STACK + 8)
45 #endif