re PR fortran/55395 (libgfortran bootstrap failure on powerpc-linux-gnu and arm-linux...
authorJakub Jelinek <jakub@redhat.com>
Thu, 6 Dec 2012 20:34:55 +0000 (21:34 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 6 Dec 2012 20:34:55 +0000 (21:34 +0100)
PR fortran/55395
* varpool.c (varpool_remove_node): Don't drop DECL_INITIAL
if -g and emitting DWARF2+.

From-SVN: r194272

gcc/ChangeLog
gcc/varpool.c

index 3045f2b2e3256a93a7decc75327805c2d4b6f7b6..0989c488e610cabb3e79a778476a84911bad8445 100644 (file)
@@ -1,3 +1,9 @@
+2012-12-06  Jakub Jelinek  <jakub@redhat.com>
+
+       PR fortran/55395
+       * varpool.c (varpool_remove_node): Don't drop DECL_INITIAL
+       if -g and emitting DWARF2+.
+
 2012-12-06  Pat Haugen <pthaugen@us.ibm.com>
 
        * config/rs6000/rs6000.c (rs6000_option_override_internal): Set
index 87f29a02f09b2a977825d793cce35bfc12504d89..7f4cfe7b4591d16897a14fe69b8c5a9e426f8e19 100644 (file)
@@ -65,7 +65,10 @@ varpool_remove_node (struct varpool_node *node)
       && !DECL_VIRTUAL_P (node->symbol.decl)
       /* dbxout output constant initializers for readonly vars.  */
       && (!host_integerp (DECL_INITIAL (node->symbol.decl), 0)
-         || !TREE_READONLY (node->symbol.decl)))
+         || !TREE_READONLY (node->symbol.decl))
+      /* dwarf2out can use most of the initializers.  */
+      && write_symbols != DWARF2_DEBUG
+      && write_symbols != VMS_AND_DWARF2_DEBUG)
     DECL_INITIAL (node->symbol.decl) = error_mark_node;
   ggc_free (node);
 }