From: Jakub Jelinek Date: Tue, 10 Dec 2019 21:05:59 +0000 (+0100) Subject: re PR rtl-optimization/92882 (ICE in regstat_bb_compute_calls_crossed, at regstat... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5e72bcc1dd04034341c93f1cd0b0ac8fdf43e966;p=gcc.git re PR rtl-optimization/92882 (ICE in regstat_bb_compute_calls_crossed, at regstat.c:327 since r279124) PR rtl-optimization/92882 * regstat.c (regstat_bb_compute_calls_crossed): Don't check INSN_UID against DF_INSN_SIZE or use DF_INSN_INFO_GET unless NONDEBUG_INSN_P. * gfortran.dg/pr92882.f: New test. From-SVN: r279196 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 71609c9121f..f1276b4a7bb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2019-12-10 Jakub Jelinek + PR rtl-optimization/92882 + * regstat.c (regstat_bb_compute_calls_crossed): Don't check + INSN_UID against DF_INSN_SIZE or use DF_INSN_INFO_GET unless + NONDEBUG_INSN_P. + PR ipa/92883 * ipa-cp.c (propagate_vr_across_jump_function): Pass jvr rather than *jfunc->m_vr to intersect. Formatting fix. diff --git a/gcc/regstat.c b/gcc/regstat.c index bf95ecc1273..48872c77775 100644 --- a/gcc/regstat.c +++ b/gcc/regstat.c @@ -324,13 +324,13 @@ regstat_bb_compute_calls_crossed (unsigned int bb_index, bitmap live) FOR_BB_INSNS_REVERSE (bb, insn) { + if (!NONDEBUG_INSN_P (insn)) + continue; + gcc_assert (INSN_UID (insn) < (int) DF_INSN_SIZE ()); struct df_insn_info *insn_info = DF_INSN_INFO_GET (insn); unsigned int regno; - if (!NONDEBUG_INSN_P (insn)) - continue; - /* Process the defs. */ if (CALL_P (insn)) { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4f4a2a55e9b..2c7d90a82f8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2019-12-10 Jakub Jelinek + PR rtl-optimization/92882 + * gfortran.dg/pr92882.f: New test. + PR ipa/92883 * gcc.dg/ipa/pr92883.c: New test. diff --git a/gcc/testsuite/gfortran.dg/pr92882.f b/gcc/testsuite/gfortran.dg/pr92882.f new file mode 100644 index 00000000000..476154b6888 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr92882.f @@ -0,0 +1,4 @@ +C PR rtl-optimization/92882 +C { dg-do compile } +C { dg-options "-O2 -fno-inline" } + INCLUDE 'secnds.f'