[PATCH] fix fdump-lang-raw ICE
authorNathan Sidwell <nathan@acm.org>
Wed, 1 Nov 2017 19:26:46 +0000 (19:26 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Wed, 1 Nov 2017 19:26:46 +0000 (19:26 +0000)
https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00037.html
* tree-dump.c (dequeue_and_dump): Use HAS_DECL_ASSEMBLER_NAME_P.

From-SVN: r254323

gcc/ChangeLog
gcc/tree-dump.c

index 8ec5295c8a17d098e84cbc03ffb32ca82b0917da..5e808e9797a8a8c2fdc9bd392823ab87b84afc0c 100644 (file)
@@ -1,3 +1,7 @@
+2017-11-01  Nathan Sidwell  <nathan@acm.org>
+
+       * tree-dump.c (dequeue_and_dump): Use HAS_DECL_ASSEMBLER_NAME_P.
+
 2017-11-01  Palmer Dabbelt  <palmer@dabbelt.com>
 
        * doc/invoke.texi (RISC-V Options): Explicitly name the medlow
index ac0c7b868a132c041fc0a22694834e7cbbc08633..d691278bbb2c1f3d58eb4b5f449cc5bd7ae3b2e6 100644 (file)
@@ -337,7 +337,8 @@ dequeue_and_dump (dump_info_p di)
       /* All declarations have names.  */
       if (DECL_NAME (t))
        dump_child ("name", DECL_NAME (t));
-      if (DECL_ASSEMBLER_NAME_SET_P (t)
+      if (HAS_DECL_ASSEMBLER_NAME_P (t)
+         && DECL_ASSEMBLER_NAME_SET_P (t)
          && DECL_ASSEMBLER_NAME (t) != DECL_NAME (t))
        dump_child ("mngl", DECL_ASSEMBLER_NAME (t));
       if (DECL_ABSTRACT_ORIGIN (t))