https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104880
Bug ID: 104880 Summary: regression ICE in expand_expr_addr_expr_1, at expr.c:8231 Product: gcc Version: 11.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: dimitar.yordanov at sap dot com Target Milestone: --- Hi, I hit an ICE with the following reduced example: cat > foo.cc << EOF class c { long b; }; class B { public: typedef void *d; }; class aa { public: aa(B::d, char *); }; class e : public B { public: e(); }; __uint128_t f; struct g { struct h : c { h(__uint128_t &i) : c(reinterpret_cast<c &>(i)) {} __uint128_t ad(); }; }; class n : g { public: n(int); void j() { __uint128_t a; h k(a); __atomic_compare_exchange_n(&f, &a, k.ad(), true, 3, 0); } }; int l; class m : e { void ar() { n b(l); b.j(); } virtual c bd() { aa(d(&m::ar), ""); } }; void o() { new m; } EOF g++ -mcx16 -O2 -c foo.cc during RTL pass: expand foo.cc: In member function ‘void m::ar()’: foo.cc:29:32: internal compiler error: in expand_expr_addr_expr_1, at expr.c:8231 29 | __atomic_compare_exchange_n(&f, &a, k.ad(), true, 3, 0); Regression appeared first with: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=eb72dc663e9070b281be83a80f6f838a3a878822 Best regards Dimitar