Fix up recent entries by espindola.
[official-gcc.git] / gcc / testsuite / consistency.vlad / layout / c-int-2-c-double.cpp
blob19379b1bb6384cd36373fd05ec65f26d48ac1705
1 #include <stdio.h>
3 class c{
4 public:
5 int f;
6 };
8 class c2{
9 public:
10 double f2;
14 static class sss: public c, public c2{
15 public:
16 int m;
17 } sss;
19 #define _offsetof(st,f) ((char *)&((st *) 16)->f - (char *) 16)
21 int main (void) {
22 printf ("++Class with int inhereting classes with int & double:\n");
23 printf ("size=%d,align=%d\n", sizeof (sss), __alignof__ (sss));
24 printf ("offset-f=%d,offset-f2=%d,offset-m=%d,\nalign-f=%d,align-f2=%d,align-m=%d\n",
25 _offsetof (class sss, f), _offsetof (class sss, f2), _offsetof (class sss, m),
26 __alignof__ (sss.f), __alignof__ (sss.f2), __alignof__ (sss.m));
27 return 0;