Fix C++ template instantiation back end core dump.
authorJim Wilson <wilson@cygnus.com>
Fri, 29 Aug 1997 18:52:51 +0000 (18:52 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Fri, 29 Aug 1997 18:52:51 +0000 (11:52 -0700)
* varasm.c (mark_constants): Don't look inside CONST_DOUBLEs.

From-SVN: r14999

gcc/ChangeLog
gcc/varasm.c

index d3078a52ec65d6b7045315ab492bd11ff15c8016..2e06e8b76fe72626189c1170e1c235ead916b9e8 100644 (file)
@@ -1,3 +1,7 @@
+Fri Aug 29 11:42:04 1997  Jim Wilson  <wilson@cygnus.com>
+
+       * varasm.c (mark_constants): Don't look inside CONST_DOUBLEs.
+
 Fri Aug 29 09:33:20 1997  Philipp Thomas  (kthomas@lxi165.gwdg.de)
 
        * dwarfout2.c (build_abbrev_table): Use xrealloc, not xmalloc
index c8ece891d241d7c0752e053bbbfbb7da12a206a1..9d245830f44e88cdf35dd4a1092d88082d936f85 100644 (file)
@@ -3798,6 +3798,13 @@ mark_constants (x)
        find_pool_constant (x)->mark = 1;
       return;
     }
+  /* Never search inside a CONST_DOUBLE, because CONST_DOUBLE_MEM may be
+     a MEM, but does not constitute a use of that MEM.  This is particularly
+     important inside a nested function, because CONST_DOUBLE_MEM may be
+     a reference to a MEM in the parent's constant pool.  See the comment
+     in force_const_mem.  */
+  else if (GET_CODE (x) == CONST_DOUBLE)
+    return;
 
   /* Insns may appear inside a SEQUENCE.  Only check the patterns of
      insns, not any notes that may be attached.  We don't want to mark