diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/crash6.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/crash6.C | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash6.C b/gcc/testsuite/g++.old-deja/g++.pt/crash6.C new file mode 100644 index 000000000..34bd56409 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/crash6.C @@ -0,0 +1,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(); +} |