OSDN Git Service

9d6af1dfe879318dd522138ef4246da6badf3e9c
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.other / crash24.C
1 // { dg-do assemble  }
2 // Origin: Jakub Jelinek <jakub@redhat.com>
3
4 class foo {
5  public:
6    class __iterator;
7    friend class __iterator;
8    typedef __iterator const_iterator;
9    virtual ~foo() { }
10    __iterator begin();                          // { dg-message "candidates" } 
11 };
12 static void iteratorTest(const foo &x)
13 {
14    foo::const_iterator i = x.begin();           // { dg-error "incomplete type" "incomplete type" } 
15    // { dg-error "no matching" "no matching" { target *-*-* } 14 }
16    for (; i; ++i)
17       *i;
18 }