1 /* This file tests that things are encoded using the gcc-3.3 ABI which is only
2 used by the NeXT runtime. */
3 /* { dg-do run { target *-*-darwin* } } */
4 /* { dg-require-effective-target ilp32 } */
5 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
7 #include "../objc-obj-c++-shared/Protocol1.h"
13 @protocol CommonProtocol
15 -(oneway void)methodCall_On:(in bycopy id)someValue_On;
16 -(oneway void)methodCall_nO:(bycopy in id)someValue_nO;
18 -(oneway void)methodCall_Oo:(out bycopy id)someValue_Oo;
19 -(oneway void)methodCall_oO:(bycopy out id)someValue_oO;
21 -(oneway void)methodCall_rn:(in const id)someValue_rn;
23 -(oneway void)methodCall_oOn:(in bycopy out id)someValue_oOn;
27 @interface ObjCClass <CommonProtocol>
34 @implementation ObjCClass
35 -(oneway void)methodCall_On:(in bycopy id)someValue_On { }
36 -(oneway void)methodCall_nO:(bycopy in id)someValue_nO { }
38 -(oneway void)methodCall_Oo:(out bycopy id)someValue_Oo { }
39 -(oneway void)methodCall_oO:(bycopy out id)someValue_oO { }
41 -(oneway void)methodCall_rn:(in const id)someValue_rn { }
42 -(oneway void)methodCall_oOn:(in bycopy out id)someValue_oOn { }
45 Protocol *proto = @protocol(CommonProtocol);
46 struct objc_method_description *meth;
50 meth = [proto descriptionForInstanceMethod: @selector(methodCall_On:)];
51 if (strcmp (meth->types, "Vv12@0:4On@8"))
53 meth = [proto descriptionForInstanceMethod: @selector(methodCall_nO:)];
54 if (strcmp (meth->types, "Vv12@0:4nO@8"))
56 meth = [proto descriptionForInstanceMethod: @selector(methodCall_Oo:)];
57 if (strcmp (meth->types, "Vv12@0:4Oo@8"))
59 meth = [proto descriptionForInstanceMethod: @selector(methodCall_oO:)];
60 if (strcmp (meth->types, "Vv12@0:4oO@8"))
62 meth = [proto descriptionForInstanceMethod: @selector(methodCall_rn:)];
63 if (strcmp (meth->types, "Vv12@0:4rn@8"))
65 meth = [proto descriptionForInstanceMethod: @selector(methodCall_oOn:)];
66 if (strcmp (meth->types, "Vv12@0:4oOn@8"))