From: Eric Botcazou Date: Tue, 2 Jun 2015 09:47:02 +0000 (+0000) Subject: gimplify.c (gimplify_modify_expr): Do not create a DECL_DEBUG_EXPR if the target... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b47717225bfbffb2e06c0f2a7e72b458ba40fc17;p=gcc.git gimplify.c (gimplify_modify_expr): Do not create a DECL_DEBUG_EXPR if the target doesn't belong to the current... * gimplify.c (gimplify_modify_expr): Do not create a DECL_DEBUG_EXPR if the target doesn't belong to the current function. From-SVN: r224019 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2dc9702a54e..ac791c4bf5d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-06-02 Eric Botcazou + + * gimplify.c (gimplify_modify_expr): Do not create a DECL_DEBUG_EXPR if + the target doesn't belong to the current function. + 2015-06-02 Marek Polacek PR middle-end/66345 diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 58a60bfd62a..721afd1c86d 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -4707,12 +4707,14 @@ gimplify_modify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, return gimplify_modify_expr_complex_part (expr_p, pre_p, want_value); /* Try to alleviate the effects of the gimplification creating artificial - temporaries (see for example is_gimple_reg_rhs) on the debug info. */ + temporaries (see for example is_gimple_reg_rhs) on the debug info, but + make sure not to create DECL_DEBUG_EXPR links across functions. */ if (!gimplify_ctxp->into_ssa && TREE_CODE (*from_p) == VAR_DECL && DECL_IGNORED_P (*from_p) && DECL_P (*to_p) - && !DECL_IGNORED_P (*to_p)) + && !DECL_IGNORED_P (*to_p) + && decl_function_context (*to_p) == current_function_decl) { if (!DECL_NAME (*from_p) && DECL_NAME (*to_p)) DECL_NAME (*from_p) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9372e605e71..9f93db005cd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-06-02 Eric Botcazou + + * gcc.dg/vect/vec-scal-opt.c: Adjust regexp. + 2015-06-02 Uros Bizjak * gcc.dg/vect/vect-outer-simd-1.c: Remove cleanup-tree-dump directive. diff --git a/gcc/testsuite/gcc.dg/vect/vec-scal-opt.c b/gcc/testsuite/gcc.dg/vect/vec-scal-opt.c index 9a49cc6acf0..64f628adf13 100644 --- a/gcc/testsuite/gcc.dg/vect/vec-scal-opt.c +++ b/gcc/testsuite/gcc.dg/vect/vec-scal-opt.c @@ -19,4 +19,4 @@ int main (int argc, char *argv[]) { return vidx(short, r1, 0); } -/* { dg-final { scan-tree-dump-times ">> k.\[0-9_\]*" 1 "veclower21" } } */ +/* { dg-final { scan-tree-dump-times ">> _\[0-9\]*" 1 "veclower21" } } */