aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/eh/forced2.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/eh/forced2.C')
-rw-r--r--gcc/testsuite/g++.dg/eh/forced2.C4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/testsuite/g++.dg/eh/forced2.C b/gcc/testsuite/g++.dg/eh/forced2.C
index 3c6719da0f9..54586a00617 100644
--- a/gcc/testsuite/g++.dg/eh/forced2.C
+++ b/gcc/testsuite/g++.dg/eh/forced2.C
@@ -6,6 +6,7 @@
#include <unwind.h>
#include <stdlib.h>
+#include <string.h>
static _Unwind_Reason_Code
force_unwind_stop (int version, _Unwind_Action actions,
@@ -29,7 +30,8 @@ static void
force_unwind ()
{
_Unwind_Exception *exc = new _Unwind_Exception;
- exc->exception_class = 0;
+ // exception_class might not be a scalar.
+ memset (&exc->exception_class, 0, sizeof (exc->exception_class));
exc->exception_cleanup = force_unwind_cleanup;
#ifndef __USING_SJLJ_EXCEPTIONS__