http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49260
--- Comment #5 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2011-06-20 14:51:07 UTC --- > --- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-06-06 > 11:18:43 UTC --- >> I'm seeing this when using Sun as on Solaris, but not with GNU as 2.21, even >> when Sun ld is used in both cases. > > I'm seeing it on SPARC/Solaris 8, 9 and 10 with GNU as 2.20.1 and Sun ld. So > the failure may be predicated on a feature available only in 2.21 or above. I've digged somewhat further: with gas 2.20.1, one of the cfi configure test fails checking assembler for working cfi advance... no thus HAVE_GAS_CFI_DIRECTIVE is 0 and gas and Sun as are treated the same. If I look at the gas 2.20.1 output, I find 3 instances of .long <label> / FDE initial location _ZZ4mainENKUlvE_clEv -> main::{lambda()#1}::operator()() const .LFB32 _ZZ4mainENKUlvE0_clEv -> main::{lambda()#2}::operator()() const .LFB35 main .LFB31 With gas 2.21 and .cfi_startproc instead, there are 5: _ZZ4mainENKUlvE_clEv .LFB32 _ZZ4mainENUlvE_4_FUNEv -> main::{lambda()#1}::_FUN() .LFB33 _ZZ4mainENKUlvE_cvPFvvEEv -> main::{lambda()#1}::operator void (*)()() const .LFB34 _ZZ4mainENKUlvE0_clEv .LFB35 main .LFB31 The output of the FDE initial location happens in dwarf2out.c (output_call_frame_info). If I step throught that function, I see that the FDEs are only emitted if fde_needed_for_eh_p (fde). For the two missing ones, I see that this function returns false due to this test: /* If exceptions are enabled, we have collected nothrow info. */ if (flag_exceptions && (fde->all_throwers_are_sibcalls || fde->nothrow)) return false; Here, both fde->all_throwers_are_sibcalls and fde->nothrow are 1. I cannot say if this is wrong or the tests in fde_needed_for_eh_p needs to be augmented. Manually returning true from the function caused the FDEs to be emitted and the testcase to succeed, as expected. Rainer