aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2011-07-17 02:34:10 +0000
committerJason Merrill <jason@gcc.gnu.org>2011-07-16 22:34:10 -0400
commit3d2f6864225cc660adfc9136c859dd26e2a40135 (patch)
tree8686f4122e795ce6ee0e3abdbf5a370034464f27 /gcc/testsuite
parentc6f4a801a697e19df5560fb79b91fe7ee77a1cca (diff)
downloadgcc-3d2f6864225cc660adfc9136c859dd26e2a40135.zip
gcc-3d2f6864225cc660adfc9136c859dd26e2a40135.tar.gz
gcc-3d2f6864225cc660adfc9136c859dd26e2a40135.tar.bz2
re PR c++/45329 (When printing a list of candidate functions, explain why each function failed to match.)
PR c++/45329 PR c++/48934 * cp-tree.h (fn_type_unification): Add `bool' parameter. * pt.c (enum template_base_result): Define. (unify_success, unify_unknown): Define. (unify_parameter_deduction_failure): Define. (unify_invalid, unify_cv_qual_mismatch, unify_type_mismatch): Define. (unify_parameter_pack_mismatch): Define. (unify_parameter_pack_inconsistent): Define. (unify_ptrmem_cst_mismatch, unify_vla_arg): Define. (unify_expression_unequal, unify_inconsistency): Define. (unify_method_type_error, unify_arity): Likewise. (unify_too_many_parameters, unify_too_few_parameters): Define. (unify_arg_conversion, unify_no_common_base): Define. (unify_illformed_ptrmem_cst_expr): Define. (unify_substitution_failure): Define. (unify_inconsistent_template_template_parameters): Define. (unify_template_deduction_failure): Define. (unify_template_argument_mismatch): Define. (unify_overload_resolution_failure): Define. (comp_template_args_with_info): New function, split out from... (comp_template_args): ...here. Call it. (deduction_tsubst_fntype): Add `complain' parameter'. Pass it to tsubst. (unify): Add `explain_p' parameter. Pass to all relevant calls. Call above status functions when appropriate. (resolve_overloaded_unification, try_one_overload): Likewise. (type_unification, type_unification_real): Likewise. (unify_pack_expansion): Likewise. (get_template_base, try_class_unification): Likewise. (get_bindings, more_specialized_fn): Pass false to unification calls. (get_class_bindings, do_auto_deduction): Likewise. (convert_nontype_argument): Likewise. (fn_type_unification): Likewise. Pass tf_warning_or_error if explain_p. (get_template_base): Add `explain_p' parameter and pass it to try_class_unification. Return an enum template_base_result. * class.c (resolve_address_of_overloaded_function): Pass false to fn_type_unification. * call.c (enum rejection_reason_code): Add new codes. (struct rejection_reason): Add template_unification field. Add template_instantiation field. (template_unification_rejection): Define. (template_unification_error_rejection): Define. (template_instantiation_rejection): Define. (invalid_copy_with_fn_template_rejection): Define. (add_template_candidate): Pass false to unify. Provide more rejection reasons when possible. (print_template_unification_rejection): Define. (print_arity_rejection): Define, split out from... (print_z_candidate): ...here. Add cases for new rejection reasons. Co-Authored-By: Jason Merrill <jason@redhat.com> From-SVN: r176365
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog58
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype29.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/error4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr15.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr31431-2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr31431.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr31434.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae11.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae26.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/temp_default2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/trailing4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-ex4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic105.C1
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-37737-2.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/vla2.C2
-rw-r--r--gcc/testsuite/g++.dg/other/ptrmem10.C2
-rw-r--r--gcc/testsuite/g++.dg/other/ptrmem11.C2
-rw-r--r--gcc/testsuite/g++.dg/overload/template5.C15
-rw-r--r--gcc/testsuite/g++.dg/overload/unknown1.C2
-rw-r--r--gcc/testsuite/g++.dg/template/conv11.C2
-rw-r--r--gcc/testsuite/g++.dg/template/deduce3.C4
-rw-r--r--gcc/testsuite/g++.dg/template/dependent-expr5.C32
-rw-r--r--gcc/testsuite/g++.dg/template/error45.C2
-rw-r--r--gcc/testsuite/g++.dg/template/friend.C2
-rw-r--r--gcc/testsuite/g++.dg/template/incomplete2.C2
-rw-r--r--gcc/testsuite/g++.dg/template/local4.C2
-rw-r--r--gcc/testsuite/g++.dg/template/local6.C2
-rw-r--r--gcc/testsuite/g++.dg/template/operator9.C2
-rw-r--r--gcc/testsuite/g++.dg/template/overload12.C17
-rw-r--r--gcc/testsuite/g++.dg/template/ptrmem2.C2
-rw-r--r--gcc/testsuite/g++.dg/template/sfinae2.C2
-rw-r--r--gcc/testsuite/g++.dg/template/ttp25.C6
-rw-r--r--gcc/testsuite/g++.dg/template/unify10.C24
-rw-r--r--gcc/testsuite/g++.dg/template/unify11.C2
-rw-r--r--gcc/testsuite/g++.dg/template/unify6.C2
-rw-r--r--gcc/testsuite/g++.dg/template/unify7.C2
-rw-r--r--gcc/testsuite/g++.dg/template/unify9.C2
-rw-r--r--gcc/testsuite/g++.dg/template/varmod1.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/crash56.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/crash28.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/crash60.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit41.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit77.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/expr2.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/spec5.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/spec6.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/unify4.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/unify6.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/unify8.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb98.C2
53 files changed, 176 insertions, 84 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 258128b..1c00214 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,61 @@
+2011-07-16 Nathan Froyd <froydnj@codesourcery.com>
+ Jason Merrill <jason@redhat.com>
+
+ PR c++/45329
+ PR c++/48934
+ * g++.dg/cpp0x/decltype29.C: Adjust.
+ * g++.dg/cpp0x/error4.C: Adjust.
+ * g++.dg/cpp0x/sfinae26.C: Adjust.
+ * g++.dg/cpp0x/variadic105.C: Adjust.
+ * g++.dg/template/deduce3.C: Adjust.
+ * g++.dg/template/error45.C: Adjust.
+ * g++.dg/template/ptrmem2.C: Adjust.
+ * g++.dg/template/sfinae2.C: Adjust.
+ * g++.old-deja/g++.pt/crash60.C: Adjust.
+ * g++.old-deja/g++.pt/unify6.C: Adjust.
+ * g++.dg/cpp0x/lambda/lambda-ice2.C: Adjust.
+ * g++.dg/cpp0x/nullptr15.C: Adjust.
+ * g++.dg/cpp0x/pr31431-2.C: Adjust.
+ * g++.dg/cpp0x/pr31431.C: Adjust.
+ * g++.dg/cpp0x/pr31434.C: Adjust.
+ * g++.dg/cpp0x/sfinae11.C: Adjust
+ * g++.dg/cpp0x/temp_default2.C: Adjust.
+ * g++.dg/cpp0x/trailing4.C: Adjust.
+ * g++.dg/cpp0x/variadic-ex3.C: Adjust.
+ * g++.dg/cpp0x/variadic-ex4.C: Adjust.
+ * g++.dg/cpp0x/variadic105.C: Adjust.
+ * g++.dg/cpp0x/vt-37737-2.C: Adjust.
+ * g++.dg/ext/vla2.C: Adjust.
+ * g++.dg/other/ptrmem10.C: Adjust.
+ * g++.dg/other/ptrmem11.C: Adjust.
+ * g++.dg/overload/unknown1.C: Adjust.
+ * g++.dg/template/conv11.C: Adjust.
+ * g++.dg/template/dependent-expr5.C: Adjust.
+ * g++.dg/template/friend.C: Adjust.
+ * g++.dg/template/incomplete2.C: Adjust.
+ * g++.dg/template/local4.C: Adjust.
+ * g++.dg/template/local6.C: Adjust.
+ * g++.dg/template/operator9.C: Adjust.
+ * g++.dg/template/ttp25.C: Adjust.
+ * g++.dg/template/unify10.C: Adjust.
+ * g++.dg/template/unify11.C: Adjust.
+ * g++.dg/template/unify6.C: Adjust.
+ * g++.dg/template/unify9.C: Adjust.
+ * g++.dg/template/varmod1.C: Adjust.
+ * g++.old-deja/g++.brendan/crash56.C: Adjust.
+ * g++.old-deja/g++.pt/crash28.C: Adjust.
+ * g++.old-deja/g++.pt/explicit41.C: Adjust.
+ * g++.old-deja/g++.pt/explicit77.C: Adjust.
+ * g++.old-deja/g++.pt/expr2.C: Adjust.
+ * g++.old-deja/g++.pt/ptrmem6.C: Adjust.
+ * g++.old-deja/g++.pt/spec5.C: Adjust.
+ * g++.old-deja/g++.pt/spec6.C: Adjust.
+ * g++.old-deja/g++.pt/unify4.C: Adjust.
+ * g++.old-deja/g++.pt/unify8.C: Adjust.
+ * g++.old-deja/g++.robertl/eb98.C: Adjust.
+ * g++.dg/overload/template5.C: New testcase.
+ * g++.dg/template/overload12.C: New testcase.
+
2011-07-11 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/coarray_14.f90: Remove dg-error "sorry not implemented".
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype29.C b/gcc/testsuite/g++.dg/cpp0x/decltype29.C
index 2bb79d0..70fe441 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype29.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype29.C
@@ -13,7 +13,7 @@ decltype (ft<F> (F()))
ft() {} // { dg-error "depth" }
int main() {
- ft<struct a*, 0>(); // { dg-error "no match" }
+ ft<struct a*, 0>(); // { dg-error "no match|wrong number" }
}
// { dg-prune-output "note" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/error4.C b/gcc/testsuite/g++.dg/cpp0x/error4.C
index 29a1cdd..064c2f2f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/error4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/error4.C
@@ -10,7 +10,7 @@ struct S {
static U get(const volatile T&);
template<typename U>
- static decltype(*declval<U>()) get(...);
+ static decltype(*declval<U>()) get(...); // { dg-error "operator*" }
typedef decltype(get<T>(declval<T>())) type; // { dg-error "no match" }
};
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice2.C
index 352137a..8d7d093 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice2.C
@@ -9,8 +9,9 @@ decltype(F()) run(F f) // { dg-message "note" }
int main()
{
- auto l = []() { return 5; };
+ auto l = []() { return 5; }; // { dg-error "lambda closure type" }
run(l); // { dg-error "no match" }
// { dg-message "candidate" "candidate note" { target *-*-* } 14 }
+ // { dg-error "use of deleted function" "candidate explanation" { target *-*-* } 5 }
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr15.C b/gcc/testsuite/g++.dg/cpp0x/nullptr15.C
index e02fd55..af661ec 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr15.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr15.C
@@ -17,10 +17,10 @@ void test_g()
// Deduction to nullptr_t, no deduction to pointer type
//
g(nullptr); // { dg-error "no matching function for call to " }
- // { dg-message "candidate" "candidate note" { target *-*-* } 19 }
+ // { dg-message "(candidate|mismatched types)" "candidate note" { target *-*-* } 19 }
type_equal<float*>(g((float*)nullptr));
decltype(nullptr) mynull = 0;
g(mynull); // { dg-error "no matching function for call to " }
- // { dg-message "candidate" "candidate note" { target *-*-* } 23 }
+ // { dg-message "(candidate|mismatched types)" "candidate note" { target *-*-* } 23 }
type_equal<float*>(g((float*)mynull));
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31431-2.C b/gcc/testsuite/g++.dg/cpp0x/pr31431-2.C
index 15efbc5..0764939 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr31431-2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr31431-2.C
@@ -4,5 +4,5 @@ template<typename, typename..., typename> void foo(); // { dg-message "note" }
void bar()
{
foo<int>(); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 6 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 6 }
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31431.C b/gcc/testsuite/g++.dg/cpp0x/pr31431.C
index 36f341f..afd3237 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr31431.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr31431.C
@@ -4,5 +4,5 @@ template<typename..., typename> void foo(); // { dg-message "note" }
void bar()
{
foo<int>(); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 6 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 6 }
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31434.C b/gcc/testsuite/g++.dg/cpp0x/pr31434.C
index 97ad079..5478616 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr31434.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr31434.C
@@ -8,5 +8,5 @@ template<typename... T> int foo(const T&) // { dg-error "not expanded with|T" }
void bar()
{
foo(0); // { dg-error "no matching" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 10 }
+ // { dg-message "(candidate|cannot convert)" "candidate note" { target *-*-* } 10 }
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae11.C b/gcc/testsuite/g++.dg/cpp0x/sfinae11.C
index 117b08b..e62c089 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae11.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae11.C
@@ -51,6 +51,6 @@ int main()
// static_assert( noexcept( f3(y) ), "shall be ill-formed(OK)." );
noexcept( f1(z) ); // { dg-message "required" }
- static_assert( noexcept( f2(z) ), "shall be ill-formed." ); // { dg-error "no match" }
+ static_assert( noexcept( f2(z) ), "shall be ill-formed." ); // { dg-error "no match|could not convert" }
noexcept( f3(z) ); // { dg-message "required" }
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae26.C b/gcc/testsuite/g++.dg/cpp0x/sfinae26.C
index 5b8cdd9..42b48eb 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae26.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae26.C
@@ -32,7 +32,7 @@ struct S {
template<class... U,
typename enable_if<and_<is_same<T, U>...>::value>::type*& = enabler
>
- S(U...){} // #
+ S(U...){} // { dg-error "no type named 'type'" }
};
S<bool> s(0); // { dg-error "no match" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/temp_default2.C b/gcc/testsuite/g++.dg/cpp0x/temp_default2.C
index fa2bb6a..dab1650 100644
--- a/gcc/testsuite/g++.dg/cpp0x/temp_default2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/temp_default2.C
@@ -8,7 +8,7 @@ void g()
f(1, 'c'); // f<int,char>(1,'c')
f(1); // f<int,double>(1,0)
f(); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 10 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 10 }
f<int>(); // f<int,double>(0,0)
f<int,char>(); // f<int,char>(0,0)
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/trailing4.C b/gcc/testsuite/g++.dg/cpp0x/trailing4.C
index d67b3b6..8d4baa9 100644
--- a/gcc/testsuite/g++.dg/cpp0x/trailing4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/trailing4.C
@@ -8,5 +8,5 @@ auto f(T,U) -> decltype(T() + U())
template<class T> void g(T){} // { dg-message "note" }
int main() { g(f); } // { dg-error "no matching function" }
-// { dg-message "candidate" "candidate note" { target *-*-* } 10 }
+// { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 10 }
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C
index bd97305..018eaa3 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C
@@ -4,8 +4,8 @@ void g()
{
int i = f<int>(5.6);
int j = f(5.6); // { dg-error "no matching" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 6 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 6 }
f<void>(f<int, bool>);
f<void>(f<int>); // { dg-error "no matching" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 9 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 9 }
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex4.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex4.C
index 5bf2116..0a777c4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-ex4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex4.C
@@ -8,6 +8,6 @@ void g()
f<int>("aa",3.0); // Y is deduced to be char*, and
// Z is deduced to be double
f("aa",3.0); // { dg-error "no matching" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 10 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 10 }
f2<char, short, int, long>(); // okay
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic105.C b/gcc/testsuite/g++.dg/cpp0x/variadic105.C
index 24d7e15..66387b2 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic105.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic105.C
@@ -21,4 +21,5 @@ struct call_sum {
int main() {
// This shouldn't be an error; this is bug 35722.
reverse<call_sum>(1,2); // { dg-bogus "no match" "" { xfail *-*-* } }
+ // { dg-bogus "sorry, unimplemented" "candidate explanation" { xfail *-*-* } 6 }
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-37737-2.C b/gcc/testsuite/g++.dg/cpp0x/vt-37737-2.C
index 2ff7e5b..5514259 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-37737-2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-37737-2.C
@@ -4,7 +4,7 @@ template<class U, class... T>
void f() // { dg-message "note" }
{
f<T...>(); // { dg-error "no matching" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 6 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 6 }
}
template<>
diff --git a/gcc/testsuite/g++.dg/ext/vla2.C b/gcc/testsuite/g++.dg/ext/vla2.C
index f6a9deb..3e83c8b 100644
--- a/gcc/testsuite/g++.dg/ext/vla2.C
+++ b/gcc/testsuite/g++.dg/ext/vla2.C
@@ -15,5 +15,5 @@ void bar(int i)
char d[i] ;
begin(d); // { dg-error "no matching function" "" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 17 }
+ // { dg-message "(candidate|valid template argument)" "candidate note" { target *-*-* } 17 }
}
diff --git a/gcc/testsuite/g++.dg/other/ptrmem10.C b/gcc/testsuite/g++.dg/other/ptrmem10.C
index bc386ed..a17df7f 100644
--- a/gcc/testsuite/g++.dg/other/ptrmem10.C
+++ b/gcc/testsuite/g++.dg/other/ptrmem10.C
@@ -13,7 +13,7 @@ template <class C>
static void
bar(C *c, void (C::*m) ())
{
- foo<C,m>((void *)c);// { dg-error "(not a valid template arg|pointer-to-member|no matching fun)" }
+ foo<C,m>((void *)c);// { dg-error "(not a valid template arg|pointer-to-member|no matching fun|could not convert)" }
// { dg-message "candidate" "candidate note" { target *-*-* } 16 }
}
diff --git a/gcc/testsuite/g++.dg/other/ptrmem11.C b/gcc/testsuite/g++.dg/other/ptrmem11.C
index 119cbb0..e73164e 100644
--- a/gcc/testsuite/g++.dg/other/ptrmem11.C
+++ b/gcc/testsuite/g++.dg/other/ptrmem11.C
@@ -14,7 +14,7 @@ template <typename T>
int
bar(int T::* p)
{
- return foo<p>(0);// { dg-error "(not a valid template arg|no matching func|pointer-to-member)" }
+ return foo<p>(0);// { dg-error "(not a valid template arg|no matching func|pointer-to-member|could not convert)" }
// { dg-message "candidate" "candidate note" { target *-*-* } 17 }
}
diff --git a/gcc/testsuite/g++.dg/overload/template5.C b/gcc/testsuite/g++.dg/overload/template5.C
new file mode 100644
index 0000000..b1dc65e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/overload/template5.C
@@ -0,0 +1,15 @@
+// { dg-do compile }
+
+template<typename T>
+int low(T a, T b, T c) { return a + b + c; } // { dg-message "template" }
+
+template<typename T>
+int high(T a, T b, T c) { return a + b + c; } // { dg-message "template" }
+
+int test (void)
+{
+ low (5, 6); // { dg-error "no matching function" }
+ // { dg-message "(candidate|3 arguments, 2 provided)" "" { target *-*-* } 11 }
+ high (5, 6, 7, 8); // { dg-error "no matching function" }
+ // { dg-message "(candidate|3 arguments, 4 provided)" "" { target *-*-* } 13 }
+}
diff --git a/gcc/testsuite/g++.dg/overload/unknown1.C b/gcc/testsuite/g++.dg/overload/unknown1.C
index 935f8d4..128c434 100644
--- a/gcc/testsuite/g++.dg/overload/unknown1.C
+++ b/gcc/testsuite/g++.dg/overload/unknown1.C
@@ -6,5 +6,5 @@ template <typename T> void bar(T f); // { dg-message "note" }
void baz() {
bar(foo); // { dg-error "<unresolved overloaded function type>" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 8 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 8 }
}
diff --git a/gcc/testsuite/g++.dg/template/conv11.C b/gcc/testsuite/g++.dg/template/conv11.C
index 57d06af..f08e756 100644
--- a/gcc/testsuite/g++.dg/template/conv11.C
+++ b/gcc/testsuite/g++.dg/template/conv11.C
@@ -7,5 +7,5 @@ struct A
int main()
{
A().operator int(); // { dg-error "operator int" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 9 }
+ // { dg-message "(candidate|mismatched types)" "candidate note" { target *-*-* } 9 }
}
diff --git a/gcc/testsuite/g++.dg/template/deduce3.C b/gcc/testsuite/g++.dg/template/deduce3.C
index e8a1d4e..c5d6e00 100644
--- a/gcc/testsuite/g++.dg/template/deduce3.C
+++ b/gcc/testsuite/g++.dg/template/deduce3.C
@@ -4,8 +4,8 @@ void f(int, T (*)() = 0); // { dg-message "note" }
void g() {
typedef int A[2];
f<A>(0); // { dg-error "" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 6 }
+ // { dg-error "returning an array" "candidate explanation" { target *-*-* } 2 }
typedef void F();
f<F>(0); // { dg-error "" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 9 }
+ // { dg-error "returning a function" "candidate explanation" { target *-*-* } 2 }
}
diff --git a/gcc/testsuite/g++.dg/template/dependent-expr5.C b/gcc/testsuite/g++.dg/template/dependent-expr5.C
index 1e850cd..af0dfb9 100644
--- a/gcc/testsuite/g++.dg/template/dependent-expr5.C
+++ b/gcc/testsuite/g++.dg/template/dependent-expr5.C
@@ -40,12 +40,12 @@ struct foo {
bind (&bar::baikt);
bind (&barf); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 42 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 42 }
bind (&foo::barf); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 44 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 44 }
bindm (&barf); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 47 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 47 }
bindm (&foo::barf);
bindn (&barf);
@@ -53,15 +53,15 @@ struct foo {
bindb (&barf);
bindb (&foo::barf); // { dg-error "ambiguous" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 55 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 55 }
bind (&bark); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 58 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 58 }
bind (&bar::bark); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 60 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 60 }
bindm (&bark); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 63 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 63 }
bindm (&bar::bark);
bindn (&bark);
@@ -69,7 +69,7 @@ struct foo {
bindb (&bark);
bindb (&bar::bark); // { dg-error "ambiguous" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 71 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 71 }
}
};
@@ -92,12 +92,12 @@ struct foo {
bind (&barT::baikt);
bind (&barf); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 94 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 94 }
bind (&foo::barf); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 96 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 96 }
bindm (&barf); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 99 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 99 }
bindm (&foo::barf);
bindn (&barf);
@@ -105,15 +105,15 @@ struct foo {
bindb (&barf);
bindb (&foo::barf); // { dg-error "ambiguous" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 107 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 107 }
bind (&bark); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 110 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 110 }
bind (&barT::bark); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 112 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 112 }
bindm (&bark); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 115 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 115 }
bindm (&barT::bark);
bindn (&bark);
@@ -121,7 +121,7 @@ struct foo {
bindb (&bark);
bindb (&barT::bark); // { dg-error "ambiguous" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 123 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 123 }
}
};
diff --git a/gcc/testsuite/g++.dg/template/error45.C b/gcc/testsuite/g++.dg/template/error45.C
index 454acc6..064554d 100644
--- a/gcc/testsuite/g++.dg/template/error45.C
+++ b/gcc/testsuite/g++.dg/template/error45.C
@@ -11,7 +11,7 @@ struct enable_if< true, T >
template < typename T >
struct enable_if< true, T >::type
-f( T x );
+f( T x ); // { dg-error "not a class type" }
void
g( void )
diff --git a/gcc/testsuite/g++.dg/template/friend.C b/gcc/testsuite/g++.dg/template/friend.C
index 44cbce9..e315a1a 100644
--- a/gcc/testsuite/g++.dg/template/friend.C
+++ b/gcc/testsuite/g++.dg/template/friend.C
@@ -26,5 +26,5 @@ int main()
{
s<int>::t y;
cout << y; // { dg-error "" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 28 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 28 }
}
diff --git a/gcc/testsuite/g++.dg/template/incomplete2.C b/gcc/testsuite/g++.dg/template/incomplete2.C
index d86ea06..b855569 100644
--- a/gcc/testsuite/g++.dg/template/incomplete2.C
+++ b/gcc/testsuite/g++.dg/template/incomplete2.C
@@ -9,6 +9,6 @@ A a; // { dg-error "incomplete type" }
void bar()
{
- foo<a>(); // { dg-error "no matching function" }
+ foo<a>(); // { dg-error "(no matching function|could not convert)" }
// { dg-message "candidate" "candidate note" { target *-*-* } 12 }
}
diff --git a/gcc/testsuite/g++.dg/template/local4.C b/gcc/testsuite/g++.dg/template/local4.C
index 9a03c9a..d842076 100644
--- a/gcc/testsuite/g++.dg/template/local4.C
+++ b/gcc/testsuite/g++.dg/template/local4.C
@@ -5,6 +5,6 @@ template <typename T> void foo() {} // { dg-message "note" }
int main () {
struct S {};
- foo<S> (); // { dg-error "match" }
+ foo<S> (); // { dg-error "(match|template argument for|trying to instantiate)" }
// { dg-message "candidate" "candidate note" { target *-*-* } 8 }
}
diff --git a/gcc/testsuite/g++.dg/template/local6.C b/gcc/testsuite/g++.dg/template/local6.C
index 777349a..3eb828f 100644
--- a/gcc/testsuite/g++.dg/template/local6.C
+++ b/gcc/testsuite/g++.dg/template/local6.C
@@ -5,7 +5,7 @@ template <class T> struct PCVector2 // { dg-message "note" }
PCVector2<T> operator- (const PCVector2<T> &ov) const
{
return PCVector2<T>(ov.xFIELD, ov.yFIELD); // { dg-error "matching" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 7 }
+ // { dg-message "(candidate|expects 1 argument, 2 provided|cannot convert)" "candidate note" { target *-*-* } 7 }
}
T xFIELD, yFIELD;
diff --git a/gcc/testsuite/g++.dg/template/operator9.C b/gcc/testsuite/g++.dg/template/operator9.C
index 35be778..46eef0a 100644
--- a/gcc/testsuite/g++.dg/template/operator9.C
+++ b/gcc/testsuite/g++.dg/template/operator9.C
@@ -5,6 +5,6 @@ template<operator+> void foo(); // { dg-error "before|non-function|template" }
void bar()
{
foo(); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 7 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 7 }
}
diff --git a/gcc/testsuite/g++.dg/template/overload12.C b/gcc/testsuite/g++.dg/template/overload12.C
new file mode 100644
index 0000000..656dcae
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/overload12.C
@@ -0,0 +1,17 @@
+// { dg-do compile }
+
+struct S {int x; int y;};
+template<typename T>
+int foo(T a, T b) {return a + b;} // { dg-message "template" }
+template<typename T, typename T2>
+int foo(T a, T2& b, T2 c) {return a + b;} // { dg-message "template" }
+int foo(char*, S&); // { dg-message "foo" }
+// { dg-message "candidate expects 2 arguments, 3 provided" "arity" { target *-*-* } 8 }
+
+int foo2(int x)
+{
+ S s={1,2};
+ char c;
+ foo(c, 2, c); // { dg-error "no matching function" }
+ // { dg-message "(candidate|deduced conflicting types for)" "candidate note" { target *-*-* } 15 }
+}
diff --git a/gcc/testsuite/g++.dg/template/ptrmem2.C b/gcc/testsuite/g++.dg/template/ptrmem2.C
index 1919047..5f03580 100644
--- a/gcc/testsuite/g++.dg/template/ptrmem2.C
+++ b/gcc/testsuite/g++.dg/template/ptrmem2.C
@@ -7,7 +7,7 @@
struct A {};
-template <typename T> T A::* Foo (); // { dg-message "note" }
+template <typename T> T A::* Foo (); // { dg-error "reference" }
void Baz ()
{
diff --git a/gcc/testsuite/g++.dg/template/sfinae2.C b/gcc/testsuite/g++.dg/template/sfinae2.C
index e39ca6b..c9e1031 100644
--- a/gcc/testsuite/g++.dg/template/sfinae2.C
+++ b/gcc/testsuite/g++.dg/template/sfinae2.C
@@ -8,7 +8,7 @@ template<int T> struct cl {
const static int value = T;
};
-template<int I> void fn (char (*) [cl<I>::value] = 0 ); // { dg-message "note" }
+template<int I> void fn (char (*) [cl<I>::value] = 0 ); // { dg-error "zero-size array" }
void foo (void)
{
diff --git a/gcc/testsuite/g++.dg/template/ttp25.C b/gcc/testsuite/g++.dg/template/ttp25.C
index 861d187..46762ae 100644
--- a/gcc/testsuite/g++.dg/template/ttp25.C
+++ b/gcc/testsuite/g++.dg/template/ttp25.C
@@ -18,12 +18,12 @@ void f4(T, C<5>); // { dg-message "note" }
template<int N> struct X {};
void g() {
f1(5l, X<5>()); // { dg-error "no matching" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 20 }
+ // { dg-message "(candidate|inconsistent with)" "candidate note" { target *-*-* } 20 }
f2(X<5>(), 5);
f3(X<5>(), 5l); // { dg-error "no matching" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 23 }
+ // { dg-message "(candidate|inconsistent with)" "candidate note" { target *-*-* } 23 }
f4(5, X<5>());
f4(5l, X<5>()); // { dg-error "no matching" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 26 }
+ // { dg-message "(candidate|inconsistent with)" "candidate note" { target *-*-* } 26 }
f4((short)5, X<5>());
}
diff --git a/gcc/testsuite/g++.dg/template/unify10.C b/gcc/testsuite/g++.dg/template/unify10.C
index 8dc434b..7f2fd53 100644
--- a/gcc/testsuite/g++.dg/template/unify10.C
+++ b/gcc/testsuite/g++.dg/template/unify10.C
@@ -26,34 +26,34 @@ void cvFunction(void (CLASS::* method)() const volatile) {} // { dg-message "not
int main() {
mFunction(&MyClass::mMethod);
mFunction(&MyClass::cMethod); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 28 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 28 }
mFunction(&MyClass::vMethod); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 30 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 30 }
mFunction(&MyClass::cvMethod); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 32 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 32 }
cFunction(&MyClass::mMethod); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 35 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 35 }
cFunction(&MyClass::cMethod);
cFunction(&MyClass::vMethod); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 38 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 38 }
cFunction(&MyClass::cvMethod); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 40 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 40 }
vFunction(&MyClass::mMethod); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 43 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 43 }
vFunction(&MyClass::cMethod); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 45 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 45 }
vFunction(&MyClass::vMethod);
vFunction(&MyClass::cvMethod); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 48 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 48 }
cvFunction(&MyClass::mMethod); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 51 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 51 }
cvFunction(&MyClass::cMethod); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 53 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 53 }
cvFunction(&MyClass::vMethod); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 55 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 55 }
cvFunction(&MyClass::cvMethod);
return 0;
diff --git a/gcc/testsuite/g++.dg/template/unify11.C b/gcc/testsuite/g++.dg/template/unify11.C
index ed6b31c..25606dc 100644
--- a/gcc/testsuite/g++.dg/template/unify11.C
+++ b/gcc/testsuite/g++.dg/template/unify11.C
@@ -20,7 +20,7 @@ struct B
C (U t)
{
A a;
- A b = foo (this, a, t); // { dg-error "no matching function" }
+ A b = foo (this, a, t); // { dg-error "(no matching function|is not a)" }
// { dg-message "candidate" "candidate note" { target *-*-* } 23 }
}
} c;
diff --git a/gcc/testsuite/g++.dg/template/unify6.C b/gcc/testsuite/g++.dg/template/unify6.C
index b12ecb2..551c96e 100644
--- a/gcc/testsuite/g++.dg/template/unify6.C
+++ b/gcc/testsuite/g++.dg/template/unify6.C
@@ -19,5 +19,5 @@ void Bar ()
Foo3 (&Baz);
Foo3 (&Baz, &Baz); // { dg-error "no matching function" "" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 21 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 21 }
}
diff --git a/gcc/testsuite/g++.dg/template/unify7.C b/gcc/testsuite/g++.dg/template/unify7.C
index 2bfa563..88d9fd9 100644
--- a/gcc/testsuite/g++.dg/template/unify7.C
+++ b/gcc/testsuite/g++.dg/template/unify7.C
@@ -11,5 +11,5 @@ int main()
{
Foo (f);
Baz (f); // { dg-error "no matching function" "" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 13 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 13 }
}
diff --git a/gcc/testsuite/g++.dg/template/unify9.C b/gcc/testsuite/g++.dg/template/unify9.C
index 40f6b92..f06f83a 100644
--- a/gcc/testsuite/g++.dg/template/unify9.C
+++ b/gcc/testsuite/g++.dg/template/unify9.C
@@ -14,5 +14,5 @@ const X *x;
int main () {
f (*x, &X::g); // { dg-error "no matching function" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 16 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 16 }
}
diff --git a/gcc/testsuite/g++.dg/template/varmod1.C b/gcc/testsuite/g++.dg/template/varmod1.C
index 6ae78d9..4ba1104 100644
--- a/gcc/testsuite/g++.dg/template/varmod1.C
+++ b/gcc/testsuite/g++.dg/template/varmod1.C
@@ -7,5 +7,5 @@ void bar()
int i;
int A[i][i];
foo(A); // { dg-error "" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 9 }
+ // { dg-message "(candidate|not a valid template argument)" "candidate note" { target *-*-* } 9 }
}
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash56.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash56.C
index a22615d..e3bff80 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/crash56.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash56.C
@@ -278,7 +278,7 @@ SetLD<T>::remove(const T& item)
Vix x;
for (first(x); 0 != x && this->REMOVE_CURRENT != a; next(x, a))
a = operator()(x) == item ? this->REMOVE_CURRENT: this->NORMAL; // { dg-error "" } .*
- // { dg-message "candidate" "candidate note" { target *-*-* } 280 }
+ // { dg-message "(candidate|not derived from)" "candidate note" { target *-*-* } 280 }
}
template<class T>
bool
@@ -287,7 +287,7 @@ SetLD<T>::contains(const T& item) const
Vix x;
for (first(x); 0 != x; next(x)) {
if (operator()(x) == item)// { dg-error "" } .*
- // { dg-message "candidate" "candidate note" { target *-*-* } 289 }
+ // { dg-message "(candidate|not derived from)" "candidate note" { target *-*-* } 289 }
return TRUE;
}
return FALSE;
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash28.C b/gcc/testsuite/g++.old-deja/g++.pt/crash28.C
index 2cfed93..81ed85a 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/crash28.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/crash28.C
@@ -11,5 +11,5 @@ void f(unsigned int n) {
int x[n];
asize(x); // { dg-error "" } no matching function
- // { dg-message "candidate" "candidate note" { target *-*-* } 13 }
+ // { dg-message "(candidate|not a valid template argument)" "candidate note" { target *-*-* } 13 }
}
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash60.C b/gcc/testsuite/g++.old-deja/g++.pt/crash60.C
index 1aad621..747af9b 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/crash60.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/crash60.C
@@ -7,7 +7,7 @@
template< typename SID, class SDR >
void k( SID sid, SDR* p,
void (SDR::*)
- ( typename SID::T ) ); // { dg-message "note" }
+ ( typename SID::T ) ); // { dg-error "no type named 'T'" }
struct E { };
struct S { void f( int ); };
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit41.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit41.C
index 560370a..c27d131 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/explicit41.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit41.C
@@ -1,6 +1,6 @@
// { dg-do assemble }
template <int I>
-void f(int i); // { dg-message "note" }
+void f(int i); // { dg-message "void f" }
void g()
{
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit77.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit77.C
index 1213a15..b97c1cd 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/explicit77.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit77.C
@@ -15,5 +15,5 @@ void g() {
f<0>(s0, s2);
f(s0, s2); // { dg-error "" } no matching function
- // { dg-message "candidate" "candidate note" { target *-*-* } 17 }
+ // { dg-message "(candidate|deduced conflicting types|ambiguous base class)" "candidate note" { target *-*-* } 17 }
}
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/expr2.C b/gcc/testsuite/g++.old-deja/g++.pt/expr2.C
index 0dcc65f..06d22d5 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/expr2.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/expr2.C
@@ -9,5 +9,5 @@ void foo(S<J + 2>); // { dg-message "note" }
void bar()
{
foo(S<3>()); // { dg-error "" } no way to deduce J from this.
- // { dg-message "candidate" "candidate note" { target *-*-* } 11 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 11 }
}
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C b/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C
index 85d3e73..8802e98 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C
@@ -13,9 +13,9 @@ public:
};
template <void (A::*)() >
-void g() {} // { dg-message "note" }
+void g() {} // { dg-message "void g" }
template <int A::*>
-void h() {} // { dg-message "note" }
+void h() {} // { dg-message "void h" }
int main() {
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/spec5.C b/gcc/testsuite/g++.old-deja/g++.pt/spec5.C
index df7112a..96e8cf9 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/spec5.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/spec5.C
@@ -14,9 +14,9 @@ template void g(int i, int j);
void h()
{
f(3, 'c'); // { dg-error "" } no matching function
- // { dg-message "candidate" "candidate note" { target *-*-* } 16 }
+ // { dg-message "(candidate|deduced conflicting types)" "candidate note" { target *-*-* } 16 }
g(3, 'c'); // { dg-error "" } no matching function
- // { dg-message "candidate" "candidate note" { target *-*-* } 18 }
+ // { dg-message "(candidate|deduced conflicting types)" "candidate note" { target *-*-* } 18 }
}
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/spec6.C b/gcc/testsuite/g++.old-deja/g++.pt/spec6.C
index fc19c3c..b8f6673 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/spec6.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/spec6.C
@@ -25,9 +25,9 @@ void h()
{
S1 s1;
s1.f(3, 'c'); // { dg-error "" } no matching function
- // { dg-message "candidate" "candidate note" { target *-*-* } 27 }
+ // { dg-message "(candidate|deduced conflicting types)" "candidate note" { target *-*-* } 27 }
S2<char> s2;
s2.f(3, 'c'); // { dg-error "" } no matching function
- // { dg-message "candidate" "candidate note" { target *-*-* } 31 }
+ // { dg-message "(candidate|deduced conflicting types)" "candidate note" { target *-*-* } 31 }
}
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/unify4.C b/gcc/testsuite/g++.old-deja/g++.pt/unify4.C
index 6dd9961..9285b21 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/unify4.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/unify4.C
@@ -8,6 +8,6 @@ int
main ()
{
f (g); // { dg-error "" } ambiguous unification
- // { dg-message "candidate" "candidate note" { target *-*-* } 10 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 10 }
return 0;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/unify6.C b/gcc/testsuite/g++.old-deja/g++.pt/unify6.C
index 0e5c034..a6f7674 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/unify6.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/unify6.C
@@ -19,7 +19,7 @@ template<> void fn<int &>() {} // ok, specialize A
template<> void fn<void ()>() {} // ok, specialize A
// now make sure we moan when we really should
-template<class T> void foo(T const *){} // { dg-message "note" }
+template<class T> void foo(T const *){} // { dg-error "pointer to reference" }
void f()
{
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/unify8.C b/gcc/testsuite/g++.old-deja/g++.pt/unify8.C
index 3209260..3a86d97 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/unify8.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/unify8.C
@@ -16,6 +16,6 @@ void Foo (float); // { dg-message "note" } candidate
void baz (int **p1)
{
Foo (p1); // { dg-error "match" } no such function
- // { dg-message "candidate" "candidate note" { target *-*-* } 18 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 18 }
Bar (p1); // OK
}
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb98.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb98.C
index c562031..410a336 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb98.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb98.C
@@ -15,5 +15,5 @@
void f()
{
extent(b); // { dg-error "" } no matching function
- // { dg-message "candidate" "candidate note" { target *-*-* } 17 }
+ // { dg-message "(candidate|mismatched types)" "candidate note" { target *-*-* } 17 }
}