Bug 52658 - struct/union types don't print out all of the field with -fdump-tree-original-raw
Summary: struct/union types don't print out all of the field with -fdump-tree-original...
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: debug (show other bugs)
Version: 4.6.3
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-21 20:38 UTC by saturnman
Modified: 2024-03-17 22:19 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2024-03-17 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description saturnman 2012-03-21 20:38:47 UTC
When dumping tree with parameter -ftree-dump-original-raw. class type with RECORD_TYPE tree node. I just can't find all FIELD_DECL of all its members. 
to fix this problem is quite easy
add one line to tree-dump.c just below line number 535
just add "dump_child ("chan",TREE_CHAIN(t));" 
now this problem goes away. :-)
Comment 1 saturnman 2012-03-21 20:40:09 UTC
can any one add this FIX to code base. I just don't has an account, thx.
Comment 2 Andrew Pinski 2024-03-17 22:19:33 UTC
Confirmed.

Simplified testcase:
```
struct a
{ int field1;int field2;};
int f(struct a b)
{
        return b.field1;
}
```

Only the first field1 shows up in the dump even though `struct a` contains field2 too.