Merge from mainline
[official-gcc.git] / gcc / testsuite / consistency.vlad / layout / a-size_t.c
blob0c47b1000ca6876088cffccdd14d2b2a135db3cd
1 #include <stdio.h>
2 #include <stddef.h>
4 static size_t a [10];
5 static size_t e [0]; /* GCC only */
7 int main (void) {
8 printf ("+++Array size_t:\n");
9 printf ("size=%d,align=%d,5th-elem-offset=%d,5th-elem-align=%d\n",
10 sizeof (a), __alignof__ (a),
11 (char *) &a[5] - (char *) a, __alignof__ (a[5]));
12 printf ("size=%d,align=%d,5th-elem-offset=%d,5th-elem-align=%d\n",
13 sizeof (e), __alignof__ (e),
14 (char *) &e[5] - (char *) a, __alignof__ (e[5]));
15 return 0;