http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60655
--- Comment #7 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #5) > As discussed yesterday with Ramana on IRC, my suggested fix for this for 4.9 > is something like: > --- gcc/dwarf2out.c 2014-03-03 08:24:14.841895755 +0100 > +++ gcc/dwarf2out.c 2014-03-26 10:42:32.027508796 +0100 > @@ -11326,7 +11326,12 @@ const_ok_for_output_1 (rtx *rtlp, void * > } > > if (GET_CODE (rtl) != SYMBOL_REF) > - return 0; > + { > + /* NOT is not handled by output_addr_const. */ > + if (GET_CODE (rtl) == NOT) > + return 1; > + return 0; > + } > In addition looks like we need to handle (minus (const_int) (sym_ref)) because with the reduced testcase with -g and removing the -fdata-sections I get an error with const ( minus (323) (sym_ref)) and gas won't grok that because there is no relocation that will deal with this. (note 220 219 221 5 (var_location r2 (plus:SI (plus:SI (reg:SI 3 r3 [orig:192 ivtmp.37 ] [192]) (symbol_ref:SI ("*.LANCHOR0") [flags 0x182])) (const:SI (minus:SI (const_int 323 [0x143]) (symbol_ref:SI ("*.LANCHOR0") [flags 0x182]))))) NOTE_INSN_VAR_LOCATION) Uggh this is proving to be more ugly.