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