summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/crash20.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/template/crash20.C')
-rw-r--r--gcc/testsuite/g++.dg/template/crash20.C20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/crash20.C b/gcc/testsuite/g++.dg/template/crash20.C
new file mode 100644
index 000000000..0492b72e3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/crash20.C
@@ -0,0 +1,20 @@
+// { dg-do compile }
+
+// Copyright (C) 2004 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 22 Jul 2004 <nathan@codesourcery.com>
+
+// ICE with incompletable type.
+
+class INC;
+
+template <typename T> class B {};
+
+template<typename T> void Foo (B<T> &);
+
+void Foo (INC &);
+
+void Baz (INC *p)
+{
+ Foo (*p);
+}
+