public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "kretz at kde dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/99201] [8/9/10/11 Regression] ICE in tsubst_copy, at cp/pt.c:16581
Date: Mon, 22 Feb 2021 21:12:25 +0000	[thread overview]
Message-ID: <bug-99201-4-e1fnjUmKAg@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99201-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 from Matthias Kretz (Vir) <kretz at kde dot org> ---
Manual reduction which fails with 8-11 and compiles ok with 7:

template <class V, class... F>
  void
  test_values_2arg(F&&... fun_pack)
  {
    (fun_pack(V(), V()), ...);
  }

template <typename TestF, typename RefF>
  auto
  make_tester(const TestF& testfun, const RefF& reffun)
  {
    return [=](auto... inputs) {
      auto totest = reffun(inputs...);
      using R = decltype(totest);
      auto&& expected = [&](const auto&... vs) {
        if constexpr (sizeof(R) > 0)
          return [&](auto i) { return reffun(vs[i]...); }(0);
        else
          return [&](auto i) { return reffun(vs[i]...); }(0);
      };
    };
  }
template <typename T> T foo(T, T) {
}
int main()
{
  test_values_2arg<double>(make_tester(
                             [](auto... xs) { return foo(xs...); },
                             [](auto... xs) { return foo(xs...); }));
  return 0;
}

  parent reply	other threads:[~2021-02-22 21:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-22 14:59 [Bug c++/99201] New: " kretz at kde dot org
2021-02-22 15:22 ` [Bug c++/99201] [8/9/10/11 Regression] " mpolacek at gcc dot gnu.org
2021-02-22 15:34 ` jakub at gcc dot gnu.org
2021-02-22 15:36 ` kretz at kde dot org
2021-02-22 21:12 ` kretz at kde dot org [this message]
2021-02-23  8:20 ` rguenth at gcc dot gnu.org
2021-02-23  8:30 ` kretz at kde dot org
2021-02-23  9:35 ` [Bug c++/99201] [8/9/10/11 Regression] ICE in tsubst_copy, at cp/pt.c:16581 since r8-7613-g1456e764105702a0 marxin at gcc dot gnu.org
2021-04-04 15:54 ` jason at gcc dot gnu.org
2021-04-05 12:26 ` cvs-commit at gcc dot gnu.org
2021-04-05 13:30 ` [Bug c++/99201] [8/9/10 " jason at gcc dot gnu.org
2021-05-14  9:54 ` [Bug c++/99201] [9/10 " jakub at gcc dot gnu.org
2021-05-20 21:35 ` cvs-commit at gcc dot gnu.org
2021-06-01  8:19 ` rguenth at gcc dot gnu.org
2022-05-27  9:50 ` [Bug c++/99201] [9 " rguenth 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-99201-4-e1fnjUmKAg@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).