re PR rtl-optimization/92882 (ICE in regstat_bb_compute_calls_crossed, at regstat...
authorJakub Jelinek <jakub@redhat.com>
Tue, 10 Dec 2019 21:05:59 +0000 (22:05 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 10 Dec 2019 21:05:59 +0000 (22:05 +0100)
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

gcc/ChangeLog
gcc/regstat.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr92882.f [new file with mode: 0644]

index 71609c9121f07eed74139e3f63aaf1e1d3e54f6a..f1276b4a7bb47f6f0e156fc0fcaf7c9dd296180e 100644 (file)
@@ -1,5 +1,10 @@
 2019-12-10  Jakub Jelinek  <jakub@redhat.com>
 
+       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.
index bf95ecc1273062eb8b6e575a1810cd99f33d9c75..48872c77775296cb76b09c2d0a14f1c115342ab0 100644 (file)
@@ -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))
        {
index 4f4a2a55e9b217f44f622841c430fa21468679e3..2c7d90a82f898fe30e8299f68640039c7a38e1b1 100644 (file)
@@ -1,5 +1,8 @@
 2019-12-10  Jakub Jelinek  <jakub@redhat.com>
 
+       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 (file)
index 0000000..476154b
--- /dev/null
@@ -0,0 +1,4 @@
+C PR rtl-optimization/92882
+C { dg-do compile }
+C { dg-options "-O2 -fno-inline" }
+      INCLUDE 'secnds.f'