summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/except.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 645be42d376..4dbf3a12405 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2001-03-27 Alan Modra <alan@linuxcare.com.au>
+
+ * except.c (eh_regs): Save results of build_pointer_type to a temp
+ as FUNCTION_VALUE macro may evaluate its args multiple times.
+
2001-03-26 Mark Mitchell <mark@codesourcery.com>
* c-common.h (DECL_NUM_STMTS): New macro.
diff --git a/gcc/except.c b/gcc/except.c
index 5c854684680..eb80b9b40e2 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -2998,15 +2998,15 @@ eh_regs (pcontext, psp, pra, outgoing)
{
rtx rcontext, rsp, rra;
unsigned int i;
+ tree t;
+ t = build_pointer_type (void_type_node);
#ifdef FUNCTION_OUTGOING_VALUE
if (outgoing)
- rcontext = FUNCTION_OUTGOING_VALUE (build_pointer_type (void_type_node),
- current_function_decl);
+ rcontext = FUNCTION_OUTGOING_VALUE (t, current_function_decl);
else
#endif
- rcontext = FUNCTION_VALUE (build_pointer_type (void_type_node),
- current_function_decl);
+ rcontext = FUNCTION_VALUE (t, current_function_decl);
#ifdef STATIC_CHAIN_REGNUM
if (outgoing)
OpenPOWER on IntegriCloud