public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ro at CeBiTec dot Uni-Bielefeld.DE" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/49260] cpp0x/lambda/lambda-eh2.C fails execution
Date: Mon, 20 Jun 2011 14:51:00 -0000	[thread overview]
Message-ID: <bug-49260-4-DM0ZCO8qBS@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-49260-4@http.gcc.gnu.org/bugzilla/>

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


  parent reply	other threads:[~2011-06-20 14:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-01 17:28 [Bug c++/49260] New: " janis at gcc dot gnu.org
2011-06-01 17:32 ` [Bug c++/49260] " janis at gcc dot gnu.org
2011-06-02 22:41 ` dominiq at lps dot ens.fr
2011-06-06 10:09 ` ro at gcc dot gnu.org
2011-06-06 11:19 ` ebotcazou at gcc dot gnu.org
2011-06-20 14:51 ` ro at CeBiTec dot Uni-Bielefeld.DE [this message]
2011-06-20 15:57 ` ebotcazou at gcc dot gnu.org
2011-06-22 15:17 ` jason at gcc dot gnu.org
2011-06-22 15:56 ` jason at gcc dot gnu.org
2011-06-22 15:59 ` jason at gcc dot gnu.org
2011-06-28  7:15 ` [Bug c++/49260] [C++0x] lambda-eh2.C " ebotcazou at gcc dot gnu.org
2011-08-02 15:38 ` jason at gcc dot gnu.org
2011-08-02 18:33 ` jason at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-49260-4-DM0ZCO8qBS@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).