re PR debug/54826 (gdb test case failure (bs15503) due to gaps in lexical block)
authorDehao Chen <dehao@google.com>
Sat, 6 Oct 2012 16:19:34 +0000 (16:19 +0000)
committerDehao Chen <dehao@gcc.gnu.org>
Sat, 6 Oct 2012 16:19:34 +0000 (16:19 +0000)
2012-10-05  Dehao Chen  <dehao@google.com>

PR debug/54826
* gimple-low.c (lower_stmt): Set the block for call args.

From-SVN: r192165

gcc/ChangeLog
gcc/gimple-low.c

index 649f45eebb93e1be071656a39e957fafd1a8a79c..4eca5bf49e3b922ca76b122b2d416a2c79ee7b6b 100644 (file)
@@ -1,3 +1,8 @@
+2012-10-06  Dehao Chen  <dehao@google.com>
+
+       PR debug/54826
+       * gimple-low.c (lower_stmt): Set the block for call args.
+
 2012-10-06  Jan Hubicka  <jh@suse.cz>
 
        * doc/invoke.texi (-fprofile-report): Document.
index 424ad550d78a76825f4726b667fcf1e8763c3b35..677e41f2673a8529fa1ee447a7811ed49bf5be9a 100644 (file)
@@ -425,6 +425,14 @@ lower_stmt (gimple_stmt_iterator *gsi, struct lower_data *data)
     case GIMPLE_CALL:
       {
        tree decl = gimple_call_fndecl (stmt);
+       unsigned i;
+
+       for (i = 0; i < gimple_call_num_args (stmt); i++)
+         {
+           tree arg = gimple_call_arg (stmt, i);
+           if (EXPR_P (arg))
+             TREE_SET_BLOCK (arg, data->block);
+         }
 
        if (decl
            && DECL_BUILT_IN_CLASS (decl) == BUILT_IN_NORMAL