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.0rc1/] [gcc/] [testsuite/] [obj-c++.dg/] [gnu-runtime-2.mm] - Diff between revs 308 and 338

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 308 Rev 338
/* Sanity check for GNU-runtime version of constant strings,
/* Sanity check for GNU-runtime version of constant strings,
   regardless of runtime used on target system.  */
   regardless of runtime used on target system.  */
/* { dg-do compile } */
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */
/* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */
#include 
#include 
#include 
#include 
#include 
#include 
@interface NXConstantString: Object
@interface NXConstantString: Object
{
{
  char *c_string;
  char *c_string;
  unsigned int len;
  unsigned int len;
}
}
-(const char *) cString;
-(const char *) cString;
-(unsigned int) length;
-(unsigned int) length;
@end
@end
@implementation NXConstantString
@implementation NXConstantString
-(const char *) cString { return c_string; }
-(const char *) cString { return c_string; }
-(unsigned int) length  { return len; }
-(unsigned int) length  { return len; }
@end
@end
int main(int argc, const char **args)
int main(int argc, const char **args)
{
{
  if (strcmp ([@"this is a string" cString], "this is a string"))
  if (strcmp ([@"this is a string" cString], "this is a string"))
    abort ();
    abort ();
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

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