aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2013-01-28 15:05:40 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2013-01-28 15:05:40 +0100
commitaa710d25957e36a089a03929d6f82fa88371e32d (patch)
tree1de27d3eb202e56e456408ca2b0032563b0e331d /gcc/gimplify.c
parent25350308a5373048daf6718da30eac968f59213a (diff)
downloadgcc-aa710d25957e36a089a03929d6f82fa88371e32d.zip
gcc-aa710d25957e36a089a03929d6f82fa88371e32d.tar.gz
gcc-aa710d25957e36a089a03929d6f82fa88371e32d.tar.bz2
re PR tree-optimization/56094 (Invalid line number info generated with tree-level ivopts)
PR tree-optimization/56094 * gimplify.c (force_gimple_operand_1): Temporarily set input_location to UNKNOWN_LOCATION while gimplifying expr. * gcc.dg/pr56094.c: New test. From-SVN: r195504
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index e1906e2..e7119283 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -8600,6 +8600,7 @@ force_gimple_operand_1 (tree expr, gimple_seq *stmts,
{
enum gimplify_status ret;
struct gimplify_ctx gctx;
+ location_t saved_location;
*stmts = NULL;
@@ -8613,6 +8614,8 @@ force_gimple_operand_1 (tree expr, gimple_seq *stmts,
push_gimplify_context (&gctx);
gimplify_ctxp->into_ssa = gimple_in_ssa_p (cfun);
gimplify_ctxp->allow_rhs_cond_expr = true;
+ saved_location = input_location;
+ input_location = UNKNOWN_LOCATION;
if (var)
{
@@ -8634,6 +8637,7 @@ force_gimple_operand_1 (tree expr, gimple_seq *stmts,
gcc_assert (ret != GS_ERROR);
}
+ input_location = saved_location;
pop_gimplify_context (NULL);
return expr;