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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [objc.dg/] [zero-link-3.m] - Blame information for rev 827

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

Line No. Rev Author Line
1 149 jeremybenn
/* Check that the '-fzero-link' flag doesn't prevent messaging from working. */
2
/* Contributed by Ziemowit Laski <zlaski@apple.com>.  */
3
/* { dg-options "-fnext-runtime -fzero-link -lobjc" } */
4
/* { dg-do run { target *-*-darwin* } } */
5
 
6
#import <objc/objc.h>
7
#import <objc/Object.h>
8
 
9
extern void abort(void);
10
#define CHECK_IF(expr) if(!(expr)) abort();
11
 
12
@interface Base: Object
13
+ (int) getValue;
14
@end
15
 
16
@implementation Base
17
+ (int) getValue { return 1593; }
18
@end
19
 
20
int main(void) {
21
  int val = [Base getValue];
22
  CHECK_IF(val == 1593);
23
  return 0;
24
}

powered by: WebSVN 2.1.0

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