re PR target/92669 (ICE in pre_and_rev_post_order_compute_fn at gcc/cfganal.c:1034...
authorRichard Biener <rguenther@suse.de>
Tue, 26 Nov 2019 12:03:58 +0000 (12:03 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 26 Nov 2019 12:03:58 +0000 (12:03 +0000)
2019-11-26  Richard Biener  <rguenther@suse.de>

PR middle-end/92669
* cfganal.c (pre_and_rev_post_order_compute_fn): Deal with
NULL pre_order.

From-SVN: r278723

gcc/ChangeLog
gcc/cfganal.c

index a3e757502bdb460b100ee889020f40c427c16ca4..0bfe9f2bc96a3a1e31f03401dc302b7eeee00c62 100644 (file)
@@ -1,3 +1,9 @@
+2019-11-26  Richard Biener  <rguenther@suse.de>
+
+       PR middle-end/92669
+       * cfganal.c (pre_and_rev_post_order_compute_fn): Deal with
+       NULL pre_order.
+
 2019-11-26  Robin Dapp  <rdapp@linux.ibm.com>
 
        * config/s390/linux.h: Add undef for MUSL_DYNAMIC_LINKERxx.
index 1a5c720984e1c1da28f55d1ba191f188a8d21fc4..1d8393d4fd99f5882ada20d51dfa8effb3659f73 100644 (file)
@@ -1030,6 +1030,8 @@ pre_and_rev_post_order_compute_fn (struct function *fn,
     }
 
   /* Clear the temporarily allocated flag.  */
+  if (!rev_post_order)
+    rev_post_order = pre_order;
   for (int i = 0; i < pre_order_num; ++i)
     BASIC_BLOCK_FOR_FN (fn, rev_post_order[i])->flags &= ~visited;