[Bug c++/44800] DECL_SAVED_TREE is always null on the first FUNCTION_DECL and is not null on the others
--- Comment #9 from lopezibanez at gmail dot com 2010-07-04 08:33 --- Subject: Re: DECL_SAVED_TREE is always null on the first FUNCTION_DECL and is not null on the others On 4 July 2010 02:39, asmprog32 at hotmail dot com gcc-bugzi...@gcc.gnu.org wrote: A file has 3 functions (with body), the AST generated report a body (DECL_SAVED_TREE != null ) on function 1, 2 not on function 3 (last one) If i add another function , the AST generated report a body on function 1 2 3 not on function 4 . and so on What i expect is that all functions must have the body (DECL_SAVED_TREE != null). The code attached are examples to reproduce what i have explained. I see. Reading the documentation on DECL_SAVED_TREE, that seems a fair expectation. I don't know what is going on here. Perhaps your plugin hooks too early or there is more going on that the docs explain. Please, when you get the answer, post it here (or better, send a patch updating the documentation!). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44800
[Bug c++/44800] DECL_SAVED_TREE is always null on the first FUNCTION_DECL and is not null on the others
--- Comment #10 from manu at gcc dot gnu dot org 2010-07-04 08:34 --- (In reply to comment #8) After the bug has been closed. i has posted the question to gcc-help, thanks ( i has reported as bug because , i has thinked it was a bug ) I personally think that if this is not clear (but it is the correct behaviour) it is a documentation bug. Whatever you find, please post it here. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44800
[Bug c++/44800] DECL_SAVED_TREE is always null on the first FUNCTION_DECL and is not null on the others
--- Comment #11 from asmprog32 at hotmail dot com 2010-07-04 09:39 --- The problem is that i followed also external documentation, where PLUGIN_OVERRIDE_GATE is used to analyse AST. GCC documentation say to use PLUGIN_PRE_GENERICIZE and infact it work, so it is a my wrong. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44800
[Bug c++/44800] DECL_SAVED_TREE is always null on the first FUNCTION_DECL and is not null on the others
--- Comment #1 from asmprog32 at hotmail dot com 2010-07-03 09:52 --- Created an attachment (id=21072) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21072action=view) plugins source -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44800
[Bug c++/44800] DECL_SAVED_TREE is always null on the first FUNCTION_DECL and is not null on the others
--- Comment #2 from asmprog32 at hotmail dot com 2010-07-03 09:53 --- Created an attachment (id=21073) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21073action=view) example 1 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44800
[Bug c++/44800] DECL_SAVED_TREE is always null on the first FUNCTION_DECL and is not null on the others
--- Comment #3 from asmprog32 at hotmail dot com 2010-07-03 09:54 --- Created an attachment (id=21074) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21074action=view) example 2 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44800
[Bug c++/44800] DECL_SAVED_TREE is always null on the first FUNCTION_DECL and is not null on the others
--- Comment #4 from rguenth at gcc dot gnu dot org 2010-07-03 10:52 --- bugzilla is not a plugin support forum -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44800
[Bug c++/44800] DECL_SAVED_TREE is always null on the first FUNCTION_DECL and is not null on the others
--- Comment #5 from asmprog32 at hotmail dot com 2010-07-03 11:22 --- (In reply to comment #4) bugzilla is not a plugin support forum Infact is not a request of help, DECL_SAVED_TREE is systematicaly Null ONLY and ALWAYS on the last FUNCTION_DECL, i has thinked this is the normal behaviour. The code is given only to reproduce the issue. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44800
[Bug c++/44800] DECL_SAVED_TREE is always null on the first FUNCTION_DECL and is not null on the others
--- Comment #6 from manu at gcc dot gnu dot org 2010-07-03 18:58 --- Pietro, Please explain what is happening and what do you expect to happen, and why do you expect that. If you are having troubles about using gcc, please ask in gcc-help first. -- manu at gcc dot gnu dot org changed: What|Removed |Added CC||manu at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44800
[Bug c++/44800] DECL_SAVED_TREE is always null on the first FUNCTION_DECL and is not null on the others
--- Comment #7 from asmprog32 at hotmail dot com 2010-07-04 00:39 --- (In reply to comment #6) Pietro, Please explain what is happening and what do you expect to happen, and why do you expect that. If you are having troubles about using gcc, please ask in gcc-help first. Ok inserting a gcc callback into PLUGIN_OVERRIDE_GATE and analyzing the AST systematicaly the last function in the file, has no body ( DECL_SAVED_TREE == null ) An example A file has 3 functions (with body), the AST generated report a body (DECL_SAVED_TREE != null ) on function 1, 2 not on function 3 (last one) If i add another function , the AST generated report a body on function 1 2 3 not on function 4 . and so on What i expect is that all functions must have the body (DECL_SAVED_TREE != null). The code attached are examples to reproduce what i have explained. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44800
[Bug c++/44800] DECL_SAVED_TREE is always null on the first FUNCTION_DECL and is not null on the others
--- Comment #8 from asmprog32 at hotmail dot com 2010-07-04 00:47 --- After the bug has been closed. i has posted the question to gcc-help, thanks ( i has reported as bug because , i has thinked it was a bug ) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44800