Spotted whilst implementing nesting support in the experimental-html diagnostic sink.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r16-1403-gb619b4d7e7a507. gcc/ChangeLog: * gimple-ssa-warn-access.cc (pass_waccess::maybe_check_dealloc_call): Add missing auto_diagnostic_group to nest the "returned from %qD" note within the warning. --- gcc/gimple-ssa-warn-access.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/gimple-ssa-warn-access.cc b/gcc/gimple-ssa-warn-access.cc index 305b63567fea..0f4aff6b59b5 100644 --- a/gcc/gimple-ssa-warn-access.cc +++ b/gcc/gimple-ssa-warn-access.cc @@ -3767,6 +3767,7 @@ pass_waccess::maybe_check_dealloc_call (gcall *call) if (is_gimple_call (def_stmt)) { + auto_diagnostic_group d; bool warned = false; if (gimple_call_alloc_p (def_stmt)) { -- 2.26.3