public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix -fcompare-debug issue caused by do_niy (PR c++/70675)
@ 2016-04-15 12:21 Jakub Jelinek
  2016-04-15 12:52 ` Richard Biener
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2016-04-15 12:21 UTC (permalink / raw)
  To: Richard Biener, Jeff Law, Bernd Schmidt; +Cc: gcc-patches

Hi!

The testcase in the PR (too large for the testsuite) fails -fcompare-debug,
because do_niy doesn't honor dump flags (TDF_NOUID in this case).

Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for
trunk?

2016-04-15  Jakub Jelinek  <jakub@redhat.com>

	PR c++/70675
	* tree-pretty-print.c (do_niy): Add FLAGS argument, pass it down
	to dump_generic_node.
	(NIY): Pass also flags to do_niy.

--- gcc/tree-pretty-print.c.jj	2016-04-13 22:35:38.000000000 +0200
+++ gcc/tree-pretty-print.c	2016-04-15 12:34:48.148736679 +0200
@@ -40,19 +40,19 @@ static void pretty_print_string (pretty_
 static void newline_and_indent (pretty_printer *, int);
 static void maybe_init_pretty_print (FILE *);
 static void print_struct_decl (pretty_printer *, const_tree, int, int);
-static void do_niy (pretty_printer *, const_tree);
+static void do_niy (pretty_printer *, const_tree, int);
 
 #define INDENT(SPACE) do { \
   int i; for (i = 0; i<SPACE; i++) pp_space (pp); } while (0)
 
-#define NIY do_niy (pp, node)
+#define NIY do_niy (pp, node, flags)
 
 static pretty_printer *tree_pp;
 
 /* Try to print something for an unknown tree code.  */
 
 static void
-do_niy (pretty_printer *pp, const_tree node)
+do_niy (pretty_printer *pp, const_tree node, int flags)
 {
   int i, len;
 
@@ -65,7 +65,7 @@ do_niy (pretty_printer *pp, const_tree n
       for (i = 0; i < len; ++i)
 	{
 	  newline_and_indent (pp, 2);
-	  dump_generic_node (pp, TREE_OPERAND (node, i), 2, 0, false);
+	  dump_generic_node (pp, TREE_OPERAND (node, i), 2, flags, false);
 	}
     }
 

	Jakub

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix -fcompare-debug issue caused by do_niy (PR c++/70675)
  2016-04-15 12:21 [PATCH] Fix -fcompare-debug issue caused by do_niy (PR c++/70675) Jakub Jelinek
@ 2016-04-15 12:52 ` Richard Biener
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2016-04-15 12:52 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Jeff Law, Bernd Schmidt, gcc-patches

On Fri, 15 Apr 2016, Jakub Jelinek wrote:

> Hi!
> 
> The testcase in the PR (too large for the testsuite) fails -fcompare-debug,
> because do_niy doesn't honor dump flags (TDF_NOUID in this case).
> 
> Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for
> trunk?

Ok.

Richard.

> 2016-04-15  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR c++/70675
> 	* tree-pretty-print.c (do_niy): Add FLAGS argument, pass it down
> 	to dump_generic_node.
> 	(NIY): Pass also flags to do_niy.
> 
> --- gcc/tree-pretty-print.c.jj	2016-04-13 22:35:38.000000000 +0200
> +++ gcc/tree-pretty-print.c	2016-04-15 12:34:48.148736679 +0200
> @@ -40,19 +40,19 @@ static void pretty_print_string (pretty_
>  static void newline_and_indent (pretty_printer *, int);
>  static void maybe_init_pretty_print (FILE *);
>  static void print_struct_decl (pretty_printer *, const_tree, int, int);
> -static void do_niy (pretty_printer *, const_tree);
> +static void do_niy (pretty_printer *, const_tree, int);
>  
>  #define INDENT(SPACE) do { \
>    int i; for (i = 0; i<SPACE; i++) pp_space (pp); } while (0)
>  
> -#define NIY do_niy (pp, node)
> +#define NIY do_niy (pp, node, flags)
>  
>  static pretty_printer *tree_pp;
>  
>  /* Try to print something for an unknown tree code.  */
>  
>  static void
> -do_niy (pretty_printer *pp, const_tree node)
> +do_niy (pretty_printer *pp, const_tree node, int flags)
>  {
>    int i, len;
>  
> @@ -65,7 +65,7 @@ do_niy (pretty_printer *pp, const_tree n
>        for (i = 0; i < len; ++i)
>  	{
>  	  newline_and_indent (pp, 2);
> -	  dump_generic_node (pp, TREE_OPERAND (node, i), 2, 0, false);
> +	  dump_generic_node (pp, TREE_OPERAND (node, i), 2, flags, false);
>  	}
>      }
>  
> 
> 	Jakub
> 
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-15 12:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-15 12:21 [PATCH] Fix -fcompare-debug issue caused by do_niy (PR c++/70675) Jakub Jelinek
2016-04-15 12:52 ` Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).