Commit df6d3ac9 by Richard Biener Committed by Richard Biener

re PR tree-optimization/89710 (ICE in dyn_cast<gcond*, gimple>(gimple*) /…

re PR tree-optimization/89710 (ICE in dyn_cast<gcond*, gimple>(gimple*) / should_duplicate_loop_header_p)

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
parent b8154717
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
* g++.dg/torture/pr89698.C: New testcase.
......
/* { 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;
}
}
......@@ -100,7 +100,7 @@ should_duplicate_loop_header_p (basic_block header, struct loop *loop,
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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment