aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlan Modra <alan@linuxcare.com.au>2001-03-27 03:00:07 +0000
committerAlan Modra <amodra@gcc.gnu.org>2001-03-27 12:30:07 +0930
commit5b5c273405a8786fcc213699e893f68b2015a9cb (patch)
treeda7dd95a66fb5ddaba43305552cd18213d4f312a /gcc
parentd6c4152ac040f2ce8ab21de72e00a3c880071307 (diff)
downloadgcc-5b5c273405a8786fcc213699e893f68b2015a9cb.zip
gcc-5b5c273405a8786fcc213699e893f68b2015a9cb.tar.gz
gcc-5b5c273405a8786fcc213699e893f68b2015a9cb.tar.bz2
except.c (eh_regs): Save results of build_pointer_type to a temp as FUNCTION_VALUE macro may...
* except.c (eh_regs): Save results of build_pointer_type to a temp as FUNCTION_VALUE macro may evaluate its args multiple times. From-SVN: r40861
Diffstat (limited to 'gcc')
-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 645be42..4dbf3a12 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 5c85468..eb80b9b 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)