From a66dfffdb8946993ee06fe1ec9fdc3cbda5d96c6 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Tue, 28 Apr 2015 06:05:14 +0000 Subject: [PATCH] Evaluate side-effects in expand_ifn_va_arg_1 2015-04-28 Tom de Vries PR tree-optimization/65818 * tree-stdarg.c (expand_ifn_va_arg_1): Ensure that side-effects are evaluated. From-SVN: r222509 --- gcc/ChangeLog | 6 ++++++ gcc/tree-stdarg.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1ffe147b0cd..c35f52375a0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-04-28 Tom de Vries + + PR tree-optimization/65818 + * tree-stdarg.c (expand_ifn_va_arg_1): Ensure that side-effects are + evaluated. + 2015-04-27 Trevor Saunders * calls.c (save_fixed_argument_area): Don't check diff --git a/gcc/tree-stdarg.c b/gcc/tree-stdarg.c index 16a9e2cf66f..1356374ba14 100644 --- a/gcc/tree-stdarg.c +++ b/gcc/tree-stdarg.c @@ -1078,6 +1078,8 @@ expand_ifn_va_arg_1 (function *fun) types. */ gimplify_assign (lhs, expr, &pre); } + else + gimplify_expr (&expr, &pre, &post, is_gimple_lvalue, fb_lvalue); pop_gimplify_context (NULL); -- 2.30.2