From 5145eda8f01658086322f1b52e6d9d3285c3744e Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Wed, 4 Nov 1992 07:03:33 +0000 Subject: [PATCH] (immed_real_const_1, immed_double_const): Don't push on const_double_chain in nested function. From-SVN: r2688 --- gcc/varasm.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/gcc/varasm.c b/gcc/varasm.c index 66d5c780667..228833c58d1 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -1324,8 +1324,13 @@ immed_double_const (i0, i1, mode) if (in_current_obstack) rtl_in_current_obstack (); - CONST_DOUBLE_CHAIN (r) = const_double_chain; - const_double_chain = r; + /* Don't touch const_double_chain in nested function; + see force_const_mem. */ + if (outer_function_chain != 0) + { + CONST_DOUBLE_CHAIN (r) = const_double_chain; + const_double_chain = r; + } /* Store const0_rtx in mem-slot since this CONST_DOUBLE is on the chain. Actual use of mem-slot is only through force_const_mem. */ @@ -1390,8 +1395,13 @@ immed_real_const_1 (d, mode) if (in_current_obstack) rtl_in_current_obstack (); - CONST_DOUBLE_CHAIN (r) = const_double_chain; - const_double_chain = r; + /* Don't touch const_double_chain in nested function; + see force_const_mem. */ + if (outer_function_change != 0) + { + CONST_DOUBLE_CHAIN (r) = const_double_chain; + const_double_chain = r; + } /* Store const0_rtx in CONST_DOUBLE_MEM since this CONST_DOUBLE is on the chain, but has not been allocated memory. Actual use of CONST_DOUBLE_MEM