summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/crash56.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/template/crash56.C')
-rw-r--r--gcc/testsuite/g++.dg/template/crash56.C16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/crash56.C b/gcc/testsuite/g++.dg/template/crash56.C
new file mode 100644
index 000000000..03bddf42a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/crash56.C
@@ -0,0 +1,16 @@
+// Origin: Wolfgang Bangerth <bangerth@dealii.org>
+
+// PR c++/28705
+// DR 218 is debating whether this is well formed or not. We've never
+// accepted it (because we'd crash), so we continue to reject it, but
+// without crashing.
+
+namespace N
+{
+ struct A { A (A*); };
+}
+
+template<typename T> void g (N::A *p)
+{
+ (void) A (p); // { dg-message "" "" }
+}