OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [i386/] [bitfield3.c] - Blame information for rev 318

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 318 jeremybenn
// Test for bitfield alignment in structs on IA-32
2
// { dg-do run }
3
// { dg-options "-O2" }
4
// { dg-options "-mno-align-double -mno-ms-bitfields" { target *-*-interix* } }
5
 
6
extern void abort (void);
7
extern void exit (int);
8
 
9
struct X {
10
  int : 32;
11
};
12
 
13
struct Y {
14
  int i : 32;
15
};
16
 
17
int main () {
18
  if (__alignof__(struct X) != 1)
19
    abort ();
20
  if (__alignof__(struct Y) != 4)
21
    abort ();
22
 
23
  exit (0);
24
}

powered by: WebSVN 2.1.0

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