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/] [g++.dg/] [abi/] [align1.C] - Diff between revs 301 and 338

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

Rev 301 Rev 338
// This was failuring on powerpc-darwin and powerpc-aix as
// This was failuring on powerpc-darwin and powerpc-aix as
// we were taking the embeded type as the first field decl.
// we were taking the embeded type as the first field decl.
//  This was PR target/18761.
//  This was PR target/18761.
// { dg-do run }
// { dg-do run }
union A {
union A {
  double d;
  double d;
};
};
union B {
union B {
  enum E { e };
  enum E { e };
  double d;
  double d;
};
};
struct AlignA {
struct AlignA {
  char c;
  char c;
  A a;
  A a;
};
};
struct AlignB {
struct AlignB {
  char c;
  char c;
  B b;
  B b;
};
};
extern "C" void abort ();
extern "C" void abort ();
int main () {
int main () {
  if ( __alignof__ (AlignA) != __alignof__ (AlignB))
  if ( __alignof__ (AlignA) != __alignof__ (AlignB))
    abort ();
    abort ();
}
}
 
 

powered by: WebSVN 2.1.0

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