OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [obj-c++.dg/] [isa-field-1.mm] - Diff between revs 308 and 338

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

Rev 308 Rev 338
/* Ensure there are no bizarre difficulties with accessing the 'isa' field of
/* Ensure there are no bizarre difficulties with accessing the 'isa' field of
  objects.  This field is named differently between GNU and NeXT runtimes so
  objects.  This field is named differently between GNU and NeXT runtimes so
  accessed via the CLASSPTRFIELD() macro defined in next-mapping.h */
  accessed via the CLASSPTRFIELD() macro defined in next-mapping.h */
/* { dg-do compile } */
/* { dg-do compile } */
#include "../objc-obj-c++-shared/Object1.h"
#include "../objc-obj-c++-shared/Object1.h"
#include "../objc-obj-c++-shared/next-mapping.h"
#include "../objc-obj-c++-shared/next-mapping.h"
@interface Object (Test)
@interface Object (Test)
- (Class) test1: (id)object;
- (Class) test1: (id)object;
@end
@end
@interface Derived: Object
@interface Derived: Object
- (Class) test2: (id)object;
- (Class) test2: (id)object;
@end
@end
@implementation Object (Test)
@implementation Object (Test)
Class test1(id object) {
Class test1(id object) {
  Class cls = CLASSPTRFIELD(object);
  Class cls = CLASSPTRFIELD(object);
  return cls;
  return cls;
}
}
- (Class) test1: (id)object {
- (Class) test1: (id)object {
  Class cls = CLASSPTRFIELD(object);
  Class cls = CLASSPTRFIELD(object);
  return cls;
  return cls;
}
}
@end
@end
@implementation Derived
@implementation Derived
Class test2(id object) {
Class test2(id object) {
  Class cls = CLASSPTRFIELD(object);
  Class cls = CLASSPTRFIELD(object);
  return cls;
  return cls;
}
}
- (Class) test2: (id)object {
- (Class) test2: (id)object {
  Class cls = CLASSPTRFIELD(object);
  Class cls = CLASSPTRFIELD(object);
  return cls;
  return cls;
}
}
@end
@end
Class test3(id object) {
Class test3(id object) {
  Class cls = CLASSPTRFIELD(object);
  Class cls = CLASSPTRFIELD(object);
  return cls;
  return cls;
}
}
#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.