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