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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [objc.dg/] [special/] [load-category-1.m] - Blame information for rev 704

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 704 jeremybenn
/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010.  */
2
/* { dg-do run } */
3
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
4
 
5
#include <stdlib.h>
6
#include <objc/objc.h>
7
 
8
#include "load-category-1.h"
9
 
10
@implementation TestClass1
11
+ initialize { return self; }
12
+ load
13
{
14
  increase_load_count ();
15
}
16
@end
17
 
18
@implementation TestClass2 (Category)
19
+ load
20
{
21
  increase_load_count ();
22
}
23
@end
24
 
25
 
26
static int load_count = 0;
27
 
28
int increase_load_count (void)
29
{
30
  load_count++;
31
}
32
 
33
int main (void)
34
{
35
  if (load_count != 4)
36
    abort ();
37
 
38
  return 0;
39
}

powered by: WebSVN 2.1.0

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