def test_align64(self):
    src = '\n      #include <stdio.h>\n\n      // inspired by poppler\n\n      enum Type {\n        A = 10,\n        B = 20\n      };\n\n      struct Object {\n        Type type;\n        union {\n          int intg;\n          double real;\n          char *name;\n        };\n      };\n\n      struct Principal {\n        double x;\n        Object a;\n        double y;\n      };\n\n      int main(int argc, char **argv)\n      {\n        int base = argc-1;\n        Object *o = NULL;\n        printf("%d,%d\\n", sizeof(Object), sizeof(Principal));\n        printf("%d,%d,%d,%d\\n", (int)&o[base].type, (int)&o[base].intg, (int)&o[base].real, (int)&o[base].name);\n        printf("%d,%d,%d,%d\\n", (int)&o[base+1].type, (int)&o[base+1].intg, (int)&o[base+1].real, (int)&o[base+1].name);\n        Principal p, q;\n        p.x = p.y = q.x = q.y = 0;\n        p.a.type = A;\n        p.a.real = 123.456;\n        *(&q.a) = p.a;\n        printf("%.2f,%d,%.2f,%.2f : %.2f,%d,%.2f,%.2f\\n", p.x, p.a.type, p.a.real, p.y, q.x, q.a.type, q.a.real, q.y);\n        return 0;\n      }\n    '
    self.do_run(src, '16,32\n0,8,8,8\n16,24,24,24\n0.00,10,123.46,0.00 : 0.00,10,123.46,0.00\n')
def test_align64(self):
    src = '\n      #include <stdio.h>\n\n      // inspired by poppler\n\n      enum Type {\n        A = 10,\n        B = 20\n      };\n\n      struct Object {\n        Type type;\n        union {\n          int intg;\n          double real;\n          char *name;\n        };\n      };\n\n      struct Principal {\n        double x;\n        Object a;\n        double y;\n      };\n\n      int main(int argc, char **argv)\n      {\n        int base = argc-1;\n        Object *o = NULL;\n        printf("%d,%d\\n", sizeof(Object), sizeof(Principal));\n        printf("%d,%d,%d,%d\\n", (int)&o[base].type, (int)&o[base].intg, (int)&o[base].real, (int)&o[base].name);\n        printf("%d,%d,%d,%d\\n", (int)&o[base+1].type, (int)&o[base+1].intg, (int)&o[base+1].real, (int)&o[base+1].name);\n        Principal p, q;\n        p.x = p.y = q.x = q.y = 0;\n        p.a.type = A;\n        p.a.real = 123.456;\n        *(&q.a) = p.a;\n        printf("%.2f,%d,%.2f,%.2f : %.2f,%d,%.2f,%.2f\\n", p.x, p.a.type, p.a.real, p.y, q.x, q.a.type, q.a.real, q.y);\n        return 0;\n      }\n    '
    self.do_run(src, '16,32\n0,8,8,8\n16,24,24,24\n0.00,10,123.46,0.00 : 0.00,10,123.46,0.00\n')