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/] [const-str-6.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
/* Negative test case for constant string layout.  */
/* Negative test case for constant string layout.  */
/* Contributed by Ziemowit Laski  .  */
/* Contributed by Ziemowit Laski  .  */
/* { dg-options "-fconstant-string-class=MyConstantString" } */
/* { dg-options "-fconstant-string-class=MyConstantString" } */
/* { dg-do compile } */
/* { dg-do compile } */
@interface MyBase {
@interface MyBase {
  char p;
  char p;
}
}
@end
@end
@interface MyConstantString: MyBase {
@interface MyConstantString: MyBase {
  union {
  union {
    void     *u;
    void     *u;
    unsigned char   *c;
    unsigned char   *c;
  } _contents;
  } _contents;
  char  _count;
  char  _count;
}
}
@end
@end
/* The NeXT runtime initializes the 'isa' pointer of string constants at
/* The NeXT runtime initializes the 'isa' pointer of string constants at
   compile time.  */
   compile time.  */
#ifdef __NEXT_RUNTIME__
#ifdef __NEXT_RUNTIME__
extern void *_MyConstantStringClassReference;
extern void *_MyConstantStringClassReference;
#endif
#endif
MyConstantString *str = @"Hello"; /* { dg-error "interface .MyConstantString. does not have valid constant string layout" } */
MyConstantString *str = @"Hello"; /* { dg-error "interface .MyConstantString. does not have valid constant string layout" } */
 
 

powered by: WebSVN 2.1.0

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