view gcc/testsuite/g++.dg/opt/pr87967.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
line wrap: on
line source

// { dg-do compile { target c++11 } }
// { dg-options "-O3" }

void h();
template <typename b> struct k { using d = b; };
template <typename b, template <typename> class> using e = k<b>;
template <typename b, template <typename> class f>
using g = typename e<b, f>::d;
struct l {
  template <typename i> using ab = typename i::j;
};
struct n : l {
  using j = g<char *, ab>;
};
class o {
public:
  long r();
};
char m;
char s() {
  if (m)
    return '0';
  return 'A';
}
class t {
public:
  typedef char *ad;
  ad m_fn2();
};
void fn3() {
  char *a;
  t b;
  bool p = false;
  while (*a) {
    h();
    o c;
    if (*a)
      a++;
    if (c.r()) {
      n::j q;
      for (t::ad d = b.m_fn2(), e; d != e; d++) {
        char f = *q;
        *d = f + s();
      }
      p = true;
    }
  }
  if (p)
    throw;
}