URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 308 |
Rev 384 |
/* 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" } */
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.