summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-11 20:19:35 +0000
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-11 20:19:35 +0000
commit7d9982de8d8406891d65b98a2a8bc1771005a4cd (patch)
tree4f64f69c5e757f65392f7f5294d0bb7363fbd8f2
parentbb35a51345b7517425ea13c0c39f16c0938b6d26 (diff)
downloadppe42-gcc-7d9982de8d8406891d65b98a2a8bc1771005a4cd.tar.gz
ppe42-gcc-7d9982de8d8406891d65b98a2a8bc1771005a4cd.zip
2005-01-11 Andrew Pinski <pinskia@physics.uc.edu>
PR target/18761 * g++.dg/abi/align1.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@93194 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/abi/align1.C27
2 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index a28010510cf..f74ab33fc55 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
diff --git a/gcc/testsuite/g++.dg/abi/align1.C b/gcc/testsuite/g++.dg/abi/align1.C
new file mode 100644
index 00000000000..2a70bce601f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/align1.C
@@ -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 ();
+}
+
OpenPOWER on IntegriCloud