OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [obj-c++.dg/] [proto-lossage-3.mm] - Blame information for rev 703

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 703 jeremybenn
/* 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 
7
#include "../objc-obj-c++-shared/runtime.h"
8
 
9
@interface MyClass
10
- name;
11
@end
12
 
13
@protocol NoInstanceMethods
14
+ testMethod;
15
@end
16
 
17
@protocol NoClassMethods
18
- testMethod;
19
@end
20
 
21
int
22
main()
23
{
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;
29
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.