Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / objc.dg / proto-lossage-3.m
blobedbcb74f4376d836d6e0572b00600cee80f4a4a7
1 /* Crash due to descriptionFor(Instance|Class)Method applied to
2    a protocol with no instance/class methods respectively.
3    Problem report and original fix by richard@brainstorm.co.uk.  */
4 /* { dg-do run } */
5 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
6 #include <objc/objc.h>
7 #include "../objc-obj-c++-shared/runtime.h"
9 @interface MyClass
10 - name;
11 @end
13 @protocol NoInstanceMethods
14 + testMethod;
15 @end
17 @protocol NoClassMethods
18 - testMethod;
19 @end
21 int
22 main()
24 protocol_getMethodDescription (@protocol(NoInstanceMethods), @selector(name), YES, YES);
25 protocol_getMethodDescription (@protocol(NoInstanceMethods), @selector(name), YES, NO);
26 protocol_getMethodDescription (@protocol(NoClassMethods), @selector(name), YES, YES);
27 protocol_getMethodDescription (@protocol(NoClassMethods), @selector(name), YES, NO);
28 return 0;