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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [objc.dg/] [pr23214.m] - Blame information for rev 714

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

Line No. Rev Author Line
1 704 jeremybenn
/* Test that there is no problem initializing multiple static
2
   Protocol instances.  */
3
 
4
/* { dg-do run } */
5
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
6
 
7
#include <objc/Protocol.h>
8
 
9
@interface Object (TS_CAT)
10
- test;
11
@end
12
 
13
@implementation Object (TS_CAT)
14
- test { return self; }
15
@end
16
 
17
@protocol A
18
@end
19
 
20
@protocol B
21
@end
22
 
23
@interface Dummy : Object <B>
24
@end
25
 
26
int main ()
27
{
28
  [@protocol(A) test];
29
  [@protocol(B) test];
30
 
31
  return 0;
32
}
33
 
34
@implementation Dummy
35
@end

powered by: WebSVN 2.1.0

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