public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102213] New: Incorrect executable produced from valid input code with virtual consteval
@ 2021-09-06  8:51 fchelnokov at gmail dot com
  2021-11-25 18:51 ` [Bug c++/102213] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: fchelnokov at gmail dot com @ 2021-09-06  8:51 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102213
           Summary: Incorrect executable produced from valid input code
                    with virtual consteval
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fchelnokov at gmail dot com
  Target Milestone: ---

Consider the program
```
#include <compare>

struct A { 
    virtual consteval std::strong_ordering operator <=>(const A &) const =
default; 
};

struct B : A {
    virtual consteval bool operator==(const A&) const noexcept override {
return false; }
};

int main() {
    static constexpr B b;
    static constexpr const A & a = b;
    static_assert( (a <=> a) == 0 );
    static_assert( a != a );
    return (a <=> a) == 0; 
}
```
It shall return 1, but after making in GCC it fails with return code 139:
https://gcc.godbolt.org/z/EjdWa61W9

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

end of thread, other threads:[~2023-01-19  2:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-06  8:51 [Bug c++/102213] New: Incorrect executable produced from valid input code with virtual consteval fchelnokov at gmail dot com
2021-11-25 18:51 ` [Bug c++/102213] " pinskia at gcc dot gnu.org
2021-11-25 18:52 ` pinskia at gcc dot gnu.org
2023-01-19  2:07 ` [Bug c++/102213] virtual consteval is not being stored in the vtable pinskia 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).