re PR debug/48401 (ICE: RTL check: access of elt 4 of 'var_location' with last elt...
authorJakub Jelinek <jakub@redhat.com>
Mon, 4 Apr 2011 07:02:50 +0000 (09:02 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 4 Apr 2011 07:02:50 +0000 (09:02 +0200)
PR debug/48404
* cfgexpand.c (expand_gimple_basic_block): Avoid useless assignment.
Use PAT_VAR_LOCATION_LOC instead of INSN_VAR_LOCATION_LOC.

From-SVN: r171924

gcc/ChangeLog
gcc/cfgexpand.c

index a0b099fd6bc3a37ffd33dffe34edfc6006b6053c..b33bde634214aaf7c01a1aac8830eb1ca60ef2e7 100644 (file)
@@ -1,3 +1,9 @@
+2011-04-04  Jakub Jelinek  <jakub@redhat.com>
+
+       PR debug/48404
+       * cfgexpand.c (expand_gimple_basic_block): Avoid useless assignment.
+       Use PAT_VAR_LOCATION_LOC instead of INSN_VAR_LOCATION_LOC.
+
 2011-04-03  Nathan Froyd  <froydnj@codesourcery.com>
 
        * tree.h (struct tree_const_decl): Inherit from tree_decl_common.
index cdd7d0356155e47be9adaeac21d7a8ab4b7f2494..81a23d4c8abff6b0deb6ac129e2d74a6fd808d56 100644 (file)
@@ -3517,7 +3517,7 @@ expand_gimple_basic_block (basic_block bb)
                    val = gen_rtx_VAR_LOCATION
                        (mode, vexpr, (rtx)value, VAR_INIT_STATUS_INITIALIZED);
 
-                   val = emit_debug_insn (val);
+                   emit_debug_insn (val);
 
                    FOR_EACH_IMM_USE_STMT (debugstmt, imm_iter, op)
                      {
@@ -3582,9 +3582,9 @@ expand_gimple_basic_block (basic_block bb)
                {
                  /* We can't dump the insn with a TREE where an RTX
                     is expected.  */
-                 INSN_VAR_LOCATION_LOC (val) = const0_rtx;
+                 PAT_VAR_LOCATION_LOC (val) = const0_rtx;
                  maybe_dump_rtl_for_gimple_stmt (stmt, last);
-                 INSN_VAR_LOCATION_LOC (val) = (rtx)value;
+                 PAT_VAR_LOCATION_LOC (val) = (rtx)value;
                }
 
              /* In order not to generate too many debug temporaries,