diff options
author | Martin Liska <mliska@suse.cz> | 2017-10-11 14:30:03 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2017-10-11 12:30:03 +0000 |
commit | 050dcb6ad8de794e46d5eb377083fb8b9acf642e (patch) | |
tree | ff02bb64dad4b5a848435e48e2b552da9dbf30ac /gcc | |
parent | ed89e76a35f8dc067b747a57a143d2d74516afc4 (diff) | |
download | gcc-050dcb6ad8de794e46d5eb377083fb8b9acf642e.zip gcc-050dcb6ad8de794e46d5eb377083fb8b9acf642e.tar.gz gcc-050dcb6ad8de794e46d5eb377083fb8b9acf642e.tar.bz2 |
Fix use-after-scope error.
2017-10-11 Martin Liska <mliska@suse.cz>
* print-rtl.c (print_insn): Move declaration of idbuf
to same scope as name.
From-SVN: r253639
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/print-rtl.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2eecadb..61ad754 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2017-10-11 Martin Liska <mliska@suse.cz> + * print-rtl.c (print_insn): Move declaration of idbuf + to same scope as name. + +2017-10-11 Martin Liska <mliska@suse.cz> + Revert r253637: PR sanitizer/82484 diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c index 79ec463..28d9986 100644 --- a/gcc/print-rtl.c +++ b/gcc/print-rtl.c @@ -1792,11 +1792,11 @@ print_insn (pretty_printer *pp, const rtx_insn *x, int verbose) case DEBUG_INSN: { const char *name = "?"; + char idbuf[32]; if (DECL_P (INSN_VAR_LOCATION_DECL (x))) { tree id = DECL_NAME (INSN_VAR_LOCATION_DECL (x)); - char idbuf[32]; if (id) name = IDENTIFIER_POINTER (id); else if (TREE_CODE (INSN_VAR_LOCATION_DECL (x)) |