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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [pack-test-5.c] - Diff between revs 298 and 338

Only display areas with differences | Details | Blame | View Log

Rev 298 Rev 338
/* PR c/11446: packed on a struct takes precedence over aligned on the type
/* PR c/11446: packed on a struct takes precedence over aligned on the type
   of a field.  */
   of a field.  */
/* { dg-do run } */
/* { dg-do run } */
 
 
extern void abort (void);
extern void abort (void);
 
 
struct A {
struct A {
  double d;
  double d;
} __attribute__ ((aligned));
} __attribute__ ((aligned));
 
 
struct B {
struct B {
  char c;
  char c;
  struct A a;
  struct A a;
} __attribute__ ((packed));
} __attribute__ ((packed));
 
 
int main ()
int main ()
{
{
  if (sizeof (struct B) != sizeof (char) + sizeof (struct A))
  if (sizeof (struct B) != sizeof (char) + sizeof (struct A))
    abort ();
    abort ();
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

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