diff mbox series

fix fdump-lang-raw ICE

Message ID 30d63a07-d5d8-de50-eaf8-d5b6aff03a52@acm.org
State New
Headers show
Series fix fdump-lang-raw ICE | expand

Commit Message

Nathan Sidwell Nov. 1, 2017, 7:24 p.m. UTC
Thomas Koenig noticed -fdump-lang-raw gives an immediate ICE.  I broke 
it with the DECL_ASSEMBLER_NAME changes last month.  Fixed thusly, 
applied as obvious.

nathan

Comments

Jakub Jelinek Nov. 1, 2017, 7:40 p.m. UTC | #1
On Wed, Nov 01, 2017 at 03:24:56PM -0400, Nathan Sidwell wrote:
> Thomas Koenig noticed -fdump-lang-raw gives an immediate ICE.  I broke it
> with the DECL_ASSEMBLER_NAME changes last month.  Fixed thusly, applied as
> obvious.

Shouldn't there be a testcase with that option?

> 2017-11-01  Nathan Sidwell  <nathan@acm.org>
> 
> 	* tree-dump.c (dequeue_and_dump): Use HAS_DECL_ASSEMBLER_NAME_P.
> 
> Index: tree-dump.c
> ===================================================================
> --- tree-dump.c	(revision 254314)
> +++ tree-dump.c	(working copy)
> @@ -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))


	Jakub
Nathan Sidwell Nov. 2, 2017, 2:09 p.m. UTC | #2
On 11/01/2017 03:40 PM, Jakub Jelinek wrote:
> On Wed, Nov 01, 2017 at 03:24:56PM -0400, Nathan Sidwell wrote:
>> Thomas Koenig noticed -fdump-lang-raw gives an immediate ICE.  I broke it
>> with the DECL_ASSEMBLER_NAME changes last month.  Fixed thusly, applied as
>> obvious.
> 
> Shouldn't there be a testcase with that option?

Oh, very well then :)

nathan
diff mbox series

Patch

Index: tree-dump.c
===================================================================
--- tree-dump.c	(revision 254314)
+++ tree-dump.c	(working copy)
@@ -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))