public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "iains at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/94359] new test case g++.dg/coroutines/torture/symmetric-transfer-00-basic.C fails
Date: Thu, 09 Apr 2020 20:40:46 +0000	[thread overview]
Message-ID: <bug-94359-4-2tuNp3R1bg@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94359-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94359

--- Comment #11 from Iain Sandoe <iains at gcc dot gnu.org> ---
Created attachment 48251
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48251&action=edit
Patch for testing

coroutines: Fix compile error with symmetric transfers [PR94359]

For symmetric transfers to work with C++20 coroutines, it is
currently necessary to tail call the callee coroutine from resume
method of the caller coroutine.  The current codegen marks these
resume calls as "MUST_TAIL_CALL" to indicate that the tail call is
required for correctness, in the general case.

Unfortunately, several targets have ABI constraints that prevent
an indirect tail-call, which results in the PRs compile error.

The change here tests the target sibcall hook for the resume
expression and only marks it as requiring a tail call if that's
supported.

This doesn't fix the underlying problem; that really a solution is
needed to allow the tail-calls (or equivalent) to take place - but
that will be deferred until next stage 1.

The test case is 'xfail-run-if'd for the targets mentioned in this
PR since we still want to test that the compile proceeds without
error.  At compile-time we can't tell if missing the tail-call will
cause a specific code to fail, so that most likely a warning for this
case would produce a lot of false positives.


gcc/cp/ChangeLog:

2020-04-09  Iain Sandoe  <iain@sandoe.co.uk>

        PR c++/94359
        * coroutines.cc (build_actor_fn): Check that the target can
        support the resume tail-call before mandating it.

gcc/testsuite/ChangeLog:

2020-04-09  Iain Sandoe  <iain@sandoe.co.uk>

        PR c++/94359
        * g++.dg/coroutines/torture/symmetric-transfer-00-basic.C:
        Expect a run fail for targets without indirect tail-calls.

  parent reply	other threads:[~2020-04-09 20:40 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-27 16:30 [Bug target/94359] New: " seurer at linux dot vnet.ibm.com
2020-03-27 17:13 ` [Bug target/94359] " iains at gcc dot gnu.org
2020-03-27 17:16 ` iains at gcc dot gnu.org
2020-03-27 21:48 ` iains at gcc dot gnu.org
2020-03-28  9:18 ` iains at gcc dot gnu.org
2020-03-28 16:10 ` iains at gcc dot gnu.org
2020-03-29 10:58 ` iains at gcc dot gnu.org
2020-04-02 11:09 ` ro at gcc dot gnu.org
2020-04-02 11:26 ` iains at gcc dot gnu.org
2020-04-02 11:51 ` ro at gcc dot gnu.org
2020-04-02 17:38 ` ebotcazou at gcc dot gnu.org
2020-04-09 20:40 ` iains at gcc dot gnu.org [this message]
2020-04-09 20:41 ` iains at gcc dot gnu.org
2020-04-14 18:58 ` [Bug c++/94359] " iains at gcc dot gnu.org
2020-04-14 19:44 ` cvs-commit at gcc dot gnu.org
2020-04-15 11:50 ` schwab@linux-m68k.org
2020-04-15 13:03 ` iains at gcc dot gnu.org
2020-04-15 13:24 ` schwab@linux-m68k.org
2020-04-16 23:02 ` cvs-commit at gcc dot gnu.org
2020-04-27 10:23 ` iains 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-94359-4-2tuNp3R1bg@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).