This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/31847] [4.3 Regression] Printing to dump file broken
- From: "dberlin at dberlin dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 May 2007 13:02:38 -0000
- Subject: [Bug tree-optimization/31847] [4.3 Regression] Printing to dump file broken
- References: <bug-31847-1@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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