On Thu, Aug 31, 2023 at 12:37:59PM +0000, Richard Biener via Gcc-patches wrote: > The following keeps dumping SSA def stmt RHS during diagnostic > reporting only for gimple_assign_single_p defs which means > memory loads. This avoids diagnostics containing PHI nodes > like > > warning: 'realloc' called on pointer '*_42 = PHI <lcs.14_40(29), > lcs.19_48(30)>.t_mem_caches' with nonzero offset 40 > > instead getting back the previous behavior: > > warning: 'realloc' called on pointer '*<unknown>.t_mem_caches' with nonzero > offset 40 > > Bootstrapped and tested on x86_64-unknown-linux-gnu, OK? > > Thanks, > Richard. > > PR middle-end/111253 > gcc/c-family/ > * c-pretty-print.cc (c_pretty_printer::primary_expression): > Only dump gimple_assign_single_p SSA def RHS. > > * gcc.dg/Wfree-nonheap-object-7.c: New testcase.
Ok. Jakub