summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 4fcfb57f4a..8c16af9318 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2561,14 +2561,26 @@ S_docatch_body(pTHX)
return NULL;
}
+/* In Unicos 10.0.0.6 (T90) the cc seems to botch optimization so that
+ * if cursi is an auto variable inside S_docatch() cursi doesn't get
+ * properly saved/restored across longjmps. &/
+#ifdef UNICOS_BROKEN_VOLATILE
+volatile PERL_SI *cursi;
+#endif
+
STATIC OP *
S_docatch(pTHX_ OP *o)
{
dTHR;
int ret;
OP *oldop = PL_op;
+#ifdef UNICOS_BROKEN_VOLATILE
+ dJMPENV;
+ cursi = PL_curstackinfo;
+#else
volatile PERL_SI *cursi = PL_curstackinfo;
dJMPENV;
+#endif
#ifdef DEBUGGING
assert(CATCH_GET == TRUE);