public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/31847]  New: Printing to dump file broken
@ 2007-05-06 21:30 dberlin at gcc dot gnu dot org
  2007-05-06 21:32 ` [Bug tree-optimization/31847] [4.3 Regression] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: dberlin at gcc dot gnu dot org @ 2007-05-06 21:30 UTC (permalink / raw)
  To: gcc-bugs

the following patch:

+2007-04-24  Simon Martin  <simartin@users.sourceforge.net>
+
+       PR diagnostic/25923
+       * tree-pass.h (TDF_DIAGNOSTIC): New dump control to specify that a
+       diagnostic message is being built.
+       * tree-pretty-print.c (dump_generic_node): Only write the formatted
text
+       into BUFFER's stream if we are not building a diagnostic message.
+       * toplev.c (default_tree_printer): Pass TDF_DIAGNOSTIC to
+       dump_generic_node.
+       * Makefile.in (toplev.o): Depend on tree-pass.h.
+


Broke dump file printing.

In particular, it looks like we don't output at the right point.

The PRE dump now looks like this:
Created value  for
Created value  for  vuses: ()
Created value  for
Created value  for  vuses: ()
Created value  for  vuses: ()
Created value  for
Created value  for  vuses: ()
Created value  for
exp_gen[0] := {  }
tmp_gen[0] := {
VH.8scD.1643_1(D)VH.9*VH.8SMT.4D.1671_5(D)VH.10txq_descD.1640VH.11VH.9.VH.10SMT.4D.1671_5(D)VH.12VH.11[0]SMT.4D.1671_5(D)VH.13ed_cmdstsD.1638VH.14VH.12.VH.13SMT.4D.1671_5(D)VH.15VH.14
& 2147483647sc_1(D) (VH.8)  }


Note that the calls to print_generic_expr are getting output *well*
after where they should be.

With this patch reverted, it looks like:
Created value VH.8 for scD.1643_1(D)
Created value VH.9 for *VH.8 vuses: (SMT.4D.1671_5(D))
Created value VH.10 for txq_descD.1640
Created value VH.11 for VH.9.VH.10 vuses: (SMT.4D.1671_5(D))
Created value VH.12 for VH.11[0] vuses: (SMT.4D.1671_5(D))
Created value VH.13 for ed_cmdstsD.1638
Created value VH.14 for VH.12.VH.13 vuses: (SMT.4D.1671_5(D))
Created value VH.15 for VH.14 & 2147483647
exp_gen[0] := {  }
tmp_gen[0] := { sc_1(D) (VH.8)  }avail_out[0] := { sc_1(D) (VH.8)
}exp_gen[2] := { sc_1(D) (VH.8) , *VH.8 (VH.9) , txq_desc (VH.10) ,
VH.9.VH.10 (VH.11) , VH.11[0] (VH.12) , ed_cmdsts (VH.13) ,
VH.12.VH.13 (VH.14) , VH.14 & 2147483647 (VH.15)  }


-- 
           Summary: Printing to dump file broken
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dberlin at gcc dot gnu dot org
 GCC build triplet: i686-darwin
  GCC host triplet: i686-darwin
GCC target triplet: i686-darwin


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31847


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

* [Bug tree-optimization/31847] [4.3 Regression] Printing to dump file broken
  2007-05-06 21:30 [Bug tree-optimization/31847] New: Printing to dump file broken dberlin at gcc dot gnu dot org
@ 2007-05-06 21:32 ` pinskia at gcc dot gnu dot org
  2007-05-07  6:23 ` simartin at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-06 21:32 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Printing to dump file broken|[4.3 Regression] Printing to
                   |                            |dump file broken
   Target Milestone|---                         |4.3.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31847


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

* [Bug tree-optimization/31847] [4.3 Regression] Printing to dump file broken
  2007-05-06 21:30 [Bug tree-optimization/31847] New: Printing to dump file broken dberlin at gcc dot gnu dot org
  2007-05-06 21:32 ` [Bug tree-optimization/31847] [4.3 Regression] " pinskia at gcc dot gnu dot org
@ 2007-05-07  6:23 ` simartin at gcc dot gnu dot org
  2007-05-07 13:02 ` dberlin at dberlin dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: simartin at gcc dot gnu dot org @ 2007-05-07  6:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from simartin at gcc dot gnu dot org  2007-05-07 07:23 -------
Hello.

I've had a look at the code, and the PRE dump apparently directly calls
print_generic_expr (not via default_tree_printer) with TDF_DIAGNOSTIC in the
dump flags. I'm not sure how those flags are setup...

I think there is a problem in tree-dump.c (TDF_DIAGNOSTIC will be erroneously
passed in some dump flags), fixed by this patch:

Index: tree-dump.c
===================================================================
--- tree-dump.c (revision 124477)
+++ tree-dump.c (working copy)
@@ -803,7 +803,7 @@
   {"stmtaddr", TDF_STMTADDR},
   {"memsyms", TDF_MEMSYMS},
   {"all", ~(TDF_RAW | TDF_SLIM | TDF_LINENO | TDF_TREE | TDF_RTL | TDF_IPA 
-           | TDF_STMTADDR | TDF_GRAPH)},
+           | TDF_STMTADDR | TDF_GRAPH | TDF_DIAGNOSTIC)},
   {NULL, 0}
 };


However, I'm not sure this will fix this issue, and I have not been able to
test it. Would you mind trying it? Thanks.

I'll look more closely on this issue this evening when I'm back from work.

Sorry for this breakage.
Simon


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31847


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

* [Bug tree-optimization/31847] [4.3 Regression] Printing to dump file broken
  2007-05-06 21:30 [Bug tree-optimization/31847] New: Printing to dump file broken dberlin at gcc dot gnu dot org
  2007-05-06 21:32 ` [Bug tree-optimization/31847] [4.3 Regression] " pinskia at gcc dot gnu dot org
  2007-05-07  6:23 ` simartin at gcc dot gnu dot org
@ 2007-05-07 13:02 ` dberlin at dberlin dot org
  2007-05-08 15:34 ` simartin at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dberlin at dberlin dot org @ 2007-05-07 13:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from dberlin at gcc dot gnu dot org  2007-05-07 14:02 -------
Subject: Re:  [4.3 Regression] Printing to dump file broken

On 7 May 2007 06:23:40 -0000, simartin at gcc dot gnu dot org
<gcc-bugzilla@gcc.gnu.org> wrote:
>
>
> ------- Comment #1 from simartin at gcc dot gnu dot org  2007-05-07 07:23 -------
> Hello.
>
> I've had a look at the code, and the PRE dump apparently directly calls
> print_generic_expr (not via default_tree_printer)

Every pass calls print_generic_expr to print expressions to dump files

> with TDF_DIAGNOSTIC in the
> dump flags. I'm not sure how those flags are setup...

PRE doesn't change the dump flags on its own, it just uses the global
"dump_flags" like everyone else :)

>

> I think there is a problem in tree-dump.c (TDF_DIAGNOSTIC will be erroneously
> passed in some dump flags), fixed by this patch:

>
> Index: tree-dump.c
> ===================================================================
> --- tree-dump.c (revision 124477)
> +++ tree-dump.c (working copy)
> @@ -803,7 +803,7 @@
>    {"stmtaddr", TDF_STMTADDR},
>    {"memsyms", TDF_MEMSYMS},
>    {"all", ~(TDF_RAW | TDF_SLIM | TDF_LINENO | TDF_TREE | TDF_RTL | TDF_IPA
> -           | TDF_STMTADDR | TDF_GRAPH)},
> +           | TDF_STMTADDR | TDF_GRAPH | TDF_DIAGNOSTIC)},
>    {NULL, 0}
>  };
>
>
> However, I'm not sure this will fix this issue, and I have not been able to
> test it. Would you mind trying it? Thanks.

This seems to work.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31847


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

* [Bug tree-optimization/31847] [4.3 Regression] Printing to dump file broken
  2007-05-06 21:30 [Bug tree-optimization/31847] New: Printing to dump file broken dberlin at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2007-05-07 13:02 ` dberlin at dberlin dot org
@ 2007-05-08 15:34 ` simartin at gcc dot gnu dot org
  2007-05-08 15:47 ` simartin at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: simartin at gcc dot gnu dot org @ 2007-05-08 15:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from simartin at gcc dot gnu dot org  2007-05-08 16:34 -------
Subject: Bug 31847

Author: simartin
Date: Tue May  8 15:33:56 2007
New Revision: 124551

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124551
Log:
2007-05-08  Simon Martin  <simartin@users.sourceforge.net>

        PR 31847
        * tree-dump.c (dump_options): Don't use TDF_DIAGNOSTIC in "*-all" tree
        dumps.

Added:
    trunk/gcc/testsuite/gcc.dg/pr31847.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-dump.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31847


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

* [Bug tree-optimization/31847] [4.3 Regression] Printing to dump file broken
  2007-05-06 21:30 [Bug tree-optimization/31847] New: Printing to dump file broken dberlin at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2007-05-08 15:34 ` simartin at gcc dot gnu dot org
@ 2007-05-08 15:47 ` simartin at gcc dot gnu dot org
  2007-05-10  7:12 ` patchapp at dberlin dot org
  2007-05-12 17:22 ` rguenth at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: simartin at gcc dot gnu dot org @ 2007-05-08 15:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from simartin at gcc dot gnu dot org  2007-05-08 16:47 -------
This should be fixed (see
http://gcc.gnu.org/ml/gcc-patches/2007-05/msg00527.html for an explanation of
the patch).


-- 

simartin at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |simartin at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-05-08 16:47:37
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31847


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

* [Bug tree-optimization/31847] [4.3 Regression] Printing to dump file broken
  2007-05-06 21:30 [Bug tree-optimization/31847] New: Printing to dump file broken dberlin at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2007-05-08 15:47 ` simartin at gcc dot gnu dot org
@ 2007-05-10  7:12 ` patchapp at dberlin dot org
  2007-05-12 17:22 ` rguenth at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: patchapp at dberlin dot org @ 2007-05-10  7:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from patchapp at dberlin dot org  2007-05-10 08:12 -------
Subject: Bug number PR31847

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-05/msg00527.html


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31847


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

* [Bug tree-optimization/31847] [4.3 Regression] Printing to dump file broken
  2007-05-06 21:30 [Bug tree-optimization/31847] New: Printing to dump file broken dberlin at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2007-05-10  7:12 ` patchapp at dberlin dot org
@ 2007-05-12 17:22 ` rguenth at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-05-12 17:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2007-05-12 18:22 -------
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31847


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

end of thread, other threads:[~2007-05-12 17:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-06 21:30 [Bug tree-optimization/31847] New: Printing to dump file broken dberlin at gcc dot gnu dot org
2007-05-06 21:32 ` [Bug tree-optimization/31847] [4.3 Regression] " pinskia at gcc dot gnu dot org
2007-05-07  6:23 ` simartin at gcc dot gnu dot org
2007-05-07 13:02 ` dberlin at dberlin dot org
2007-05-08 15:34 ` simartin at gcc dot gnu dot org
2007-05-08 15:47 ` simartin at gcc dot gnu dot org
2007-05-10  7:12 ` patchapp at dberlin dot org
2007-05-12 17:22 ` rguenth at gcc dot gnu dot org

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).