aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/crash9.C
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2003-09-05 18:04:21 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2003-09-05 18:04:21 +0000
commitceeae2d125cce0f03ad7d47f62c3f82ff2af78fd (patch)
tree6985ef10a548d692a06e263e44d798c0302163e0 /gcc/testsuite/g++.dg/template/crash9.C
parent3f8dc57bd287c4086eaa9a2b9d185ec22b459fb7 (diff)
re PR c++/12163 (static_cast + explicit ctor regression)
PR c++/12163 * call.c (perform_direct_initialization): Correct logic for direct-initialization of a class type. PR c++/12146 * pt.c (lookup_template_function): Robustify. PR c++/12163 * g++.dg/expr/static_cast4.C: New test. PR c++/12146 * g++.dg/template/crash9.C: New test. From-SVN: r71115
Diffstat (limited to 'gcc/testsuite/g++.dg/template/crash9.C')
-rw-r--r--gcc/testsuite/g++.dg/template/crash9.C12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/crash9.C b/gcc/testsuite/g++.dg/template/crash9.C
new file mode 100644
index 00000000000..7a568fe054a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/crash9.C
@@ -0,0 +1,12 @@
+struct A { };
+struct B { };
+
+A f(const B & b) {
+ return A();
+}
+
+template<>
+B f(const A & a) { // { dg-error "" }
+ return B();
+}
+