summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/crash6.C
blob: 34bd56409aefcda98141a4f1dff4a14315509aa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// { dg-do assemble  }

template <class T> class List;
 
template <class T>
struct ListIterator
{
  ListIterator ();
  ListIterator (const ListIterator<T>& rhs);
};

template <class T>
struct List
{
  void length () const {
    for (ListIterator<T> li; li; ); // { dg-error "" } used where a `bool'
  }
};

void test(List<int>& vals)
{
  vals.length();
}