https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107615
Bug ID: 107615 Summary: Segfault on accessing to methods of optional class through member pointer Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: socurahlem at yandex dot ru Target Milestone: --- Example link: https://godbolt.org/z/K7bqeh9sG If we access methods of optional class through pointer to member, the program exited with segfault. I tried the example with previous versions of gcc and got correct result. With clang the same