[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 8ec5295..5e808e9 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 ac0c7b8..d691278 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))