[PR c++/84702] ICE with default tmpl arg of overload set
[official-gcc.git] / gcc / testsuite / g++.dg / pr82128.C
blob98bb27adf9d532722f1fc3bed4b7149c246d63f3
1 // { dg-do compile }
2 // { dg-options "-O3 -fno-tree-forwprop" }
4 class A {
5       virtual unsigned long m_fn1() const;
6         virtual int &m_fn2(unsigned long) const;
7 };
8 class C : A {
9 public:
10       int &m_fn2(unsigned long) const;
11         unsigned long m_fn1() const;
13 class B {
14       void m_fn3(const A &, const int &, const C &, int &) const;
16 void B::m_fn3(const A &, const int &, const C &, int &) const {
17       C &a(a);
18         for (long b = 0; a.m_fn1(); b++)
19               a.m_fn2(0);