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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.target/] [i386/] [bitfield2.c] - Blame information for rev 149

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

Line No. Rev Author Line
1 149 jeremybenn
// Test for bitfield alignment in structs on IA-32
2
// { dg-do run { target i?86-*-* x86_64-*-* } }
3
// { dg-require-effective-target ilp32 }
4
// { dg-options "-O2" }
5
// { dg-options "-mno-align-double -mno-ms-bitfields" { target i?86-*-interix* i?86-*-cygwin* i?86-*-mingw* } }
6
 
7
extern void abort (void);
8
extern void exit (int);
9
 
10
struct X {
11
  char a;
12
  long long : 0;
13
  char b;
14
} x;
15
 
16
int main () {
17
  if (&x.b - &x.a != 4)
18
    abort ();
19
  if (sizeof (x) != 5)
20
    abort ();
21
 
22
  exit (0);
23
}

powered by: WebSVN 2.1.0

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