2017-07-03 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/81192
* tree-ssa-tail-merge.c (same_succ_flush_bb): Handle
BB_SAME_SUCC (bb) == NULL.
* gcc.dg/pr81192.c: New test.
From-SVN: r249893
+2017-07-03 Tom de Vries <tom@codesourcery.com>
+
+ PR tree-optimization/81192
+ * tree-ssa-tail-merge.c (same_succ_flush_bb): Handle
+ BB_SAME_SUCC (bb) == NULL.
+
2017-07-02 Jan Hubicka <hubicka@ucw.cz>
* cfgrtl.c (rtl_verify_edges): Enable checking of profile_probability
+2017-07-03 Tom de Vries <tom@codesourcery.com>
+
+ PR tree-optimization/81192
+ * gcc.dg/pr81192.c: New test.
+
2017-07-02 Thomas Koenig <tkoenig@gcc.gnu.org>
* gfortran/eoshift_3.f90: New test.
--- /dev/null
+/* { dg-options "-Os -fdump-tree-pre-details" } */
+
+unsigned a;
+int b, c;
+
+static int
+fn1 (int p1, int p2)
+{
+ return p1 > 2147483647 - p2 ? p1 : p1 + p2;
+}
+
+void
+fn2 (void)
+{
+ int j;
+ a = 30;
+ for (; a;)
+ for (; c; b = fn1 (j, 1))
+ ;
+}
+
+/* { dg-final { scan-tree-dump-times "(?n)find_duplicates: <bb .*> duplicate of <bb .*>" 1 "pre" } } */
same_succ_flush_bb (basic_block bb)
{
same_succ *same = BB_SAME_SUCC (bb);
+ if (! same)
+ return;
+
BB_SAME_SUCC (bb) = NULL;
if (bitmap_single_bit_set_p (same->bbs))
same_succ_htab->remove_elt_with_hash (same, same->hashval);