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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [obj-c++.dg/] [defs.mm] - Diff between revs 308 and 384

Only display areas with differences | Details | Blame | View Log

Rev 308 Rev 384
/* Check @defs() in Objective-C++ */
/* Check @defs() in Objective-C++ */
/* Contributed by Devang Patel    */
/* Contributed by Devang Patel    */
/* { dg-options "" } */
/* { dg-options "" } */
/* { dg-do run } */
/* { dg-do run } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
#include "../objc-obj-c++-shared/Object1.h"
#include "../objc-obj-c++-shared/Object1.h"
#include 
#include 
#include 
#include 
extern "C" void abort(void);
extern "C" void abort(void);
@interface A : Object
@interface A : Object
{
{
  @public
  @public
    int a;
    int a;
}
}
@end
@end
struct A_defs
struct A_defs
{
{
  @defs(A);
  @defs(A);
};
};
@implementation A
@implementation A
- init
- init
{
{
  a = 42;
  a = 42;
  return self;
  return self;
}
}
@end
@end
int main()
int main()
{
{
  A *a = [A init];
  A *a = [A init];
  struct A_defs *a_defs = (struct A_defs *)a;
  struct A_defs *a_defs = (struct A_defs *)a;
  if (a->a != a_defs->a)
  if (a->a != a_defs->a)
    abort ();
    abort ();
  return 0;
  return 0;
}
}
#include "../objc-obj-c++-shared/Object1-implementation.h"
#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.