http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48459
--- Comment #12 from Anitha Boyapati <anitha.boyapati at atmel dot com> 2011-06-13 06:53:25 UTC --- (In reply to comment #11) > (In reply to comment #10) > > I don't think initial_return_save() is called now. It passes the > > compilation > > there but gets struck in other places. I think it is because > > INCOMING_RETURN_ADDR_RTX is now seen as defined and hence CFI info is > > emitted. > > But this runs into trouble because the above hook is gcc_unreachable(). > > It's only defined in dwarf2out.c, and there it's only used in the call to > initial_return_save. Right. This is a new problem, explained below. The ICE results because dwarf2out_frame_debug_expr() is called(which I think should not be called unless INCOMING_RETURN_ADDR_RTX/DWARF2_UNWIND_INFO is defined).The above function(if is not a recursive),is always called from dwarf2out_debug_frame(). dwarf2out_debug_frame() is required to emit frame information if and only if dwarf2out_do_frame() is true. The latter going by comments, is required to determine whether or not to emit a frame related information. Here some ambiguity lies. In earlier versions, calls to dwarf2out_do_frame() are not emitted as they are conditionally compiled (#ifdef DWARF2_UNWIND_INFO ) http://gcc.gnu.org/viewcvs/tags/gcc_4_6_0_release/gcc/final.c?r1=164610&r2=164701&diff_format=h I think with the above patch, conditional compilation w.r.t DWARF2_UNWIND_INFO macro is removed. The logic of dwarf2out_do_frame() does not seem to consider INCOMING_RETURN_ADDR_RTX as optional. Whenever write_symbols is defined to DWARF2_DEBUG ( This is set by turning on DWARF2_DEBUGGING_MACRO in opts.c), the function returns true. As a result, dwarf_debug_frame_expr() is always called! dwarf2out_do_frame() --> dwarf2out_debug_frame() --> dwarf2out_frame_debug_expr() I think the function dwarf2out_do_frame() needs to be updated for optional CFI check. [Not sure if the problem can be solved fully with these changes either] HTH Anitha