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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [objc.dg/] [proto-lossage-3.m] - Blame information for rev 154

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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