https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94453
Bug ID: 94453 Summary: [10 Regression] ICE in make_decl_rtl since r10-3591 Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jakub at gcc dot gnu.org Target Milestone: --- Since r10-3591-gb830c28b56fdc3f4b4555200278218b4b49022d2 the following testcase ICEs with -O2 -std=c++17: ./cc1plus -quiet -O2 -std=c++17 rh1819335.ii during RTL pass: expand rh1819335.ii: In static member function ‘static ar t<ar(ad ...), h>::bf(const s&, ad ...) [with ar = void; h = b(G<cn::v*>)::<lambda()>; ad = {}]’: rh1819335.ii:103:29: internal compiler error: in make_decl_rtl, at varasm.c:1346 103 | auto q = [=] { exclude->di(p, data->cg().cw()); }; | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ 0x1a98085 make_decl_rtl(tree_node*) ../../gcc/varasm.c:1342 0x1044655 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc/expr.c:10085 0x103c4e3 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc/expr.c:8353 0xe424f1 expand_expr ../../gcc/expr.h:282 0xe55ad7 store_one_arg ../../gcc/calls.c:5973 0xe50238 expand_call(tree_node*, rtx_def*, int) ../../gcc/calls.c:4476 template <int b> struct c { static constexpr int d = b; }; template <bool b> using e = c<b>; template <bool, bool, typename...> struct g; template <typename h, typename... ad> struct g<false, false, h, ad...> { typedef decltype(0) i; }; template <typename... ad> struct k : g<c<false>::d, c<false>::d, ad...> {}; template <bool, typename f = void> using ag = f; struct r { c<true> j; using i = decltype(j); }; template <typename...> constexpr bool ak = r::i ::d; template <typename, typename an, typename... al> void ao(an ap, al... aq) { ap(aq...); } template <typename, typename as, typename... al> ag<ak<>> at(as au, al... aq) { using av = k<as>; using aw = typename av::i; ao<aw>(au, aq...); } struct s { void *ay(); template <typename f> f ay() { return *static_cast<f *>(ay()); } }; template <typename> class az; template <typename h> class bb { protected: static h *bc(s bd) { return bd.ay<h *>(); } }; template <typename, typename> class t; template <typename ar, typename h, typename... ad> struct t<ar(ad...), h> : bb<h> { static ar bf(const s &bg, ad... aq) { auto bh = bb<h>::bc(bg); at<ar>(*bh, aq...); } }; template <typename ar, typename... ad> struct az<ar(ad...)> { template <typename, typename f> using bj = f; template <typename h, typename = bj<e<!bool()>, void>, typename = bj<r, void>> az(h); using bk = ar (*)(const s &, ad...); bk bl; }; template <typename ar, typename... ad> template <typename h, typename, typename> az<ar(ad...)>::az(h) { bl = t<ar(ad...), h>::bf; } template <class bo> struct G { template <typename bp> G(bp); bo operator->() const; }; namespace bq { struct H { template <typename bs> bs *bt(); }; struct I { template <typename bz> I(bz); }; template <typename, typename> using cb = I; class u : cb<int, int> { using cc = cb<int, int>; using cc::cc; }; template <typename bs> struct J { bs cg(); }; } template <typename ch> using ci = az<ch>; template <typename cj> struct ck { using cl = cj; constexpr ck(cl) {} }; template <typename cl> constexpr auto l(cl d) { return ck(d); } template <typename cl> constexpr auto operator|(cl a, cl) { auto cm = l(a); return cm; } namespace cn { struct v { bq::H br(); }; } namespace cp { struct cq { enum cr { cs, ct }; using cv = ck<cr>; const int &cw() const; }; } namespace cn { namespace cx { auto cy() {} } struct w { void da(ci<void()>); }; } using db = cn::w; G<db *> dc(int, bq::u, int); namespace de { int m; } using cr = cp::cq; using cv = cp::cq::cv; using df = const int &; using dg = df (cp::cq::*)() const; struct x { void di(cv, int); }; G<x *> dj(int, G<int>, ci<void(cp::cq)>, cv, dg); void dk(int, G<int>, cv, G<int>, ci<void(cp::cq)>, ci<void()>); void b(G<cn::v *> box) { int dm, content = 0; using dn = bq::J<cp::cq>; auto data = box->br().bt<dn>(); auto n = [](cp::cq) {}; constexpr auto p = cr::cs | cr::ct; auto o = dc(content, cn::cx::cy, de::m); auto exclude = dj(content, data, n, p, &cp::cq::cw); auto q = [=] { exclude->di(p, data->cg().cw()); }; o->da([=] { dk(dm, box, p, data, n, q); }); }