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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |jason at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Differently reduced testcase that succeeds with 7.x and fails with 8.x+ below.
Started with r254843.

template <int a> struct f {
  static constexpr int d = a;
  typedef int e;
};
template <typename b> b aa;
template <typename g, g...> struct h { using i = h; };
template <typename g, g, typename, typename> struct ab;
template <typename g, g j, g... k> struct ab<g, j, f<j>, h<g, k...>> : h<g> {};
template <typename g, g j, g l, g... k>
struct ab<g, j, f<l>, h<g, k...>> : ab<g, j, f<l - 1>, h<g>> {};
template <typename g, g j, g m> using n = typename ab<g, j, f<j + m>, h<g>>::i;
template <typename g, g m> using o = n<g, 0, m>;
class p;
template <typename, template <unsigned long> class, typename r, typename s>
auto t(s, r) -> p;
template <typename ac, template <unsigned long> class q, typename... r>
auto v(r...) -> decltype(t<ac, q>(o<typename ac::e, ac::d>(), aa<r>...));
int w, ad;
struct p {
  template <unsigned long> struct ae;
  static auto af() { v<f<3>, ae>(w); }
};
template <typename...> struct ah;
template <typename ai, typename... r> using aj = typename ah<ai, r...>::i;
template <typename ak, typename am, typename an, typename... r>
auto ag(am, an, r...) -> aj<ak, r...>;
template <typename> struct ao;
template <typename ap, typename aq> void ar(ap y, aq) { ao<aq>::ar(y, aq()); }
template <typename, typename, typename, typename...> class z;
template <typename, typename> class as;
template <typename ac, typename al, typename an, typename... r>
struct ah<as<ac, al>, an, r...> {
  using i = z<ac, r...>;
};
template <typename aq> struct ao {
  static auto ar(int, aq at) { at(); }
};
template <typename au, typename av> void aw(au, av) { auto c(p::af); }
template <typename au, typename av> void ax(au y, av at) { aw(y, at); }
template <typename, typename, typename, typename...> struct z {
  void operator()() {
    auto ay(this);
    ax(ay, [] {});
  }
};
template <typename az, typename ba, typename... bb>
void bc(az y, ba at, bb... bd) {
  auto be(ag<as<f<3>, int>>(y, bd...));
  ar(at, be);
}
template <unsigned> class bf;
struct bg {
  template <class bh, unsigned bi> int bj(bf<bi> &, const bh &);
};
template <unsigned> class bf {
protected:
  bf(int, int);
};
template <class, unsigned, bool> class bk;
template <int bl> struct bm {
  bm(bf<bl>, int);
};
template <class bn, unsigned bl> struct bk<bn, bl, true> : bm<bl> {
  bk(bf<bl> y, bn at) : bm<bl>(y, at) {
    int bo, cj = 0, bp, x, bq(0);
    bc(bp, x, bq, cj, at, bo);
  }
};
template <class bh, unsigned bi> int bg::bj(bf<bi> &y, const bh &at) {
  enum { br = 0 <= 8 };
  bk<bh, bi, br>(y, at);
  return 0;
}
struct bs {
  bs(int);
};
template <int bi> struct bt : bf<bi> {
  bt(int y, bool) : bf<bi>(y, y) {}
  int u;
  virtual void bu() { bg().bj(*this, u); }
};
template <unsigned> struct bv {
  bv(const int &, bool);
};
template <unsigned bl> bv<bl>::bv(const int &y, bool at) { bt<bl>(y, at); }
template <int bi> struct bw : bv<bi> {
  bw(bool y) : bv<bi>(0, y) {}
};
class bx : bs {
  bx();
};
bx::bx() : bs(ad) { bw<3>(0); }

Reply via email to