summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/crash24.C
blob: b1fa01c9b49e9b814de812057b231eb74bf99a05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// { dg-do assemble  }
// Origin: Jakub Jelinek <jakub@redhat.com>

class foo {
 public:
   class __iterator;
   friend class __iterator;
   typedef __iterator const_iterator;
   virtual ~foo() { }
   __iterator begin();				// { dg-message "foo::begin|no known conversion for implicit" } 
};
static void iteratorTest(const foo &x)
{
   foo::const_iterator i = x.begin();		// { dg-error "incomplete type" "incomplete type" } 
   // { dg-message "candidate" "candidate note" { target *-*-* } 14 }
   // { dg-error "no matching" "no matching" { target *-*-* } 14 }
   for (; i; ++i)
      *i;
}