2019-03-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/89710
* tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Use
safe_dyn_cast.
* gcc.dg/torture/pr89710.c: New testcase.
From-SVN: r269679
+2019-03-14 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/89710
+ * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Use
+ safe_dyn_cast.
+
2019-03-14 Martin Liska <mliska@suse.cz>
* coverage.c (coverage_begin_function): Stream also
+2019-03-14 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/89710
+ * gcc.dg/torture/pr89710.c: New testcase.
+
2019-03-14 Richard Biener <rguenther@suse.de>
PR middle-end/89698
--- /dev/null
+/* { dg-do compile } */
+
+void
+gm (int *);
+
+__attribute__ ((returns_twice)) void
+jg (void)
+{
+}
+
+void
+eb (void)
+{
+ int r6 = 0;
+
+ if (r6 != 0)
+ gm (&r6);
+}
+
+void
+gm (int *r6)
+{
+ jg ();
+
+ for (;;)
+ {
+ eb ();
+ *r6 = 0;
+ }
+}
return false;
}
- gcond *last = dyn_cast <gcond *> (last_stmt (header));
+ gcond *last = safe_dyn_cast <gcond *> (last_stmt (header));
if (!last)
{
if (dump_file && (dump_flags & TDF_DETAILS))