HELP (change in control flow desired)

Virender Kashyap virenk@cse.iitb.ac.in
Sat Jan 22 17:41:00 GMT 2005


Hi,
      I am working on implementation of a particular interprocedural 
problem in gcc. For that i need to have CFG's of all functions availabe at 
one time. As the first step to this i want to move formation of tree-CFG 
ahead at the point where GIMPLE tree is formed and then store this CFG in 
call graph (possibly with or without having need to store tree decl).
       I tried to place the following at the end of 
cgraph_finalize_function : (these are some of the initial functions called 
in execute_pass_list , till CFG is formed)

   remove_useless_vars();
   execute_mudflap_function_decls();
   lower_function_body();
   execute_build_cfg();

I have also taken care of adding extern declarations in files where these 
functions are defined and in cgraphunit.c. As a test, and assuming 
unit-at-a-time mode of compilaiton, i just do pasing and the actual compilaiton is disabled 
(jusr exit after parsing is finished). Essentially i am just interested in 
CFG's being formed.
      When i try to compile with above setup, i get following error :
--------------
In file included from /usr/include/stdio.h:828,
                  from 
../../gcc4.0_source/gcc-4.0-20041226/gcc/tsystem.h:90,
                  from 
../../gcc4.0_source/gcc-4.0-20041226/gcc/crtstuff.c:64:
/usr/include/bits/stdio.h:37: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make[1]: *** [crtbegin.o] Error 1
make: *** [all-gcc] Error 2
----------------
           It may be a little funny the way i am doing things. So first of 
all i would like to ask whether above would work (may be with minor 
changes) or not. Do I also need to make changes in Makefile ?

      Please help me on this.

Thanks and Regards,

Virender.







More information about the Gcc mailing list