Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / gcc.dg / compat / struct-align-2_x.c
blob2a4ae586b76f7428e71023d0f548a978d1d134cc
1 /* Disable this test for 16-bit targets. */
3 #include <limits.h>
5 #if !(defined __GNUC__) || (INT_MAX > 32767)
7 #include "compat-common.h"
8 #include "struct-align-2.h"
10 #define SETUP(NAME,V1,V2,V3) \
11 struct outer_##NAME { \
12 int i; \
13 struct epoll_event_##NAME ee; \
14 }; \
16 unsigned int v1_##NAME = V1; \
17 unsigned int v2_##NAME = V2; \
18 unsigned long long v3_##NAME = V3; \
20 struct outer_##NAME s_##NAME[2] = \
21 { {V1, { V2, V3 } }, { V1, { V2, V3 } } }; \
23 extern void test_##NAME (void); \
24 extern void checkp_##NAME (struct outer_##NAME *); \
25 extern void checkg_##NAME (void); \
27 void \
28 pass_##NAME (struct outer_##NAME s) \
29 { \
30 checkp_##NAME (&s); \
31 } \
33 struct outer_##NAME \
34 return_##NAME (void) \
35 { \
36 return s_##NAME[0]; \
39 #define CHECK(NAME) \
40 test_##NAME()
42 SETUP (orig,101, 102, 0x0101010101010101ULL)
43 #ifndef SKIP_ATTRIBUTE
44 SETUP (structmax, 103, 104, 0x1212121212121212ULL)
45 SETUP (struct4, 105, 106, 0x2323232323232323ULL)
46 SETUP (struct8, 107, 108, 0x3434343434343434ULL)
47 SETUP (data4, 109, 110, 0x4545454545454545ULL)
48 SETUP (data8, 111, 112, 0x5656565656565656ULL)
49 SETUP (p, 113, 114, 0x6767676767676767ULL)
50 SETUP (pstruct4, 115, 116, 0x7878787878787878ULL)
51 SETUP (pstruct8, 117, 118, 0x8989898989898989ULL)
52 SETUP (pdata4, 119, 120, 0x9A9A9A9A9A9A9A9AULL)
53 SETUP (pdata8, 121, 122, 0xABABABABABABABABULL)
54 #endif
56 void
57 struct_align_2_x (void)
59 DEBUG_INIT
61 CHECK (orig);
62 #ifndef SKIP_ATTRIBUTE
63 CHECK (structmax);
64 CHECK (struct4);
65 CHECK (struct8);
66 CHECK (data4);
67 CHECK (data8);
68 CHECK (p);
69 CHECK (pstruct4);
70 CHECK (pstruct8);
71 CHECK (pdata4);
72 CHECK (pdata8);
73 #endif
75 DEBUG_FINI
77 if (fails != 0)
78 abort ();
81 #else
83 void struct_align_2_x (void) {}
85 #endif /* INT_MAX */