diff options
author | Jakub Jelinek <jakub@redhat.com> | 2014-01-29 11:35:15 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2014-01-29 11:35:15 +0100 |
commit | 42eb8bd17982621ad29ec491053851fd2d0d740e (patch) | |
tree | 183b315c039dbfb46eafcbb1e63c394deca9969e /gcc/read-rtl.c | |
parent | 4a271b7ef041cd9e8fdcb3c1a8139fe704500d78 (diff) | |
download | gcc-42eb8bd17982621ad29ec491053851fd2d0d740e.zip gcc-42eb8bd17982621ad29ec491053851fd2d0d740e.tar.gz gcc-42eb8bd17982621ad29ec491053851fd2d0d740e.tar.bz2 |
re PR other/58712 (issues found by --enable-checking=valgrind)
PR other/58712
* read-rtl.c (read_rtx_code): Clear all of RTX_CODE_SIZE (code).
For REGs set ORIGINAL_REGNO.
From-SVN: r207230
Diffstat (limited to 'gcc/read-rtl.c')
-rw-r--r-- | gcc/read-rtl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/read-rtl.c b/gcc/read-rtl.c index aa7c03b..81ce1a8 100644 --- a/gcc/read-rtl.c +++ b/gcc/read-rtl.c @@ -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': |