https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94426
Bug ID: 94426 Summary: [10 Regression] ICE in mangle_decl with -flto 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: --- The following testcase ICEs in mangle_decl with -O2 -flto starting with r10-7403-g517f5356bb0ca717f51e937be880e38a828edbf7, before that it has been rejected. template <int a> struct b { static constexpr int c = a; }; template <bool a> using d = b<a>; template <typename> auto ad() -> decltype(0); struct m { d<noexcept(ad<int>())> e; }; struct n : m { typedef decltype(e) ab; }; template <bool> using aj = int; class C { void q(); int bq; }; template <typename by, typename... bj> using bz = typename by::bz<bj...>; namespace ca { struct r { template <typename cc> using bz = cc; }; template <typename cc, typename> using cd = bz<r, cc>; namespace ce { struct s { template <class bj> s(bj); }; struct t { bool c; }; t ci(void *, s); } template <bool ck> aj<ck> cl; template <typename> bool f; template <typename> constexpr bool destructible = n::ab ::c; template <typename cc> constexpr bool cp = destructible<cc>; template <typename cc> constexpr bool cq = cp<cc>; template <typename cc> constexpr bool copyable = cq<cc>; template <typename cc> constexpr bool cr = copyable<cc>; } namespace cs { using namespace ca; namespace ce { template <typename cy = decltype(0)> using da = cy; } template <typename> using da = ce::da<>; template <typename> bool db = ca::ce::ci(nullptr, [](auto g) -> decltype(cl<f<da<decltype(g)>>>) {}).c; template <typename cx> constexpr bool dd = cr<cx>; template <typename cx> constexpr bool de = dd<cx>; template <typename cx> constexpr bool h = de<cx>; template <typename cx> constexpr bool df = h<cx>; template <typename, typename di, typename> bool dj = db<di>; namespace ce { template <typename> struct H; } template <typename, typename dl> using dn = ce::H<dl>; template <typename cx> constexpr bool i = df<cx>; struct { template <typename cx, typename j, typename cc, typename k> auto operator()(cx, j, cc, k) -> cd<cx, aj<i<cx> && dj<int, dn<cx, k>, cc>>> { while (1); } template <typename l, typename cc, typename k> void operator()(l, cc p2, k u) { (*this)(0, 0, p2, u); } } o; } int p; void C::q() { cs::o(bq, p, [] {}); }