re PR tree-optimization/90278 (ICE: verify_gimple failed (error: statement marked...
authorRichard Biener <rguenther@suse.de>
Mon, 29 Apr 2019 17:53:36 +0000 (17:53 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 29 Apr 2019 17:53:36 +0000 (17:53 +0000)
2019-04-29  Richard Biener  <rguenther@suse.de>

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

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr90278.c [new file with mode: 0644]
gcc/tree-ssa-forwprop.c

index b4554f60269d52250367421c43a26f71bb047c1d..d6adeda090d2a12414d1d2c4adbe5299e7d8627b 100644 (file)
@@ -1,3 +1,9 @@
+2019-04-29  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/90278
+       * tree-ssa-forwprop.c (pass_forwprop::execute): Transfer/clean
+       EH on comparison simplification.
+
 2019-04-29  Jason Merrill  <jason@redhat.com>
 
        PR c++/82081 - tail call optimization breaks noexcept
index 6ceb81cd1b0da9b74ffaf20aef3a607f4ebf684a..4089febb09ce9657992e8b50f037e4590eb43584 100644 (file)
@@ -1,3 +1,8 @@
+2019-04-29  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/90278
+       * gcc.dg/torture/pr90278.c: New testcase.
+
 2019-04-27  Jakub Jelinek  <jakub@redhat.com>
 
        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 (file)
index 0000000..617246a
--- /dev/null
@@ -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];
+}
index eeb6281c65273f12d7b69b642a7f256668ee8570..bbfa1bc6fae1f62c5bd45f03187e05f26e3b5d8e 100644 (file)
@@ -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;