From c6108cbd510e2d60cf53d1eb8a5bf24a12fcf441 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Wed, 1 Nov 2017 19:26:46 +0000 Subject: [PATCH] [PATCH] fix fdump-lang-raw ICE 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 | 4 ++++ gcc/tree-dump.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8ec5295c8a1..5e808e9797a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2017-11-01 Nathan Sidwell + + * tree-dump.c (dequeue_and_dump): Use HAS_DECL_ASSEMBLER_NAME_P. + 2017-11-01 Palmer Dabbelt * doc/invoke.texi (RISC-V Options): Explicitly name the medlow diff --git a/gcc/tree-dump.c b/gcc/tree-dump.c index ac0c7b868a1..d691278bbb2 100644 --- a/gcc/tree-dump.c +++ b/gcc/tree-dump.c @@ -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)) -- 2.30.2