On Dec 21, 2017, Jakub Jelinek <ja...@redhat.com> wrote: > On Wed, Dec 20, 2017 at 10:02:24PM -0200, Alexandre Oliva wrote: >> --- a/gcc/c-family/c-semantics.c >> +++ b/gcc/c-family/c-semantics.c >> @@ -96,6 +96,15 @@ pop_stmt_list (tree t) >> + while (!tsi_end_p (i) >> + && TREE_CODE (tsi_stmt (i)) == DEBUG_BEGIN_STMT) >> + tsi_next (&i); >> + /* If there's only one nondebug stmt in the list, we'd have >> + extracted the stmt and dropped the list, and we'd take >> + TREE_SIDE_EFFECTS from that statement, so keep the list's >> + TREE_SIDE_EFFECTS in sync. */ >> + if (tsi_one_before_end_p (i)) >> + TREE_SIDE_EFFECTS (t) = TREE_SIDE_EFFECTS (tsi_stmt (i));
> So DEBUG_BEGIN_STMTs after the single non-DEBUG_BEGIN_STMT stmt in > the STATEMENT_LIST can't happen (or just we don't have a testcase for it)? AFAICT, if they do at this point, it implies multiple nondebug stmts, thus nonzero TREE_SIDE_EFFECTS for the list. I'm not even sure we need to skip multiple being stmt markers at this point, but I couldn't rule that out easily, so I put the loop in. -- Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/ You must be the change you wish to see in the world. -- Gandhi Be Free! -- http://FSFLA.org/ FSF Latin America board member Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer