[Bug c++/44800] New: DECL_SAVED_TREE is always null on the first FUNCTION_DECL and is not null on the others

asmprog32 at hotmail dot com gcc-bugzilla@gcc.gnu.org
Sat Jul 3 09:50:00 GMT 2010


Look at this simple plugins code

bug.cpp

compile with

g++ -shared -I/usr/local/lib/gcc/i686-pc-linux-gnu/4.5.0/plugin/include -DUNIX
-g -Wall -Werror -O0 -fPIC -DPIC -o libbug.so bug.cpp


than ran this plugins on example.cpp with

g++ -S -fplugin=libbug.so example.cpp

the output


starting libbug
processing example.cpp
unused_f2  0                 <------- decl saved tree is null
unused_f  0xb7409ad4
main  0xb7496c90
function_1  0xb7496c78


now add a function at the end of the file like example2.cpp

and run the plugins on it

starting libbug
processing example2.cpp
unused_f3  0                   <----------- DECL_SAVED_TREE null
unused_f2  0xb754be28          <----------- DECL_SAVED_TREE != null
unused_f  0xb74bead4
main  0xb754bc90
function_1  0xb754bc78


It seem that the last (on file) / first (on list) function_decl has always
DECL_SAVED_TREE == null


-- 
           Summary: DECL_SAVED_TREE is always null on the first
                    FUNCTION_DECL and is not null on the others
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: asmprog32 at hotmail dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44800



More information about the Gcc-bugs mailing list