-
- Downloads
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.
Showing
- gcc/ipa-cp.c 3 additions, 2 deletionsgcc/ipa-cp.c
- gcc/testsuite/gcc.dg/lto/pr96291.h 4 additions, 0 deletionsgcc/testsuite/gcc.dg/lto/pr96291.h
- gcc/testsuite/gcc.dg/lto/pr96291_0.c 11 additions, 0 deletionsgcc/testsuite/gcc.dg/lto/pr96291_0.c
- gcc/testsuite/gcc.dg/lto/pr96291_1.c 3 additions, 0 deletionsgcc/testsuite/gcc.dg/lto/pr96291_1.c
- gcc/testsuite/gcc.dg/lto/pr96291_2.c 7 additions, 0 deletionsgcc/testsuite/gcc.dg/lto/pr96291_2.c
Loading
Please register or sign in to comment