aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-stdarg.c
diff options
context:
space:
mode:
authorTom de Vries <tom@codesourcery.com>2015-06-09 15:46:30 +0000
committerTom de Vries <vries@gcc.gnu.org>2015-06-09 15:46:30 +0000
commit86b76c209b26dba6ebeacd9464cfb4df75ff9e6e (patch)
treec1f1f3ef87b64552b369711daf25581b555fc3c8 /gcc/tree-stdarg.c
parent5af874fb6518ed3e21c1e0f750fac86788fdafa3 (diff)
downloadgcc-86b76c209b26dba6ebeacd9464cfb4df75ff9e6e.zip
gcc-86b76c209b26dba6ebeacd9464cfb4df75ff9e6e.tar.gz
gcc-86b76c209b26dba6ebeacd9464cfb4df75ff9e6e.tar.bz2
Handle location in expand_ifn_va_arg_1
2015-06-09 Tom de Vries <tom@codesourcery.com> * tree-stdarg.c (expand_ifn_va_arg_1): Handle location. * gcc.target/i386/vararg-loc.c: New test. From-SVN: r224288
Diffstat (limited to 'gcc/tree-stdarg.c')
-rw-r--r--gcc/tree-stdarg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-stdarg.c b/gcc/tree-stdarg.c
index 08d10b5..65fe9f9 100644
--- a/gcc/tree-stdarg.c
+++ b/gcc/tree-stdarg.c
@@ -1031,6 +1031,7 @@ expand_ifn_va_arg_1 (function *fun)
bool modified = false;
basic_block bb;
gimple_stmt_iterator i;
+ location_t saved_location;
FOR_EACH_BB_FN (bb, fun)
for (i = gsi_start_bb (bb); !gsi_end_p (i); gsi_next (&i))
@@ -1051,6 +1052,8 @@ expand_ifn_va_arg_1 (function *fun)
ap = build_fold_indirect_ref (ap);
push_gimplify_context (false);
+ saved_location = input_location;
+ input_location = gimple_location (stmt);
/* Make it easier for the backends by protecting the valist argument
from multiple evaluations. */
@@ -1081,6 +1084,7 @@ expand_ifn_va_arg_1 (function *fun)
else
gimplify_expr (&expr, &pre, &post, is_gimple_lvalue, fb_lvalue);
+ input_location = saved_location;
pop_gimplify_context (NULL);
gimple_seq_add_seq (&pre, post);