http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60655

--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 32565
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32565&action=edit
gcc49-pr60655.patch

Alternate fix, the issue on the non-fdata-sections testcase is that we have
(note 226 225 227 (var_location rx (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)

which hasn't been simplified into %r3+323.  I think this patch is the right
thing to do, but it is probably too risky for 4.9 now, too many targets do too
weird things, especially for -fpic.  Perhaps if we had a flag (global for 4.9)
we are in var-tracking pass (guess current_pass && strcmp (current_pass->name,
"vartrack") == 0 would be way too ugly), it might be safe to do that only for
var-tracking and for 5.0 enable it unconditionally.

Reply via email to