public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/110524] [C++20] ICE with use of function template name with no prior declaration in decltype
Date: Mon, 03 Jul 2023 11:28:04 +0000	[thread overview]
Message-ID: <bug-110524-4-0fdUlOK1NQ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-110524-4@http.gcc.gnu.org/bugzilla/>

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
            Summary|Internal compiler error:    |[C++20] ICE with use of
                   |../csu/libc-start.c:392     |function template name with
                   |                            |no prior declaration in
                   |                            |decltype
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-07-03
      Known to fail|                            |14.0, 9.5.0

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed, fully reduced testcase:
```
template <typename... Ts> struct tuple {};
template <int... Ts> struct seq {};
template <typename TT, typename... Ts, int... i>
inline auto sfinae_friendly_apply_impl(TT invocable, tuple<Ts...> t, 
seq<i...>) noexcept
    -> decltype(invocable(get<i>(t)...)) {}
void run_all() {
  sfinae_friendly_apply_impl([](){}, tuple<>{}, seq<>{});
}
template<int i, typename T> int get(T);

```

Note moving the definition of get before the definition of
sfinae_friendly_apply_impl allows GCC to work.

  parent reply	other threads:[~2023-07-03 11:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-03  0:07 [Bug c++/110524] New: Internal compiler error: ../csu/libc-start.c:392 denis.yaroshevskij at gmail dot com
2023-07-03  0:16 ` [Bug c++/110524] " pinskia at gcc dot gnu.org
2023-07-03  0:21 ` pinskia at gcc dot gnu.org
2023-07-03 11:28 ` pinskia at gcc dot gnu.org [this message]
2023-07-15 13:53 ` [Bug c++/110524] [C++20] ICE with use of function template name with no prior declaration in decltype cvs-commit at gcc dot gnu.org
2023-07-15 14:01 ` ppalka at gcc dot gnu.org
2023-07-17 13:52 ` cvs-commit at gcc dot gnu.org
2023-07-17 13:53 ` ppalka at gcc dot gnu.org
2023-07-27 10:28 ` pinskia 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-110524-4-0fdUlOK1NQ@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).