On Thu, Dec 17, 2015 at 5:00 PM, Bernd Schmidt <bernds_...@t-online.de> wrote: > This is a small problem found by a static analyzer, a function in bt-load > can in theory return the address of a local variable. > > Bootstrapped and tested on x86_64-linux, ok?
Except PATTERN (insn) will never be a REG. The only case where the input can be a REG is: gcc_assert (!find_btr_use (src)); And that is basically making sure the left hand side is not part of all_btrs so the way to fix that would be simpler if you define a new function called btr_use_p or something to that effect and return true/false instead. Also if you are touching this code, can you change the literal 0 to NULL inside find_btr_use. Thanks, Andrew > > > Bernd