Message ID | 20161101230800.GA11998@tarox.wildebeest.org |
---|---|
State | New |
Headers | show |
On Wed, 2016-11-02 at 00:08 +0100, Mark Wielaard wrote: > That seemed to have been the last usage of origin_die in gen_variable_die. > So removing that caused: > > /home/mark/src/gcc/gcc/dwarf2out.c: In function ‘void gen_variable_die(tree, tree, dw_die_ref)’: > /home/mark/src/gcc/gcc/dwarf2out.c:22454:14: error: variable ‘origin_die’ set but not used [-Werror=unused-but-set-variable] > dw_die_ref origin_die = NULL; > ^~~~~~~~~~ > cc1plus: all warnings being treated as errors > make[3]: *** [dwarf2out.o] Error 1 > > The following seems to work around that and makes things build again for me: Which is precisely what Jakub checked in 5 minutes before I sent that email. Sorry for the noise. Everything builds again. Thanks, Mark
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 5ff6f97..24b85c1 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -22451,7 +22451,6 @@ gen_variable_die (tree decl, tree origin, dw_die_ref context_die) tree ultimate_origin; dw_die_ref var_die; dw_die_ref old_die = decl ? lookup_decl_die (decl) : NULL; - dw_die_ref origin_die = NULL; bool declaration = (DECL_EXTERNAL (decl_or_origin) || class_or_namespace_scope_p (context_die)); bool specialization_p = false; @@ -22627,7 +22626,7 @@ gen_variable_die (tree decl, tree origin, dw_die_ref context_die) var_die = new_die (DW_TAG_variable, context_die, decl); if (origin != NULL) - origin_die = add_abstract_origin_attribute (var_die, origin); + add_abstract_origin_attribute (var_die, origin); /* Loop unrolling can create multiple blocks that refer to the same static variable, so we must test for the DW_AT_declaration flag.