This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
ia64-hpux testsuite tweaks
- From: "Zack Weinberg" <zack at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Date: Mon, 02 Feb 2004 12:07:49 -0800
- Subject: ia64-hpux testsuite tweaks
This patch removes some noise from the testsuite results on ia64-hpux:
1) g++.dg/eh/forced*.C all use the _Unwind_ForcedUnwind routine, which
is not provided by the HPUX libunwind.so -> XFAIL all these tests
on ia64-hp-hpux11.*.
2) gcc.dg/cleanup-5.c has the same problem. Here I think it most
appropriate to follow the example of some of the other cleanup-*.c
tests, and limit testing to Linux.
3) g++.dg/eh/ia64-1.C tries to verify that branch registers are
properly saved and restored around an exception. This works fine
in LP64 mode, but HARD_REGNO_MODE_OK will not allow one to write
'register void *b1 __asm("b1");' in ILP32 mode, because values in
branch registers must be DImode. So I put #ifdef __LP64__ around
all the problematic code. (This limitation could, maybe, be lifted
with special movsi patterns.)
Testsuite run on ia64-hp-hpux11.23, applied to mainline and 3.4
branch. Gabriel, I would like to apply this patch to the 3.3 branch
too, is that OK?
zw
* g++.dg/eh/forced1.C, g++.dg/eh/forced2.C, g++.dg/eh/forced3.C
* g++.dg/eh/forced4.C: XFAIL ia64-hp-hpux11.*.
* g++.dg/eh/ia64-1.C: Test branch regs only #ifdef __LP64__.
* gcc.dg/cleanup-5.c: Run only on Linux targets.
===================================================================
Index: testsuite/g++.dg/eh/forced1.C
--- testsuite/g++.dg/eh/forced1.C 2 May 2003 21:01:24 -0000 1.1.2.2
+++ testsuite/g++.dg/eh/forced1.C 2 Feb 2004 19:59:31 -0000
@@ -1,4 +1,5 @@
-// { dg-do run }
+// HP-UX libunwind.so doesn't provide _Unwind_ForcedUnwind.
+// { dg-do run { xfail "ia64-hp-hpux11.*" } }
// Test that forced unwinding runs all cleanups. Also tests that
// rethrowing doesn't call the exception object destructor.
===================================================================
Index: testsuite/g++.dg/eh/forced2.C
--- testsuite/g++.dg/eh/forced2.C 2 May 2003 21:01:24 -0000 1.1.2.2
+++ testsuite/g++.dg/eh/forced2.C 2 Feb 2004 19:59:31 -0000
@@ -1,4 +1,5 @@
-// { dg-do run }
+// HP-UX libunwind.so doesn't provide _Unwind_ForcedUnwind.
+// { dg-do run { xfail "ia64-hp-hpux11.*" } }
// Test that leaving the catch block without rethrowing
// does call the exception object destructor.
===================================================================
Index: testsuite/g++.dg/eh/forced3.C
--- testsuite/g++.dg/eh/forced3.C 2 May 2003 21:01:24 -0000 1.1.2.1
+++ testsuite/g++.dg/eh/forced3.C 2 Feb 2004 19:59:31 -0000
@@ -1,4 +1,5 @@
-// { dg-do run }
+// HP-UX libunwind.so doesn't provide _Unwind_ForcedUnwind.
+// { dg-do run { xfail "ia64-hp-hpux11.*" } }
// Test that forced unwinding calls std::unexpected going
// throw a nothrow function.
===================================================================
Index: testsuite/g++.dg/eh/forced4.C
--- testsuite/g++.dg/eh/forced4.C 2 May 2003 21:01:25 -0000 1.1.2.1
+++ testsuite/g++.dg/eh/forced4.C 2 Feb 2004 19:59:31 -0000
@@ -1,4 +1,5 @@
-// { dg-do run }
+// HP-UX libunwind.so doesn't provide _Unwind_ForcedUnwind.
+// { dg-do run { xfail "ia64-hp-hpux11.*" } }
// Test that forced unwinding does not call std::unexpected going
// throw a function with a non-empty exception spec.
===================================================================
Index: testsuite/g++.dg/eh/ia64-1.C
--- testsuite/g++.dg/eh/ia64-1.C 12 Dec 2003 16:10:10 -0000 1.1.2.1
+++ testsuite/g++.dg/eh/ia64-1.C 2 Feb 2004 19:59:31 -0000
@@ -1,10 +1,13 @@
// Test whether call saved float and branch regs are restored properly
+// We can't do this test for branch regs in ILP32 mode.
// { dg-do run { target ia64-*-* } }
// { dg-options "-O2" }
extern "C" void abort (void);
+#ifdef __LP64__
char buf[128];
+#endif
void __attribute__((noinline))
bar (void)
@@ -28,13 +31,17 @@ main (void)
register double f5 __asm ("f5");
register double f16 __asm ("f16");
register double f17 __asm ("f17");
+#ifdef __LP64__
register void *b1 __asm ("b1");
register void *b2 __asm ("b2");
register void *b3 __asm ("b3");
register void *b4 __asm ("b4");
register void *b5 __asm ("b5");
+#endif
f2 = 12.0; f3 = 13.0; f4 = 14.0; f5 = 15.0; f16 = 16.0; f17 = 17.0;
+#ifdef __LP64__
b1 = &buf[1]; b2 = &buf[2]; b3 = &buf[3]; b4 = &buf[4]; b5 = &buf[5];
+#endif
try
{
foo ();
@@ -43,8 +50,10 @@ main (void)
if (f2 != 12.0 || f3 != 13.0 || f4 != 14.0
|| f5 != 15.0 || f16 != 16.0 || f17 != 17.0)
abort ();
+#ifdef __LP64__
if (b1 != &buf[1] || b2 != &buf[2] || b3 != &buf[3]
|| b4 != &buf[4] || b5 != &buf[5])
abort ();
+#endif
return 0;
}
===================================================================
Index: testsuite/gcc.dg/cleanup-5.c
--- testsuite/gcc.dg/cleanup-5.c 4 Jun 2003 16:56:13 -0000 1.1.2.1
+++ testsuite/gcc.dg/cleanup-5.c 2 Feb 2004 19:59:32 -0000
@@ -1,4 +1,4 @@
-/* { dg-do run } */
+/* { dg-do run { target i?86-*-linux* x86_64-*-linux* ia64-*-linux* alpha*-*-linux* powerpc*-*-linux* s390*-*-linux* sparc*-*-linux* mips*-*-linux* } } */
/* { dg-options "-fexceptions" } */
/* Verify that cleanups work with exception handling. */