diff mbox

Don't drop DECL_INITIAL if -g for DWARF2+ (PR fortran/55395)

Message ID 20121207160645.GA2315@tucnak.redhat.com
State New
Headers show

Commit Message

Jakub Jelinek Dec. 7, 2012, 4:06 p.m. UTC
On Fri, Dec 07, 2012 at 12:36:58PM +0100, Richard Biener wrote:
> Hmm.  Then make it DINFO_LEVEL_NONE and put in a fixme comment refering
> to the bugreport.

Here is what I've committed after another bootstrap/regtest:

2012-12-07  Jakub Jelinek  <jakub@redhat.com>

	PR fortran/55395
	* varpool.c (varpool_remove_node): Don't drop DECL_INITIAL
	for -g for any kind of debug info.


	Jakub
diff mbox

Patch

--- gcc/varpool.c.jj	2012-12-06 21:34:16.000000000 +0100
+++ gcc/varpool.c	2012-12-07 13:25:42.005710625 +0100
@@ -63,12 +63,8 @@  varpool_remove_node (struct varpool_node
       && !DECL_IN_CONSTANT_POOL (node->symbol.decl)
       /* Keep vtables for BINFO folding.  */
       && !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))
-      /* dwarf2out can use most of the initializers.  */
-      && write_symbols != DWARF2_DEBUG
-      && write_symbols != VMS_AND_DWARF2_DEBUG)
+      /* FIXME: http://gcc.gnu.org/PR55395 */
+      && debug_info_level == DINFO_LEVEL_NONE)
     DECL_INITIAL (node->symbol.decl) = error_mark_node;
   ggc_free (node);
 }