From: Martin Liska Date: Wed, 11 Oct 2017 12:30:03 +0000 (+0200) Subject: Fix use-after-scope error. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=050dcb6ad8de794e46d5eb377083fb8b9acf642e;p=gcc.git Fix use-after-scope error. 2017-10-11 Martin Liska * print-rtl.c (print_insn): Move declaration of idbuf to same scope as name. From-SVN: r253639 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2eecadbc981..61ad754936c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-10-11 Martin Liska + + * print-rtl.c (print_insn): Move declaration of idbuf + to same scope as name. + 2017-10-11 Martin Liska Revert r253637: diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c index 79ec463df45..28d99862cad 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))