http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49675
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu.org Component|fortran |middle-end Target Milestone|--- |4.6.2 Summary|jacobi.F90:90:0: internal |[4.6/4.7 Regression] ICE |compiler error: |(segfault) with |Segmentation fault |-finstrument-functions --- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-07-08 12:08:22 UTC --- Minimal test case: subroutine one() end subroutine one compiled with "gfortran -finstrument-functions". Valgrind shows: ==4467== Invalid read of size 2 ==4467== at 0x76C5C4: gimple_build_call (gimple.c:262) ==4467== by 0x7A1DB8: gimplify_function_tree (gimplify.c:7938) ==4467== by 0x642EA7: cgraph_analyze_function (cgraphunit.c:890) ==4467== by 0x643697: cgraph_analyze_functions (cgraphunit.c:1108) ==4467== by 0x645544: cgraph_finalize_compilation_unit (cgraphunit.c:1294) ==4467== by 0x7F1C3C: write_global_declarations (langhooks.c:303) ==4467== by 0x8E9283: toplev_main (toplev.c:564) ==4467== by 0x645200C: (below main) (libc-start.c:226) The ICE occurs in gimple_build_call (gimple.c:262) for: gcc_assert (TREE_CODE (fn) == FUNCTION_DECL || is_gimple_call_addr (fn)); The problem is that the argument is fn == NULL. The callee (gimplify_function_tree (gimplify.c:7938)) is: x = implicit_built_in_decls[BUILT_IN_RETURN_ADDRESS]; call = gimple_build_call (x, 1, integer_zero_node); The problem is that implicit_built_in_decls[BUILT_IN_RETURN_ADDRESS] is NULL.