public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/95292] New: internal compiler error
@ 2020-05-23 20:26 tilin97 at yandex dot ru
  2020-05-25  9:00 ` [Bug c++/95292] ICE in expand_expr_real_2, at expr.c:8538 marxin at gcc dot gnu.org
  2021-10-02  7:30 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: tilin97 at yandex dot ru @ 2020-05-23 20:26 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95292
           Summary: internal compiler error
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tilin97 at yandex dot ru
  Target Milestone: ---

the following code causes an internal compiler error on versions from 7.1
onwards

#include <functional>

class A {
public:
        bool a;
        static inline std::function<void(A&)> foo = std::function<void(A&)>([]
(A& o) {
                bool A::*ptr = &A::a;
                o.*ptr = true;
        });
};

int main() {
        A a;
        A::foo(a);
}

gcc version 10.1.0 (Ubuntu 10.1.0-2ubuntu1~18.04)

===

gcc -std=c++17 main.cpp

during RTL pass: expand
main.cpp: In lambda function:
main.cpp:7:12: internal compiler error: in expand_expr_real_2, at expr.c:8538
    7 |   bool A::*ptr = &A::a;

===

OR

===

gcc -std=c++17 -O2 main.cpp

during IPA pass: icf
main.cpp:15:1: internal compiler error: in hash_operand, at fold-const.c:3768
   15 | }
      | ^

===

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

end of thread, other threads:[~2021-10-02  7:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-23 20:26 [Bug c++/95292] New: internal compiler error tilin97 at yandex dot ru
2020-05-25  9:00 ` [Bug c++/95292] ICE in expand_expr_real_2, at expr.c:8538 marxin at gcc dot gnu.org
2021-10-02  7:30 ` 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).