On Mon, 27 Jul 2020 14:41:14 +0200 Martin Jambor <mjam...@suse.cz> wrote:
> Hi, > > On Mon, Jul 27 2020, Richard Biener via Gcc-patches wrote: > > On Sat, Jul 25, 2020 at 8:35 PM Sergei Trofimovich via Gcc-patches > > <gcc-patches@gcc.gnu.org> wrote: > >> > >> From: Sergei Trofimovich <siarh...@google.com> > >> > >> 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. > > > > Can you create a single-unit testcase with a SCC with one function > > having the no_ipa attribute? > > This bug is LTO specific because otherwise a summary (although marked as > quite useless) will be left over from the summary building stage. Yeah, I was not able to shrink the example even down to 2 files. > So Sergei, if you can afford to spend an extra while providing a > testcase, you'll need to add three files into gcc/testsuite/gcc.dg/lto, > with either the second or third (numbered _1 or _2)) having Sounds good! I tried is as: https://gcc.gnu.org/pipermail/gcc-patches/2020-July/550817.html > /* { dg-lto-options { { -flto -O0 } } } */ I used "/* { dg-options {-O0} } */" looking at pr88077_1.c which uses "/* { dg-options {-fcommon} } */". But only now looked closer at your suggestion. Should I resend with "/* { dg-lto-options { { -flto -O0 } } } */"? I need a bit or help to understand the difference :) -- Sergei