2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / consistency.vlad / layout / a-short.c
blobdf81b39c453b5479fd78c94919eb888c7ba1062c
1 #include <stdio.h>
3 static short a [10];
4 static short e [0]; /* GCC only */
6 int main (void) {
7 printf ("+++Array short:\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;