This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: G++ V3 ABI tests
- To: gcc-patches at gcc dot gnu dot org
- Subject: PATCH: G++ V3 ABI tests
- From: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>
- Date: Thu, 7 Dec 2000 20:09:48 -0600 (CST)
- Reply-to: rittle at rsch dot comm dot mot dot com
This patch has been in my bootstrap tree for some time. Known to work
on i?86-*-linux*. Seen to pass on i?86-*-freebsd*. Are there any
i?86-*-* platforms where they are known to fail?
Also, the comments in those files imply that they are checking IA-64
ABI compliance, yet ia64*-*-linux* is an example configuration triple
now in use on IA-64 platforms. Thus, given the current 'Skip if not
target:' lines, these tests aren't even being tested on the platforms
they were originally written to test! If these tests should be
passing on any G++ V3 ABI machine (somewhat doubtful given the
explicit sizeof/alignof/offsetof tests which are common in the tests),
then the 'Skip if not target:' lines should be removed altogether.
2000-12-07 Loren J. Rittle <ljrittle@acm.org>
* g++.old-deja/g++.abi/aggregates.C: Add protection similar to
other tests in same directory. Match more platforms that
should pass under G++ V3 ABI.
* g++.old-deja/g++.abi/align.C: Likewise.
* g++.old-deja/g++.abi/bitfields.C: Likewise.
Index: g++.old-deja/g++.abi/aggregates.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.abi/aggregates.C,v
retrieving revision 1.1
diff -c -r1.1 aggregates.C
*** aggregates.C 1999/12/03 16:45:53 1.1
--- aggregates.C 2000/12/08 01:45:45
***************
*** 1,7 ****
! // Skip if not target: i?86-*-linux*
// Special g++ Options: -malign-double
// Origin: Alex Samuel <samuel@codesourcery.com>
/* Test the data layout of C aggregates by checking aggregate size and
alignment and field offsets for compliance with the IA-64 ABI. */
--- 1,9 ----
! // Skip if not target: i?86-*-*
// Special g++ Options: -malign-double
// Origin: Alex Samuel <samuel@codesourcery.com>
+ #if defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100
+
/* Test the data layout of C aggregates by checking aggregate size and
alignment and field offsets for compliance with the IA-64 ABI. */
***************
*** 123,125 ****
--- 125,135 ----
return 0;
}
+
+ #else /* !(defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100) */
+
+ int main ()
+ {
+ }
+
+ #endif /* !(defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100) */
Index: g++.old-deja/g++.abi/align.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.abi/align.C,v
retrieving revision 1.4
diff -c -r1.4 align.C
*** align.C 1999/12/05 18:29:15 1.4
--- align.C 2000/12/08 01:45:45
***************
*** 1,7 ****
! // Skip if not target: i?86-*-linux*
// Special g++ Options: -malign-double
// Origin: Alex Samuel <samuel@codesourcery.com>
/* Test the size and alignment of fundamental C types for compliance
with the IA-64 ABI. */
--- 1,9 ----
! // Skip if not target: i?86-*-*
// Special g++ Options: -malign-double
// Origin: Alex Samuel <samuel@codesourcery.com>
+ #if defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100
+
/* Test the size and alignment of fundamental C types for compliance
with the IA-64 ABI. */
***************
*** 122,124 ****
--- 124,134 ----
return 0;
}
+
+ #else /* !(defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100) */
+
+ int main ()
+ {
+ }
+
+ #endif /* !(defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100) */
Index: g++.old-deja/g++.abi/bitfields.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.abi/bitfields.C,v
retrieving revision 1.1
diff -c -r1.1 bitfields.C
*** bitfields.C 1999/12/03 16:45:53 1.1
--- bitfields.C 2000/12/08 01:45:45
***************
*** 1,7 ****
! // Skip if not target: i?86-*-linux*
// Special g++ Options: -malign-double
// Origin: Alex Samuel <samuel@codesourcery.com>
/* Test the layout of bitfields in C aggretagtes for compliance with
the IA-64 ABI. */
--- 1,9 ----
! // Skip if not target: i?86-*-*
// Special g++ Options: -malign-double
// Origin: Alex Samuel <samuel@codesourcery.com>
+ #if defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100
+
/* Test the layout of bitfields in C aggretagtes for compliance with
the IA-64 ABI. */
***************
*** 157,159 ****
--- 159,169 ----
return 0;
}
+
+ #else /* !(defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100) */
+
+ int main ()
+ {
+ }
+
+ #endif /* !(defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100) */