This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: forced-exception tests fail on SJLJ
- From: Richard Henderson <rth at redhat dot com>
- To: Richard dot Earnshaw at arm dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 4 Apr 2003 16:43:37 -0800
- Subject: Re: forced-exception tests fail on SJLJ
- References: <20030402175906.GC26964@redhat.com> <200304031344.h33Dii515593@pc960.cambridge.arm.com>
On Thu, Apr 03, 2003 at 02:44:44PM +0100, Richard Earnshaw wrote:
> Getting closer. Now it fails with:
>
> /tmp/ccGqBsBb.o(.text+0xa8): In function `force_unwind()':
> : undefined reference to `_Unwind_ForcedUnwind'
Fixed thus. Tested with i686 --enable-sjlj-exceptions.
r~
* g++.dg/eh/forced1.C: Use _Unwind_SjLj_ForcedUnwind as appropriate.
* g++.dg/eh/forced2.C: Likewise.
Index: gcc/testsuite/g++.dg/eh/forced1.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.dg/eh/forced1.C,v
retrieving revision 1.1
diff -c -p -d -u -r1.1 forced1.C
--- gcc/testsuite/g++.dg/eh/forced1.C 2 Apr 2003 07:08:16 -0000 1.1
+++ gcc/testsuite/g++.dg/eh/forced1.C 5 Apr 2003 00:43:21 -0000
@@ -31,7 +31,11 @@ static void force_unwind ()
exc->exception_class = 0;
exc->exception_cleanup = 0;
+#ifndef __USING_SJLJ_EXCEPTIONS__
_Unwind_ForcedUnwind (exc, force_unwind_stop, 0);
+#else
+ _Unwind_SjLj_ForcedUnwind (exc, force_unwind_stop, 0);
+#endif
abort ();
}
Index: gcc/testsuite/g++.dg/eh/forced2.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.dg/eh/forced2.C,v
retrieving revision 1.1
diff -c -p -d -u -r1.1 forced2.C
--- gcc/testsuite/g++.dg/eh/forced2.C 2 Apr 2003 07:08:16 -0000 1.1
+++ gcc/testsuite/g++.dg/eh/forced2.C 5 Apr 2003 00:43:21 -0000
@@ -34,9 +34,13 @@ force_unwind () throw()
_Unwind_Exception *exc = new _Unwind_Exception;
exc->exception_class = 0;
exc->exception_cleanup = 0;
-
+
+#ifndef __USING_SJLJ_EXCEPTIONS__
_Unwind_ForcedUnwind (exc, force_unwind_stop, 0);
-
+#else
+ _Unwind_SjLj_ForcedUnwind (exc, force_unwind_stop, 0);
+#endif
+
abort ();
}