public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ppalka at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/98800] New: ICE on invalid use of non-static member function in trailing return type since r251438
Date: Fri, 22 Jan 2021 21:48:45 +0000	[thread overview]
Message-ID: <bug-98800-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 98800
           Summary: ICE on invalid use of non-static member function in
                    trailing return type since r251438
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ppalka at gcc dot gnu.org
  Target Milestone: ---

This invalid testcase is just a minor variant of PR97399#c4 where the member
function is_integral has been made non-static.

$ cat testcase.C
template <bool> struct enable_if_t {};
struct tmp {
  template <class>   constexpr bool is_integral();
  template <class E> static auto func() -> enable_if_t<is_integral<E>()>;
};
template <class> constexpr bool tmp::is_integral() { return true; }
int main() { tmp::func<int>(); }

$ g++ testcase.C
testcase.C: In substitution of ‘template<class T> static
enable_if_t<((tmp*)this)->is_integral<T>()> tmp::f() [with T = int]’:
testcase.C:21:15:   required from here
testcase.C:9:39: internal compiler error: in tsubst_copy, at cp/pt.c:16393
    9 |     -> enable_if_t<tmp::is_integral<T>()>; // { dg-message "in template
argument" }
      |                    ~~~~~~~~~~~~~~~~~~~^~

             reply	other threads:[~2021-01-22 21:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-22 21:48 ppalka at gcc dot gnu.org [this message]
2021-01-22 21:53 ` [Bug c++/98800] [8/9/10/11 Regression] ICE on invalid use of non-static member function in trailing return type since r8-2724 ppalka at gcc dot gnu.org
2021-01-22 21:56 ` ppalka at gcc dot gnu.org
2021-01-25 14:49 ` mpolacek at gcc dot gnu.org
2021-02-26 12:33 ` rguenth at gcc dot gnu.org
2021-04-10 14:42 ` jason at gcc dot gnu.org
2021-04-10 14:47 ` mpolacek at gcc dot gnu.org
2021-04-10 20:33 ` cvs-commit at gcc dot gnu.org
2021-05-14  9:54 ` [Bug c++/98800] [9/10/11/12 " jakub at gcc dot gnu.org
2021-06-01  8:19 ` rguenth at gcc dot gnu.org
2022-05-27  9:44 ` [Bug c++/98800] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:43 ` jakub at gcc dot gnu.org
2023-07-07 10:38 ` [Bug c++/98800] [11/12/13/14 " 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-98800-4@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).