public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102753] New: ICE on invalid use of pointer to a consteval member function
@ 2021-10-14 18:05 aaron at aaronballman dot com
  2021-10-14 18:13 ` [Bug c++/102753] ICE in cp_genericize_r " pinskia at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: aaron at aaronballman dot com @ 2021-10-14 18:05 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102753
           Summary: ICE on invalid use of pointer to a consteval member
                    function
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: aaron at aaronballman dot com
  Target Milestone: ---

The following code crashes GCC instead of giving an error:

struct test {
  consteval int f() const { return 12; }
};

constexpr test t;
int main() {
  (t.*&test::f)();
}

Note that the call to the PMF is not in a constant evaluated context.

https://godbolt.org/z/beWhE9qMv

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

end of thread, other threads:[~2021-11-26  9:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-14 18:05 [Bug c++/102753] New: ICE on invalid use of pointer to a consteval member function aaron at aaronballman dot com
2021-10-14 18:13 ` [Bug c++/102753] ICE in cp_genericize_r " pinskia at gcc dot gnu.org
2021-10-14 19:08 ` jakub at gcc dot gnu.org
2021-10-15 17:54 ` jakub at gcc dot gnu.org
2021-10-27  7:28 ` cvs-commit at gcc dot gnu.org
2021-10-27  7:28 ` cvs-commit at gcc dot gnu.org
2021-11-26  9:17 ` cvs-commit 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).