summaryrefslogtreecommitdiff
path: root/gcc_arm/testsuite/g++.old-deja/g++.pt/crash6.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc_arm/testsuite/g++.old-deja/g++.pt/crash6.C')
-rwxr-xr-xgcc_arm/testsuite/g++.old-deja/g++.pt/crash6.C23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/crash6.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash6.C
new file mode 100755
index 0000000..09e8df0
--- /dev/null
+++ b/gcc_arm/testsuite/g++.old-deja/g++.pt/crash6.C
@@ -0,0 +1,23 @@
+// Build don't link:
+
+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; ); // ERROR - used where a `bool'
+ }
+};
+
+void test(List<int>& vals)
+{
+ vals.length(); // ERROR - instantiated from here
+}