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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [objc.dg/] [zero-link-3.m] - Rev 711

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

/* Check that the '-fzero-link' flag doesn't prevent messaging from working. */
/* Contributed by Ziemowit Laski <zlaski@apple.com>.  */
 
/* { dg-do run { target *-*-darwin* } } */
/* { dg-options "-fzero-link" } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
 
#include <objc/Object.h>
 
extern void abort(void);
#define CHECK_IF(expr) if(!(expr)) abort();
 
@interface Base: Object
+ (int) getValue;
@end
 
@implementation Base
+ (int) getValue { return 1593; }
@end
 
int main(void) {
  int val = [Base getValue];
  CHECK_IF(val == 1593);
  return 0;
}
 
 

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

powered by: WebSVN 2.1.0

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