OSDN Git Service

(immed_double_const, immed_real_const_1): Don't touch
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Sep 1993 01:56:04 +0000 (01:56 +0000)
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Sep 1993 01:56:04 +0000 (01:56 +0000)
const_double_chain if not inside a function.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5322 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/varasm.c

index ea3fbb2..66128bb 100644 (file)
@@ -1507,9 +1507,9 @@ immed_double_const (i0, i1, mode)
   r = gen_rtx (CONST_DOUBLE, mode, 0, i0, i1);
   pop_obstacks ();
 
-  /* Don't touch const_double_chain in nested function;
-     see force_const_mem.  */
-  if (outer_function_chain == 0)
+  /* Don't touch const_double_chain in nested function; see force_const_mem.
+     Also, don't touch it if not inside any function.  */
+  if (outer_function_chain == 0 && current_function_decl != 0)
     {
       CONST_DOUBLE_CHAIN (r) = const_double_chain;
       const_double_chain = r;
@@ -1582,9 +1582,9 @@ immed_real_const_1 (d, mode)
   bcopy (&u, &CONST_DOUBLE_LOW (r), sizeof u);
   pop_obstacks ();
 
-  /* Don't touch const_double_chain in nested function;
-     see force_const_mem.  */
-  if (outer_function_chain == 0)
+  /* Don't touch const_double_chain in nested function; see force_const_mem.
+     Also, don't touch it if not inside any function.  */
+  if (outer_function_chain == 0 && current_function_decl != 0)
     {
       CONST_DOUBLE_CHAIN (r) = const_double_chain;
       const_double_chain = r;