PR middle-end/80422
* cfgcleanup.c (try_crossjump_to_edge): Verify SRC1 and SRC2 have
predecessors after walking up the insn chain.
PR middle-end/80422
* gcc.c-torture/compile/pr80422.c: New test.
From-SVN: r246975
+2017-04-18 Jeff Law <law@redhat.com>
+
+ PR middle-end/80422
+ * cfgcleanup.c (try_crossjump_to_edge): Verify SRC1 and SRC2 have
+ predecessors after walking up the insn chain.
+
2017-04-18 Jakub Jelinek <jakub@redhat.com>
PR debug/80263
if (newpos2 != NULL_RTX)
src2 = BLOCK_FOR_INSN (newpos2);
+ /* Check that SRC1 and SRC2 have preds again. They may have changed
+ above due to the call to flow_find_cross_jump. */
+ if (EDGE_COUNT (src1->preds) == 0 || EDGE_COUNT (src2->preds) == 0)
+ return false;
+
if (dir == dir_backward)
{
#define SWAP(T, X, Y) do { T tmp = (X); (X) = (Y); (Y) = tmp; } while (0)
+2017-04-18 Jeff Law <law@redhat.com>
+
+ PR middle-end/80422
+ * gcc.c-torture/compile/pr80422.c: New test.
+
2017-04-18 Jakub Jelinek <jakub@redhat.com>
PR debug/80263
--- /dev/null
+
+int a, c, f;
+short b, d, e;
+
+int fn1 (int h)
+{
+ return a > 2 || h > a ? h : h << a;
+}
+
+void fn2 ()
+{
+ int j, k;
+ while (1)
+ {
+ k = c && b;
+ f &= e > (fn1 (k) && j);
+ if (!d)
+ break;
+ }
+}
+
+int main ()
+{
+ fn2 ();
+ return 0;
+}