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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Adjusted testcase that ICEs already starting with the r10-7243 commit, again
-O2 -flto:
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::template
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, [] {}); }

The difference from the #c0 testcase is:
-template <typename by, typename... bj> using bz = typename by::bz<bj...>;
+template <typename by, typename... bj> using bz = typename by::template
bz<bj...>;

Reply via email to