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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [pack-test-5.c] - Blame information for rev 826

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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