diff options
author | Jeff Law <law@gcc.gnu.org> | 2013-11-13 20:18:17 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2013-11-13 20:18:17 -0700 |
commit | 46dfed65567e9c2026d072a8fb331e69ae777b3a (patch) | |
tree | 1544cfbc7012a5ff79694dce9e812f7babff6b8b /gcc/gimple-ssa-isolate-paths.c | |
parent | 41808d153aaa607fc16c243005d52319d6ef8030 (diff) | |
download | gcc-46dfed65567e9c2026d072a8fb331e69ae777b3a.zip gcc-46dfed65567e9c2026d072a8fb331e69ae777b3a.tar.gz gcc-46dfed65567e9c2026d072a8fb331e69ae777b3a.tar.bz2 |
re PR tree-optimization/59102 (ICE on valid code at -Os and above on x86_64-linux-gnu)
PR tree-optimization/59102
* gimple-ssa-isolate-paths.c
(insert_trap_and_remove_trailing_statments): Ensure STMT is a
gimple assignment before looking at gimple_assign_lhs.
PR tree-optimization/59102
* gcc.c-torture/compile/pr59102.c: New test.
From-SVN: r204773
Diffstat (limited to 'gcc/gimple-ssa-isolate-paths.c')
-rw-r--r-- | gcc/gimple-ssa-isolate-paths.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/gimple-ssa-isolate-paths.c b/gcc/gimple-ssa-isolate-paths.c index f9bb249..108b98e 100644 --- a/gcc/gimple-ssa-isolate-paths.c +++ b/gcc/gimple-ssa-isolate-paths.c @@ -74,9 +74,11 @@ insert_trap_and_remove_trailing_statements (gimple_stmt_iterator *si_p, tree op) LHS will be a throw-away SSA_NAME and the RHS is the NULL dereference. If the dereference is a store and we can easily transform the RHS, - then simplify the RHS to enable more DCE. */ + then simplify the RHS to enable more DCE. Note that we require the + statement to be a GIMPLE_ASSIGN which filters out calls on the RHS. */ gimple stmt = gsi_stmt (*si_p); if (walk_stmt_load_store_ops (stmt, (void *)op, NULL, check_loadstore) + && is_gimple_assign (stmt) && INTEGRAL_TYPE_P (TREE_TYPE (gimple_assign_lhs (stmt)))) { /* We just need to turn the RHS into zero converted to the proper |