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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [i386/] [bitfield3.c] - Blame information for rev 704

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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