re PR other/58712 (issues found by --enable-checking=valgrind)
authorJakub Jelinek <jakub@redhat.com>
Wed, 29 Jan 2014 10:35:15 +0000 (11:35 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 29 Jan 2014 10:35:15 +0000 (11:35 +0100)
PR other/58712
* read-rtl.c (read_rtx_code): Clear all of RTX_CODE_SIZE (code).
For REGs set ORIGINAL_REGNO.

From-SVN: r207230

gcc/ChangeLog
gcc/read-rtl.c

index 1dd3a58e158bdafe8999c6c46cc4601e227746b4..c8a165828ac559eaf04890e9e297e956c4e03b76 100644 (file)
@@ -1,3 +1,9 @@
+2014-01-29  Jakub Jelinek  <jakub@redhat.com>
+
+       PR other/58712
+       * read-rtl.c (read_rtx_code): Clear all of RTX_CODE_SIZE (code).
+       For REGs set ORIGINAL_REGNO.
+
 2014-01-29  Bingfeng Mei  <bmei@broadcom.com>
 
        * doc/md.texi: Mention that a target shouldn't implement 
index aa7c03b2060d868fa291429cde0e64f35b484fa8..81ce1a864aef757d2ca1110200947bb981262d3f 100644 (file)
@@ -1131,6 +1131,7 @@ read_rtx_code (const char *code_name)
   /* If we end up with an insn expression then we free this space below.  */
   return_rtx = rtx_alloc (code);
   format_ptr = GET_RTX_FORMAT (code);
+  memset (return_rtx, 0, RTX_CODE_SIZE (code));
   PUT_CODE (return_rtx, code);
 
   if (iterator)
@@ -1154,6 +1155,8 @@ read_rtx_code (const char *code_name)
        /* 0 means a field for internal use only.
           Don't expect it to be present in the input.  */
       case '0':
+       if (code == REG)
+         ORIGINAL_REGNO (return_rtx) = REGNO (return_rtx);
        break;
 
       case 'e':