]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix use-after-scope error.
authorMartin Liska <mliska@suse.cz>
Wed, 11 Oct 2017 12:30:03 +0000 (14:30 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Wed, 11 Oct 2017 12:30:03 +0000 (12:30 +0000)
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

gcc/ChangeLog
gcc/print-rtl.c

index 2eecadbc981bdfe9471fc92f8efcb87e21f84ed6..61ad754936cde3efee8d1c15b00b49c5b2df58e5 100644 (file)
@@ -1,3 +1,8 @@
+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:
index 79ec463df4513343e7a58c1061629655ec5f4219..28d99862cad2571f08be5f0f03719761788db79f 100644 (file)
@@ -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))