public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98800] New: ICE on invalid use of non-static member function in trailing return type since r251438
@ 2021-01-22 21:48 ppalka at gcc dot gnu.org
  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
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-01-22 21:48 UTC (permalink / raw)
  To: gcc-bugs

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" }
      |                    ~~~~~~~~~~~~~~~~~~~^~

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-07-07 10:38 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-22 21:48 [Bug c++/98800] New: ICE on invalid use of non-static member function in trailing return type since r251438 ppalka at gcc dot gnu.org
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

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).