Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / consistency.vlad / layout / class-pointer-and-virtual.cpp
blob9b8008ee31c320c23fb0b6503e9f3d71ca2eb5a1
1 #include <stdio.h>
3 static class sss {
4 public:
5 char * m;
6 virtual int f (int i) {return i;}
7 } sss;
9 #define _offsetof(st,f) ((char *)&((st *) 16)->f - (char *) 16)
11 int main (void) {
12 printf ("+++Class starting with pointer and containing virtual function:\n");
13 printf ("size=%d,align=%d\n", sizeof (sss), __alignof__ (sss));
14 printf ("offset-m=%d,align-m=%d\n",
15 _offsetof (class sss, m), __alignof__ (sss.m));