re PR target/18761 (C++ ABI bug on OS X with embed types)

2005-01-11  Andrew Pinski  <pinskia@physics.uc.edu>

        PR target/18761
        * g++.dg/abi/align1.C: New test.

From-SVN: r93194
This commit is contained in:
Andrew Pinski 2005-01-11 20:19:35 +00:00 committed by Andrew Pinski
parent 85962ac815
commit 7eb3b9ec89
2 changed files with 32 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2005-01-11 Andrew Pinski <pinskia@physics.uc.edu>
PR target/18761
* g++.dg/abi/align1.C: New test.
2005-01-11 Alan Modra <amodra@bigpond.net.au>
* g++.dg/ext/altivec-3.C (baz, baz2): Check one component of structs

View File

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