On Thu, 26 Mar 2020, Jakub Jelinek wrote: > On Thu, Mar 26, 2020 at 10:14:35AM +0100, Richard Biener wrote: > > Ick. I fear we really need a better way of dealing with this > > STATEMENT_LIST appearance with only -g ... > > Yeah, it is very ugly and in some PRs I'm out of ideas what to do.
I think a more sustainable "fix" would be to simply not emit the DEBUG_BEGIN_STMT when it would be the only reason to emit a STATEMENT_LIST ... Or always emit a STATEMENT_LIST node whenever there could be one (hopefully not every stmt could be a stmt list and hopefully we don't treat single-stmt STATEMENT_LIST specially). That is, the fix should be to avoid this difference in the first place, not try to deal with the difference later. Richard.