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/] [gcc.target/] [i386/] [bitfield3.c] - Diff between revs 318 and 338

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

Rev 318 Rev 338
// Test for bitfield alignment in structs on IA-32
// Test for bitfield alignment in structs on IA-32
// { dg-do run }
// { dg-do run }
// { dg-options "-O2" }
// { dg-options "-O2" }
// { dg-options "-mno-align-double -mno-ms-bitfields" { target *-*-interix* } }
// { dg-options "-mno-align-double -mno-ms-bitfields" { target *-*-interix* } }
 
 
extern void abort (void);
extern void abort (void);
extern void exit (int);
extern void exit (int);
 
 
struct X {
struct X {
  int : 32;
  int : 32;
};
};
 
 
struct Y {
struct Y {
  int i : 32;
  int i : 32;
};
};
 
 
int main () {
int main () {
  if (__alignof__(struct X) != 1)
  if (__alignof__(struct X) != 1)
    abort ();
    abort ();
  if (__alignof__(struct Y) != 4)
  if (__alignof__(struct Y) != 4)
    abort ();
    abort ();
 
 
  exit (0);
  exit (0);
}
}
 
 

powered by: WebSVN 2.1.0

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