aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>2017-03-21 18:14:42 +0000
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>2017-03-21 18:14:42 +0000
commita72044d1dfc7562397a24361db08886b263a96cc (patch)
tree201986efd5724a888ae2ee2dc26fb71e2e3aa54b
parent3c660c71391d826db3ff3719104eb05608d97af2 (diff)
[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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@246330 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr79908.c12
-rw-r--r--gcc/tree-stdarg.c12
4 files changed, 16 insertions, 20 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 15a24412f4f..4706704ade5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+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.
+
2017-03-21 David Malcolm <dmalcolm@redhat.com>
PR translation/80001
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 854726236e0..aa6ec43ebc0 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2017-03-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/79908
+ * gcc.dg/torture/pr79908.c: Revert addition of new file.
+
2017-03-21 Marek Polacek <polacek@redhat.com>
Martin Sebor <msebor@redhat.com>
diff --git a/gcc/testsuite/gcc.dg/torture/pr79908.c b/gcc/testsuite/gcc.dg/torture/pr79908.c
index e2d6920a4cd..e69de29bb2d 100644
--- a/gcc/testsuite/gcc.dg/torture/pr79908.c
+++ b/gcc/testsuite/gcc.dg/torture/pr79908.c
@@ -1,12 +0,0 @@
-/* { dg-do compile } */
-
-/* Used to fail in the stdarg pass before fix for PR79908. */
-
-typedef __builtin_va_list __gnuc_va_list;
-typedef __gnuc_va_list va_list;
-
-void testva (int n, ...)
-{
- va_list ap;
- _Complex int i = __builtin_va_arg (ap, _Complex int);
-}
diff --git a/gcc/tree-stdarg.c b/gcc/tree-stdarg.c
index 18dd972e3f6..8972822f5b7 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