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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [objc.dg/] [proto-lossage-3.m] - Blame information for rev 309

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 309 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 "../objc-obj-c++-shared/Protocol1.h"
7
#include "../objc-obj-c++-shared/Object1.h"
8
#include <objc/objc.h>
9
 
10
@protocol NoInstanceMethods
11
+ testMethod;
12
@end
13
 
14
@protocol NoClassMethods
15
- testMethod;
16
@end
17
 
18
int
19
main()
20
{
21
[@protocol(NoInstanceMethods) descriptionForInstanceMethod: @selector(name)];
22
[@protocol(NoInstanceMethods) descriptionForClassMethod: @selector(name)];
23
[@protocol(NoClassMethods) descriptionForInstanceMethod: @selector(name)];
24
[@protocol(NoClassMethods) descriptionForClassMethod: @selector(name)];
25
return 0;
26
}

powered by: WebSVN 2.1.0

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