Patchwork Fix PR debug/43937

login
register
mail settings
Submitter Eric Botcazou
Date Sept. 13, 2010, 9:02 p.m.
Message ID <201009132302.12265.ebotcazou@adacore.com>
Download mbox | patch
Permalink /patch/64657/
State New
Headers show

Comments

Eric Botcazou - Sept. 13, 2010, 9:02 p.m.
This fixes the regression

FAIL: gcc.dg/guality/inline-params.c  -O1  execution test

introduced a few months ago by the uniquization of constants at the Tree 
level.  We need to mark the new symbol attached to these constants as written, 
like the expression, when it is output for the sake of the DWARF back-end.

Bootstrapped/regtested on x86-64-suse-linux, applied on the mainline as 
obvious.


2010-09-13  Eric Botcazou  <ebotcazou@adacore.com>

	PR debug/43937
	* varasm.c (output_constant_def_contents): Set TREE_ASM_WRITTEN on
	the DECL as well.

Patch

Index: varasm.c
===================================================================
--- varasm.c	(revision 164211)
+++ varasm.c	(working copy)
@@ -3115,7 +3115,7 @@  output_constant_def_contents (rtx symbol
   output_addressed_constants (exp);
 
   /* We are no longer deferring this constant.  */
-  TREE_ASM_WRITTEN (exp) = 1;
+  TREE_ASM_WRITTEN (decl) = TREE_ASM_WRITTEN (exp) = 1;
 
   /* If the constant is part of an object block, make sure that the
      decl has been positioned within its block, but do not write out