2018-10-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/87693
* tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
the case we do not find the taken edge.
* gcc.dg/torture/pr87693.c: New testcase.
From-SVN: r265413
+2018-10-23 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/87693
+ * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
+ the case we do not find the taken edge.
+
2018-10-22 Paul Koning <ni1d@arrl.net>
* symtab.c (symtab_node::increase_alignment): Correct max
+2018-10-23 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/87693
+ * gcc.dg/torture/pr87693.c: New testcase.
+
2018-10-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/85603
--- /dev/null
+/* { dg-do compile } */
+
+void f (void);
+void g (void);
+void h (int a)
+{
+ void *p, **q;
+ if (a)
+ p = (void *)f;
+ else
+ p = (void *)g;
+ q = (void *)p;
+ if (*q == (void *)0)
+ goto *p;
+L0:
+ return;
+}
else
taken_edge = find_taken_edge (bb, cond);
- if ((taken_edge->flags & EDGE_DFS_BACK) != 0)
+ if (!taken_edge
+ || (taken_edge->flags & EDGE_DFS_BACK) != 0)
return false;
if (bitmap_bit_p (visited, taken_edge->dest->index))