User account creation filtered due to spam.

Bug 36735 - incomplete tree dump with "-fdump-tree-original-raw"
Summary: incomplete tree dump with "-fdump-tree-original-raw"
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.3.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2008-07-05 00:38 UTC by Markus Grabner
Modified: 2008-07-05 20:40 UTC (History)
1 user (show)

See Also:
Host: x86_64
Target: suse
Build: linux
Known to work:
Known to fail:
Last reconfirmed:

short example (22 bytes, text/x-csrc)
2008-07-05 00:41 UTC, Markus Grabner
patch to fix the tree dump problem (549 bytes, patch)
2008-07-05 00:42 UTC, Markus Grabner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Grabner 2008-07-05 00:38:59 UTC
The tree dump created with the option "-fdump-tree-original-raw" is incomplete for two reasons:
1.) at some places in the code, the "slim" option (TDF_SLIM) has been hardcoded (this is easily demonstrated by running "gcc -fdump-tree-original-raw test.cpp" and "gcc -fdump-tree-original-raw-slim test.cpp", which both produce the same output)
2.) declaration expressions are not handled properly

This might be related to other bugs in the database which are not yet resolved (e.g., #27193). The attached patch fixes both issues.
Comment 1 Markus Grabner 2008-07-05 00:41:41 UTC
Created attachment 15857 [details]
short example
Comment 2 Markus Grabner 2008-07-05 00:42:42 UTC
Created attachment 15858 [details]
patch to fix the tree dump problem
Comment 3 2008-07-05 09:40:27 UTC
Subject: Re:  incomplete tree dump with "-fdump-tree-original-raw"

On Sat, 5 Jul 2008, grabner at icg dot tugraz dot at wrote:

> Created an attachment (id=15858)
>  --> (
> patch to fix the tree dump problem

Patches (against trunk) must go to gcc-patches after testing and with 
ChangeLog entries and the other information required; see 
<> for details.

Comment 4 Andrew Pinski 2008-07-05 19:22:38 UTC
Really these options are only to be used to debug GCC and not really supposed to be used to outside of that.

> What's that? If this value is important to you, please document

It is documented via autoconf and really on :).
Comment 5 Markus Grabner 2008-07-05 20:40:57 UTC
Ok, I inserted my best guess for host-target-build (since this particular problem is not related to code generation, it shouldn't be too important here anyway). A few proposals how to make it easier for first-time bug reporters to create useful reports are here:

Regarding the "TDF_SLIM | ...", it still seems to me that these have been inserted at some point in time for testing purposes and not yet been removed since then. If a slim tree dump is desired, it can still be obtained by adding the "-slim" switch. I am working on automatic differentiation of C code written for gcc, and it seems natural to obtain the code tree directly from gcc. Since the tree-dump options are documented in the man page, I took this approach, but had to remove the TDF_SLIM override to get useful results.