Thank you for your reply! I tried to use this in the following code:
tree func_decl = gimple_call_fndecl(stmt); // stmt is the function call statement function* f = DECL_STRUCT_FUNCTION(func_decl); std::cerr << get_name(f->decl) << std::endl; However, it seems the last line throws an exception as follows: during GIMPLE pass: XXX // here XXX is my pass name internal compiler error: Segmentation fault ... That seems strange. Does that seem familiar to you by any chance? Thank you! Best, Shuai On Tue, Feb 16, 2021 at 7:52 PM Martin Liška <mli...@suse.cz> wrote: > On 2/16/21 9:51 AM, Shuai Wang via Gcc wrote: > > However, can I proceed further to get the function* of "foo"? I checked > > Hello. > > Yes, you can call DECL_STRUCT_FUNCTION(func_decl). > > Martin >