public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* incomplete tree dump with flag -fdump-tree-all
@ 2009-05-12  8:33 Fengzhe Zhang
  2009-05-12 16:47 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Fengzhe Zhang @ 2009-05-12  8:33 UTC (permalink / raw)
  To: gcc

Hi,

I found that the tree dump (xxx.c.t00.tu file) with -fdump-tree-all
flag is incomplete in gcc-4.1.2. And the tree-dump.c is not modified
for this bug up to 4.4.0.

When a function body contains a for-statement or if-statement, the
stmt-list will break, and the rest of the function body is lost.

I did some search and found an early discussion thread about
-fdump-tree-original-raw:
http://gcc.gnu.org/ml/gcc-bugs/2008-07/msg00695.html

I tried that patch and it didn't work for the "tu" dump. And I found
that the output with -fdump-tree-all-slim flag is the same as with
-fdump-tree-all flag.

How can I find the rest of the statements from the broken statement-list? Thx.

-Fengzhe

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

* Re: incomplete tree dump with flag -fdump-tree-all
  2009-05-12  8:33 incomplete tree dump with flag -fdump-tree-all Fengzhe Zhang
@ 2009-05-12 16:47 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2009-05-12 16:47 UTC (permalink / raw)
  To: Fengzhe Zhang; +Cc: gcc

Fengzhe Zhang <fengzhe.zhang@gmail.com> writes:

> I found that the tree dump (xxx.c.t00.tu file) with -fdump-tree-all
> flag is incomplete in gcc-4.1.2. And the tree-dump.c is not modified
> for this bug up to 4.4.0.
>
> When a function body contains a for-statement or if-statement, the
> stmt-list will break, and the rest of the function body is lost.
>
> I did some search and found an early discussion thread about
> -fdump-tree-original-raw:
> http://gcc.gnu.org/ml/gcc-bugs/2008-07/msg00695.html
>
> I tried that patch and it didn't work for the "tu" dump. And I found
> that the output with -fdump-tree-all-slim flag is the same as with
> -fdump-tree-all flag.
>
> How can I find the rest of the statements from the broken statement-list? Thx.

I think you will need to add code to gcc/cp/cxx-pretty-print.c and/or
gcc/cp/dump.c to handle IF_STMT and FOR_STMT (and WHILE_STMT and DO_STMT
too, I expect).  I haven't looked into it in detail, though.

Ian

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

end of thread, other threads:[~2009-05-12 16:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-12  8:33 incomplete tree dump with flag -fdump-tree-all Fengzhe Zhang
2009-05-12 16:47 ` Ian Lance Taylor

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