@unittest.skip('clang cannot compile this code with that target yet')
def test_varargs_byval(self):
    src = '\n      #include <stdio.h>\n      #include <stdarg.h>\n\n      typedef struct type_a {\n        union {\n          double f;\n          void *p;\n          int i;\n          short sym;\n        } value;\n      } type_a;\n\n      enum mrb_vtype {\n        MRB_TT_FALSE = 0,   /*   0 */\n        MRB_TT_CLASS = 9    /*   9 */\n      };\n\n      typedef struct type_b {\n        enum mrb_vtype tt:8;\n      } type_b;\n\n      void print_type_a(int argc, ...);\n      void print_type_b(int argc, ...);\n\n      int main(int argc, char *argv[])\n      {\n        type_a a;\n        type_b b;\n        a.value.p = (void*) 0x12345678;\n        b.tt = MRB_TT_CLASS;\n\n        printf("The original address of a is: %p\\n", a.value.p);\n        printf("The original type of b is: %d\\n", b.tt);\n\n        print_type_a(1, a);\n        print_type_b(1, b);\n\n        return 0;\n      }\n\n      void print_type_a(int argc, ...) {\n        va_list ap;\n        type_a a;\n\n        va_start(ap, argc);\n        a = va_arg(ap, type_a);\n        va_end(ap);\n\n        printf("The current address of a is: %p\\n", a.value.p);\n      }\n\n      void print_type_b(int argc, ...) {\n        va_list ap;\n        type_b b;\n\n        va_start(ap, argc);\n        b = va_arg(ap, type_b);\n        va_end(ap);\n\n        printf("The current type of b is: %d\\n", b.tt);\n      }\n      '
    self.do_run(src, 'The original address of a is: 0x12345678\nThe original type of b is: 9\nThe current address of a is: 0x12345678\nThe current type of b is: 9\n')
@unittest.skip('clang cannot compile this code with that target yet')
def test_varargs_byval(self):
    src = '\n      #include <stdio.h>\n      #include <stdarg.h>\n\n      typedef struct type_a {\n        union {\n          double f;\n          void *p;\n          int i;\n          short sym;\n        } value;\n      } type_a;\n\n      enum mrb_vtype {\n        MRB_TT_FALSE = 0,   /*   0 */\n        MRB_TT_CLASS = 9    /*   9 */\n      };\n\n      typedef struct type_b {\n        enum mrb_vtype tt:8;\n      } type_b;\n\n      void print_type_a(int argc, ...);\n      void print_type_b(int argc, ...);\n\n      int main(int argc, char *argv[])\n      {\n        type_a a;\n        type_b b;\n        a.value.p = (void*) 0x12345678;\n        b.tt = MRB_TT_CLASS;\n\n        printf("The original address of a is: %p\\n", a.value.p);\n        printf("The original type of b is: %d\\n", b.tt);\n\n        print_type_a(1, a);\n        print_type_b(1, b);\n\n        return 0;\n      }\n\n      void print_type_a(int argc, ...) {\n        va_list ap;\n        type_a a;\n\n        va_start(ap, argc);\n        a = va_arg(ap, type_a);\n        va_end(ap);\n\n        printf("The current address of a is: %p\\n", a.value.p);\n      }\n\n      void print_type_b(int argc, ...) {\n        va_list ap;\n        type_b b;\n\n        va_start(ap, argc);\n        b = va_arg(ap, type_b);\n        va_end(ap);\n\n        printf("The current type of b is: %d\\n", b.tt);\n      }\n      '
    self.do_run(src, 'The original address of a is: 0x12345678\nThe original type of b is: 9\nThe current address of a is: 0x12345678\nThe current type of b is: 9\n')