aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-if-conv.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2019-03-05 14:57:12 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2019-03-05 14:57:12 +0000
commitdeeec83de4379e253af4f41eaaf8f45d4db17302 (patch)
treed3f6b70ba0ca9bfd730b88857c96e9c0b4e9de7e /gcc/tree-if-conv.c
parent186ae93c7b641f7fb94359b0bf764205624a0fd1 (diff)
re PR tree-optimization/89594 (ICE: Segmentation fault (in gsi_for_stmt(gimple*)))
2019-03-05 Richard Biener <rguenther@suse.de> PR tree-optimization/89594 * tree-if-conv.c (pass_if_conversion::execute): Handle case where .LOOP_VECTORIZED_FUNCTION was removed. * gcc.dg/pr89594.c: New testcase. From-SVN: r269389
Diffstat (limited to 'gcc/tree-if-conv.c')
-rw-r--r--gcc/tree-if-conv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
index fe3cc0214b4..ec2db007a61 100644
--- a/gcc/tree-if-conv.c
+++ b/gcc/tree-if-conv.c
@@ -3176,6 +3176,8 @@ pass_if_conversion::execute (function *fun)
for (unsigned i = 0; i < preds.length (); ++i)
{
gimple *g = preds[i];
+ if (!gimple_bb (g))
+ continue;
unsigned ifcvt_loop = tree_to_uhwi (gimple_call_arg (g, 0));
if (!get_loop (fun, ifcvt_loop))
{