fix latent bootstrap-debug issue (modref, tree-inline, tree jump-threading)

Alexandre Oliva
Sat Aug 28 04:29:53 GMT 2021

On Aug 22, 2021, Jan Hubicka <> wrote:

> OK, thanks for looking into this issue!

Thanks, I've finally installed it in the trunk.

> It seems that analye_stmt indeed does not skip debug stmts.  It is very
> odd we got so far without hitting build difference.

Indeed.  That got me thinking...  The comments state:

     If the statement cannot be analyzed (for any reason), the entire
     function cannot be analyzed by modref.

but the implementation also tests, for every statement:

	      || ((!summary || !summary->useful_p (ecf_flags, false))
		  && (!summary_lto
		      || !summary_lto->useful_p (ecf_flags, false))))

which means that, if the first stmt of a block doesn't add useful
information to the summary, we give up.  Was this really the intent?

Alexandre Oliva, happy hacker      
   Free Software Activist                       GNU Toolchain Engineer
Disinformation flourishes because many people care deeply about injustice
but very few check the facts.  Ask me about <>

More information about the Gcc-patches mailing list