Patchwork [committed] Fix used but not set warning in dwarf2out.c.

login
register
mail settings
Submitter Richard Henderson
Date March 30, 2012, 6:04 p.m.
Message ID <4F75F596.6010100@redhat.com>
Download mbox | patch
Permalink /patch/149719/
State New
Headers show

Comments

Richard Henderson - March 30, 2012, 6:04 p.m.
This showed up on i686-linux with BOOT_CFLAGS='-Os -g'.  I didn't
investigate the full call chain for why the variable wasn't set
in the by-reference call to fortran_common.


r~
* dwarf2out.c (gen_variable_die): Initialize off.

Patch

diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 828e996..ca88fc5 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -17765,7 +17765,7 @@  common_block_die_table_eq (const void *x, const void *y)
 static void
 gen_variable_die (tree decl, tree origin, dw_die_ref context_die)
 {
-  HOST_WIDE_INT off;
+  HOST_WIDE_INT off = 0;
   tree com_decl;
   tree decl_or_origin = decl ? decl : origin;
   tree ultimate_origin;