OSDN Git Service

PR lto/46879
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 13 Dec 2010 17:37:20 +0000 (17:37 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 13 Dec 2010 17:37:20 +0000 (17:37 +0000)
* lto-streamer-out.c (output_gimple_stmt): Never replace first
GIMPLE_DEBUG argument with MEM_REF.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167755 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/lto-streamer-out.c

index 9a539a9..f11527f 100644 (file)
@@ -1,5 +1,9 @@
 2010-12-13  Jakub Jelinek  <jakub@redhat.com>
 
+       PR lto/46879
+       * lto-streamer-out.c (output_gimple_stmt): Never replace first
+       GIMPLE_DEBUG argument with MEM_REF.
+
        PR debug/46867
        * var-tracking.c (emitted_notes, string_pointer_flags): Removed.
        (emit_note_insn_var_location): Remove ENABLE_RTL_CHECKING verification.
index 2bf83be..781b257 100644 (file)
@@ -1759,8 +1759,9 @@ output_gimple_stmt (struct output_block *ob, gimple stmt)
          tree op = gimple_op (stmt, i);
          /* Wrap all uses of non-automatic variables inside MEM_REFs
             so that we do not have to deal with type mismatches on
-            merged symbols during IL read in.  */
-         if (op)
+            merged symbols during IL read in.  The first operand
+            of GIMPLE_DEBUG must be a decl, not MEM_REF, though.  */
+         if (op && (i || !is_gimple_debug (stmt)))
            {
              tree *basep = &op;
              while (handled_component_p (*basep))