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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [objc.dg/] [zero-link-3.m] - Blame information for rev 318

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

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

powered by: WebSVN 2.1.0

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