2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / consistency.vlad / layout / s-char-s-longdouble.c
blob3f02e3b241b9b8b7adad01325f407b5644d58bee
1 #include <stdio.h>
3 static struct sss{
4 char f;
5 struct {long double m;} snd;
6 } sss;
8 #define _offsetof(st,f) ((char *)&((st *) 16)->f - (char *) 16)
10 int main (void) {
11 printf ("+++Struct longdouble inside struct starting with char:\n");
12 printf ("size=%d,align=%d\n", sizeof (sss), __alignof__ (sss));
13 printf ("offset-char=%d,offset-sss-longdouble=%d,\nalign-char=%d,align-sss-longdouble=%d\n",
14 _offsetof (struct sss, f), _offsetof (struct sss, snd),
15 __alignof__ (sss.f), __alignof__ (sss.snd));
16 return 0;