diff options
author | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2017-03-21 18:14:42 +0000 |
---|---|---|
committer | William Schmidt <wschmidt@gcc.gnu.org> | 2017-03-21 18:14:42 +0000 |
commit | 1cefb0511e72b85a59a822040fe19da09ee3a5bb (patch) | |
tree | 201986efd5724a888ae2ee2dc26fb71e2e3aa54b /gcc/tree-stdarg.c | |
parent | efebb49e44278330ed9ed9c60da62c813722bebf (diff) | |
download | gcc-1cefb0511e72b85a59a822040fe19da09ee3a5bb.zip gcc-1cefb0511e72b85a59a822040fe19da09ee3a5bb.tar.gz gcc-1cefb0511e72b85a59a822040fe19da09ee3a5bb.tar.bz2 |
re PR tree-optimization/79908 (ICE in gimplify_expr (gimplify.c:12155) gimplification failed)
[gcc]
2017-03-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/79908
* tree-stdarg.c (expand_ifn_va_arg_1): Revert the following
change: For a VA_ARG whose LHS has been cast away, use
force_gimple_operand to construct the side effects.
[gcc/testsuite]
2017-03-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/79908
* gcc.dg/torture/pr79908.c: Revert addition of new file.
From-SVN: r246330
Diffstat (limited to 'gcc/tree-stdarg.c')
-rw-r--r-- | gcc/tree-stdarg.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/gcc/tree-stdarg.c b/gcc/tree-stdarg.c index 18dd972..8972822 100644 --- a/gcc/tree-stdarg.c +++ b/gcc/tree-stdarg.c @@ -33,7 +33,6 @@ along with GCC; see the file COPYING3. If not see #include "gimple-iterator.h" #include "gimple-walk.h" #include "gimplify.h" -#include "gimplify-me.h" #include "tree-into-ssa.h" #include "tree-cfg.h" #include "tree-stdarg.h" @@ -1059,16 +1058,12 @@ expand_ifn_va_arg_1 (function *fun) gimplify_assign (lhs, expr, &pre); } else - { - gimple_seq tmp_seq; - force_gimple_operand (expr, &tmp_seq, false, NULL_TREE); - gimple_seq_add_seq_without_update (&pre, tmp_seq); - } + gimplify_expr (&expr, &pre, &post, is_gimple_lvalue, fb_lvalue); input_location = saved_location; pop_gimplify_context (NULL); - gimple_seq_add_seq_without_update (&pre, post); + gimple_seq_add_seq (&pre, post); update_modified_stmts (pre); /* Add the sequence after IFN_VA_ARG. This splits the bb right @@ -1077,10 +1072,11 @@ expand_ifn_va_arg_1 (function *fun) gimple_find_sub_bbs (pre, &i); /* Remove the IFN_VA_ARG gimple_call. It's the last stmt in the - bb if we added any stmts. */ + bb. */ unlink_stmt_vdef (stmt); release_ssa_name_fn (fun, gimple_vdef (stmt)); gsi_remove (&i, true); + gcc_assert (gsi_end_p (i)); /* We're walking here into the bbs which contain the expansion of IFN_VA_ARG, and will not contain another IFN_VA_ARG that needs |