On Fri, Jul 28, 2017 at 01:36:54PM +0200, Martin Liška wrote: > > I think target_for_debug_bind () gets confused. > > Exactly: > > tree > target_for_debug_bind (tree var) > { > ... > > if (DECL_HAS_VALUE_EXPR_P (var)) > return target_for_debug_bind (DECL_VALUE_EXPR (var)); > ... > > There's fixed changelog entry: > > Set VALUE_EXPR after a debug stmt is generated (PR sanitizer/81340). > > gcc/ChangeLog: > > 2017-07-10 Martin Liska <mli...@suse.cz> > > PR sanitizer/81340 > * sanopt.c (sanitize_rewrite_addressable_params): > Set VALUE_EXPR after gimple_build_debug_bind because > it calls target_for_debug_bind and would confuse the function.
s/VALUE_EXPR/DECL_VALUE_EXPR/ and at least the first two words should fit on the line just fine: * sanopt.c (sanitize_rewrite_addressable_params): Set DECL_VALUE_EXPR after gimple_build_debug_bind. The because doesn't belong to ChangeLog, if you want, you can put it into a comment in the source. > gcc/testsuite/ChangeLog: > > 2017-07-10 Martin Liska <mli...@suse.cz> > > PR sanitizer/81340 > * g++.dg/asan/pr81340.C: New test. Ok. Jakub