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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pack-test-5.c] - Blame information for rev 696

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

Line No. Rev Author Line
1 689 jeremybenn
/* PR c/11446: packed on a struct takes precedence over aligned on the type
2
   of a field.  */
3
/* { dg-do run } */
4
/* { dg-additional-options "-mno-ms-bitfields" { target *-*-mingw* } } */
5
 
6
extern void abort (void);
7
 
8
struct A {
9
  double d;
10
} __attribute__ ((aligned));
11
 
12
struct B {
13
  char c;
14
  struct A a;
15
} __attribute__ ((packed));
16
 
17
int main ()
18
{
19
  if (sizeof (struct B) != sizeof (char) + sizeof (struct A))
20
    abort ();
21
  return 0;
22
}

powered by: WebSVN 2.1.0

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