From 4536610dd4f7257b8b1736afdceae66977176466 Mon Sep 17 00:00:00 2001 From: Kugan Vivekanandarajah Date: Wed, 27 Jul 2016 22:45:46 +0000 Subject: [PATCH] re PR tree-optimization/71994 (ICE: verify_gimple failed) gcc/testsuite/ChangeLog: 2016-07-28 Kugan Vivekanandarajah PR middle-end/71994 * gcc.dg/torture/pr71994.c: New test. gcc/ChangeLog: 2016-07-28 Kugan Vivekanandarajah PR middle-end/71994 * tree-ssa-reassoc.c (maybe_optimize_range_tests): Check tcc_comparison before calling get_ops. From-SVN: r238802 --- gcc/ChangeLog | 6 ++++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/tree-ssa-reassoc.c | 4 ++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3289d0affa3..d2e4ecb0eab 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-07-28 Kugan Vivekanandarajah + + PR middle-end/71994 + * tree-ssa-reassoc.c (maybe_optimize_range_tests): Check tcc_comparison + before calling get_ops. + 2016-07-27 Bernd Edlinger * defaults.h (LOG2_BITS_PER_UNIT): Move from here... diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3f7e5a7dd26..204ec1c3054 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-07-28 Kugan Vivekanandarajah + + PR middle-end/71994 + * gcc.dg/torture/pr71994.c: New test. + 2016-07-27 Prathamesh Kulkarni PR middle-end/71078 diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c index 7c7136e710f..7fd7550ab33 100644 --- a/gcc/tree-ssa-reassoc.c +++ b/gcc/tree-ssa-reassoc.c @@ -3514,10 +3514,10 @@ maybe_optimize_range_tests (gimple *stmt) push into ops the individual range test arguments of the bitwise or resp. and, recursively. */ if (TREE_CODE (rhs) == SSA_NAME - && !get_ops (rhs, code, &ops, - loop_containing_stmt (stmt)) && (TREE_CODE_CLASS (gimple_assign_rhs_code (stmt)) != tcc_comparison) + && !get_ops (rhs, code, &ops, + loop_containing_stmt (stmt)) && has_single_use (rhs)) { /* Otherwise, push the _234 range test itself. */ -- 2.30.2