Skip to content
Snippets Groups Projects
Commit cbf10ac5 authored by Sergei Trofimovich's avatar Sergei Trofimovich
Browse files

ipa/96291: don't crash on unoptimized lto functions

In PR ipa/96291 the test contained an SCC with one
unoptimized function. This tricked ipa-cp into NULL dereference.

has_undead_caller_from_outside_scc_p() did not take into account
that unoptimized funtions don't have IPA summary analysis. And
dereferenced NULL pointer causing an ICE.

gcc/
	PR ipa/96291
	* ipa-cp.c (has_undead_caller_from_outside_scc_p): Consider
	unoptimized callers as undead.

gcc/testsuite/
	PR ipa/96291
	* gcc.dg/lto/pr96291_0.c: New testcase.
	* gcc.dg/lto/pr96291_1.c: Support file.
	* gcc.dg/lto/pr96291_2.c: Likewise.
	* gcc.dg/lto/pr96291.h: Likewise.
parent 33bf56dd
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment