This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] darwin-ppc ABI testcases


Hello all,

attached a few test cases which came up during investigation of PR23067.
A few pass, another few fail at the moment. This is the status on fsf gcc head. The tests pass on apple's gcc: gcc version 4.0.1 (Apple Computer, Inc. build 5247)


Apple is dictating the ABI, so we have to follow.

These test cases will help to fix the issues we have.

I can xfail the failures, but I'm not very happy with since they may slip under the table if they are xfailed....

Comments?
Ok for head?
Andreas

2005-12-31  Andreas Tobler  <a.tobler@schweiz.ch>
	    Andrew Pinski <pinskia@physics.uc.edu>

	* gcc.target/powerpc/darwin-abi-3.c: New file.
	* gcc.target/powerpc/darwin-abi-4.c: Likewise.
	* gcc.target/powerpc/darwin-abi-5.c: Likewise.
	* gcc.target/powerpc/darwin-abi-6.c: Likewise.
	* gcc.target/powerpc/darwin-abi-7.c: Likewise.
	* gcc.target/powerpc/darwin-abi-8.c: Likewise.
	* gcc.target/powerpc/darwin-abi-9.c: Likewise.
	* gcc.target/powerpc/darwin-abi-10.c: Likewise.
	* gcc.target/powerpc/darwin-abi-11.c: Likewise.
Index: darwin-abi-3.c
===================================================================
--- darwin-abi-3.c	(revision 0)
+++ darwin-abi-3.c	(revision 0)
@@ -0,0 +1,9 @@
+/* { dg-do compile { target powerpc*-*-darwin* } } */
+/* { dg-options "-Wno-long-long" } */
+struct f
+{
+  int i;
+  long long ll;
+};
+
+int f[sizeof(struct f)!=12?-1:1];
Index: darwin-abi-4.c
===================================================================
--- darwin-abi-4.c	(revision 0)
+++ darwin-abi-4.c	(revision 0)
@@ -0,0 +1,9 @@
+/* { dg-do compile { target powerpc*-*-darwin* } } */
+/* { dg-options "-Wno-long-long" } */
+struct f
+{
+  long long ll;
+  int i;
+};
+
+int f[sizeof(struct f)!=16?-1:1];
Index: darwin-abi-5.c
===================================================================
--- darwin-abi-5.c	(revision 0)
+++ darwin-abi-5.c	(revision 0)
@@ -0,0 +1,29 @@
+/* { dg-do compile { target powerpc*-*-darwin* } } */
+/* { dg-options "-Wno-long-long" } */
+
+struct A
+{
+  long long a;
+  unsigned char b;
+};
+
+struct B
+{
+  struct A x;
+  unsigned char z;
+};
+
+struct C
+{
+  long d;
+  unsigned char e;
+};
+
+struct z
+{ 
+  struct A b2;
+  struct B b3;
+  struct C b4;
+};
+
+int f[sizeof(struct z)!=48?-1:1];
Index: darwin-abi-6.c
===================================================================
--- darwin-abi-6.c	(revision 0)
+++ darwin-abi-6.c	(revision 0)
@@ -0,0 +1,18 @@
+/* { dg-do compile { target powerpc*-*-darwin* } } */
+/* { dg-options "-Wno-long-long" } */
+
+struct a
+{
+  int tt;
+  long long t;
+  int i;
+};
+
+struct g
+{
+  int tt;
+  struct a d;
+  int t;
+};
+
+int f[sizeof(struct g)!=24?-1:1];
Index: darwin-abi-7.c
===================================================================
--- darwin-abi-7.c	(revision 0)
+++ darwin-abi-7.c	(revision 0)
@@ -0,0 +1,16 @@
+/* { dg-do compile { target powerpc*-*-darwin* } } */
+/* { dg-options "-Wno-long-long" } */
+
+struct b
+{
+  long long t;
+  int i;
+};
+struct h
+{
+  int tt;
+  struct b d;
+  int t;
+};
+
+int f[sizeof(struct h)!=24?-1:1];
Index: darwin-abi-8.c
===================================================================
--- darwin-abi-8.c	(revision 0)
+++ darwin-abi-8.c	(revision 0)
@@ -0,0 +1,16 @@
+/* { dg-do compile { target powerpc*-*-darwin* } } */
+
+struct c
+{
+  double d;
+  int i;
+};
+
+struct j
+{
+  int tt;
+  struct c d;
+  int t;
+};
+
+int f[sizeof(struct j)!=24?-1:1];
Index: darwin-abi-9.c
===================================================================
--- darwin-abi-9.c	(revision 0)
+++ darwin-abi-9.c	(revision 0)
@@ -0,0 +1,23 @@
+/* { dg-do compile { target powerpc*-*-darwin* } } */
+/* { dg-options "-Wno-long-long" } */
+
+struct b
+{
+  long long t;
+  int i;
+};
+
+struct l
+{
+  int i;
+  double d;
+};
+struct k
+{
+  int tt;
+  struct l d;
+  struct b h;
+  int t;
+};
+
+int f[sizeof(struct k)!=36?-1:1];
Index: darwin-abi-10.c
===================================================================
--- darwin-abi-10.c	(revision 0)
+++ darwin-abi-10.c	(revision 0)
@@ -0,0 +1,24 @@
+/* { dg-do compile { target powerpc*-*-darwin* } } */
+/* { dg-options "-Wno-long-long" } */
+
+struct b
+{
+  long long t;
+  int i;
+};
+
+struct c
+{
+  double d;
+  int i;
+};
+
+struct n
+{
+  long long ll;
+  int tt;
+  struct c d;
+  struct b h;
+  int t;
+};
+int f[sizeof(struct n)!=48?-1:1];
Index: darwin-abi-11.c
===================================================================
--- darwin-abi-11.c	(revision 0)
+++ darwin-abi-11.c	(revision 0)
@@ -0,0 +1,30 @@
+/* { dg-do compile { target powerpc*-*-darwin* } } */
+/* { dg-options "-Wno-long-long" } */
+
+struct A
+{
+  long long a;
+  unsigned char b;
+};
+
+struct D
+{
+  unsigned char y;
+  struct A x;
+  unsigned char z;
+};
+
+struct E
+{
+  long long d;
+  unsigned char e;
+};
+
+struct y
+{
+  struct A b2;
+  struct D b3;
+  struct E b4;
+};
+
+int f[sizeof(struct y)!=56?-1:1];

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]