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/] [objc.dg/] [bitfield-4.m] - Diff between revs 309 and 338

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

Rev 309 Rev 338
/* Make sure that bitfield types are printed correctly, and that ivar redeclaration
/* Make sure that bitfield types are printed correctly, and that ivar redeclaration
  (@interface vs. @implementation) checks take the bitfield width into account.  */
  (@interface vs. @implementation) checks take the bitfield width into account.  */
/* Author: Ziemowit Laski   <zlaski@apple.com>  */
/* Author: Ziemowit Laski   <zlaski@apple.com>  */
/* { dg-do compile } */
/* { dg-do compile } */
 
 
@interface Base {
@interface Base {
  int i;
  int i;
}
}
@end
@end
 
 
@interface WithBitfields: Base {
@interface WithBitfields: Base {
  void *isa;
  void *isa;
  unsigned a: 3;
  unsigned a: 3;
  signed b: 4;
  signed b: 4;
  int c: 5;
  int c: 5;
}
}
@end
@end
 
 
@implementation WithBitfields {
@implementation WithBitfields {
  char *isa;  /* { dg-error "conflicting instance variable type .char \\*isa." } */
  char *isa;  /* { dg-error "conflicting instance variable type .char \\*isa." } */
  /* { dg-error "previous declaration of .void \\*isa." "" { target *-*-* } 12 } */
  /* { dg-error "previous declaration of .void \\*isa." "" { target *-*-* } 12 } */
  unsigned a: 5;  /* { dg-error "conflicting instance variable type .unsigned( int)? a: 5." } */
  unsigned a: 5;  /* { dg-error "conflicting instance variable type .unsigned( int)? a: 5." } */
  /* { dg-error "previous declaration of .unsigned( int)? a: 3." "" { target *-*-* } 13 } */
  /* { dg-error "previous declaration of .unsigned( int)? a: 3." "" { target *-*-* } 13 } */
  signed b: 4;  /* This one is fine. */
  signed b: 4;  /* This one is fine. */
  int c: 3;  /* { dg-error "conflicting instance variable type .int c: 3." } */
  int c: 3;  /* { dg-error "conflicting instance variable type .int c: 3." } */
  /* { dg-error "previous declaration of .int c: 5." "" { target *-*-* } 15 } */
  /* { dg-error "previous declaration of .int c: 5." "" { target *-*-* } 15 } */
}
}
@end
@end
 
 

powered by: WebSVN 2.1.0

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