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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [objc/] [execute/] [nested-3.m] - Blame information for rev 825

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

Line No. Rev Author Line
1 149 jeremybenn
/* Contributed by Nicola Pero - Fri Mar  9 19:39:15 CET 2001 */
2
#include <objc/objc.h>
3
 
4
/* Test defining a nested function inside a method */
5
 
6
@interface Test
7
{
8
  Class isa;
9
}
10
+ (int) test;
11
@end
12
 
13
@implementation Test
14
 
15
+ (int) test
16
{
17
  int test (void)
18
    {
19
      return 1;
20
    }
21
 
22
  return test ();
23
}
24
 
25
#ifdef __NEXT_RUNTIME__                                   
26
+ initialize { return self; }
27
#endif
28
@end
29
 
30
int main (void)
31
{
32
  if ([Test test] != 1)
33
    {
34
      abort ();
35
    }
36
 
37
  return 0;
38
}
39
 
40
 

powered by: WebSVN 2.1.0

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