From: Richard Biener Date: Mon, 29 Apr 2019 17:53:36 +0000 (+0000) Subject: re PR tree-optimization/90278 (ICE: verify_gimple failed (error: statement marked... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1978e62d47c8808f0535e7d69f3de64186e80e0e;p=gcc.git re PR tree-optimization/90278 (ICE: verify_gimple failed (error: statement marked for throw, but doesn't)) 2019-04-29 Richard Biener PR tree-optimization/90278 * tree-ssa-forwprop.c (pass_forwprop::execute): Transfer/clean EH on comparison simplification. * gcc.dg/torture/pr90278.c: New testcase. From-SVN: r270657 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b4554f60269..d6adeda090d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-04-29 Richard Biener + + PR tree-optimization/90278 + * tree-ssa-forwprop.c (pass_forwprop::execute): Transfer/clean + EH on comparison simplification. + 2019-04-29 Jason Merrill PR c++/82081 - tail call optimization breaks noexcept diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6ceb81cd1b0..4089febb09c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-04-29 Richard Biener + + PR tree-optimization/90278 + * gcc.dg/torture/pr90278.c: New testcase. + 2019-04-27 Jakub Jelinek PR c++/90173 diff --git a/gcc/testsuite/gcc.dg/torture/pr90278.c b/gcc/testsuite/gcc.dg/torture/pr90278.c new file mode 100644 index 00000000000..617246a6d4c --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr90278.c @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-fexceptions -fnon-call-exceptions" } */ + +double +hc (void) +{ + double dp = 0.0; + double ek[1]; + + ek[0] = 1.0 / dp < 0.0; + + return ek[0]; +} diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index eeb6281c652..bbfa1bc6fae 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -2496,6 +2496,8 @@ pass_forwprop::execute (function *fun) { int did_something; did_something = forward_propagate_into_comparison (&gsi); + if (maybe_clean_or_replace_eh_stmt (stmt, gsi_stmt (gsi))) + bitmap_set_bit (to_purge, bb->index); if (did_something == 2) cfg_changed = true; changed = did_something != 0;