diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e8329c1c4ad914900ed05e84c8aa1993ca1200d6..f5bddffa7aac933ef43351034848757e9b906eec 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,37 @@ +2010-12-08 Nathan Froyd <froydnj@codesourcery.com> + + PR c++/45329 + * call.c (struct conversion): Document bad_p field. + (enum rejection_reason_code): Define. + (struct conversion_info): Define. + (struct rejection_reason): Define. + (struct z_candidate): Add `reason' field. + (add_candidate): Add `reason' parameter. Store it in CAND. + (alloc_rejection, arity_rejection, arg_conversion_rejection): + New functions. + (bad_arg_conversion_rejection): New function. + (convert_class_to_reference): Add comment. + (remaining_arguments): New function. + (add_function_candidate): Record rejection reason and pass it to + add_candidate. + (add_conv_candidate, build_builtin_candidate): Likewise. + (add_template_candidate_real): Likewise. + (print_conversion_rejection): New function. + (print_z_candidate): Print CAND->REASON if it exists. Adjust + diagnostic strings. + (print_z_candidates): Add location_t argument. Adjust calling + sequence for print_z_candidate. Print header line directly. + (build_user_type_conversion_1): Add reason for rejection to + CAND. Adjust call to print_z_candidates. + (print_error_for_call_failure): New function. + (build_new_function_call): Call it. Adjust call to + print_z_candidates. + (build_operator_new_call): Likewise. + (build_op_call): Likewise. + (build_conditional_expr): Likewise. + (build_new_op): Likewise. + (build_new_method_call): Likewise. + 2010-12-08 Jason Merrill <jason@redhat.com> PR c++/45822 diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 1e0b328a1b0a7dbe118d4d7c3ae548e74f3be280..9c9f6484c8363272863371b1b28592c9bc7990b5 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -85,6 +85,9 @@ struct conversion { BOOL_BITFIELD user_conv_p : 1; BOOL_BITFIELD ellipsis_p : 1; BOOL_BITFIELD this_p : 1; + /* True if this conversion would be permitted with a bending of + language standards, e.g. disregarding pointer qualifiers or + converting integers to pointers. */ BOOL_BITFIELD bad_p : 1; /* If KIND is ck_ref_bind ck_base_conv, true to indicate that a temporary should be created to hold the result of the @@ -130,6 +133,7 @@ struct conversion { static struct obstack conversion_obstack; static bool conversion_obstack_initialized; +struct rejection_reason; static struct z_candidate * tourney (struct z_candidate *); static int equal_functions (tree, tree); @@ -152,7 +156,7 @@ static void op_error (enum tree_code, enum tree_code, tree, tree, static VEC(tree,gc) *resolve_args (VEC(tree,gc) *); static struct z_candidate *build_user_type_conversion_1 (tree, tree, int); static void print_z_candidate (const char *, struct z_candidate *); -static void print_z_candidates (struct z_candidate *); +static void print_z_candidates (location_t, struct z_candidate *); static tree build_this (tree); static struct z_candidate *splice_viable (struct z_candidate *, bool, bool *); static bool any_strictly_viable (struct z_candidate *); @@ -191,7 +195,7 @@ static conversion *maybe_handle_ref_bind (conversion **); static void maybe_handle_implicit_object (conversion **); static struct z_candidate *add_candidate (struct z_candidate **, tree, tree, const VEC(tree,gc) *, size_t, - conversion **, tree, tree, int); + conversion **, tree, tree, int, struct rejection_reason *); static tree source_type (conversion *); static void add_warning (struct z_candidate *, struct z_candidate *); static bool reference_compatible_p (tree, tree); @@ -417,6 +421,43 @@ struct candidate_warning { candidate_warning *next; }; +/* Information for providing diagnostics about why overloading failed. */ + +enum rejection_reason_code { + rr_none, + rr_arity, + rr_arg_conversion, + rr_bad_arg_conversion +}; + +struct conversion_info { + /* The index of the argument, 0-based. */ + int n_arg; + /* The type of the actual argument. */ + tree from_type; + /* The type of the formal argument. */ + tree to_type; +}; + +struct rejection_reason { + enum rejection_reason_code code; + union { + /* Information about an arity mismatch. */ + struct { + /* The expected number of arguments. */ + int expected; + /* The actual number of arguments in the call. */ + int actual; + /* Whether the call was a varargs call. */ + bool call_varargs_p; + } arity; + /* Information about an argument conversion mismatch. */ + struct conversion_info conversion; + /* Same, but for bad argument conversions. */ + struct conversion_info bad_conversion; + } u; +}; + struct z_candidate { /* The FUNCTION_DECL that will be called if this candidate is selected by overload resolution. */ @@ -438,6 +479,7 @@ struct z_candidate { type. */ conversion *second_conv; int viable; + struct rejection_reason *reason; /* If FN is a member function, the binfo indicating the path used to qualify the name of FN at the call site. This path is used to determine whether or not FN is accessible if it is selected by @@ -519,6 +561,49 @@ conversion_obstack_alloc (size_t n) return p; } +/* Allocate rejection reasons. */ + +static struct rejection_reason * +alloc_rejection (enum rejection_reason_code code) +{ + struct rejection_reason *p; + p = (struct rejection_reason *) conversion_obstack_alloc (sizeof *p); + p->code = code; + return p; +} + +static struct rejection_reason * +arity_rejection (tree first_arg, int expected, int actual) +{ + struct rejection_reason *r = alloc_rejection (rr_arity); + int adjust = first_arg != NULL_TREE; + r->u.arity.expected = expected - adjust; + r->u.arity.actual = actual - adjust; + return r; +} + +static struct rejection_reason * +arg_conversion_rejection (tree first_arg, int n_arg, tree from, tree to) +{ + struct rejection_reason *r = alloc_rejection (rr_arg_conversion); + int adjust = first_arg != NULL_TREE; + r->u.conversion.n_arg = n_arg - adjust; + r->u.conversion.from_type = from; + r->u.conversion.to_type = to; + return r; +} + +static struct rejection_reason * +bad_arg_conversion_rejection (tree first_arg, int n_arg, tree from, tree to) +{ + struct rejection_reason *r = alloc_rejection (rr_bad_arg_conversion); + int adjust = first_arg != NULL_TREE; + r->u.bad_conversion.n_arg = n_arg - adjust; + r->u.bad_conversion.from_type = from; + r->u.bad_conversion.to_type = to; + return r; +} + /* Dynamically allocate a conversion. */ static conversion * @@ -1148,6 +1233,10 @@ convert_class_to_reference (tree reference_type, tree s, tree expr, int flags) if (TREE_CODE (t2) != REFERENCE_TYPE || !reference_compatible_p (t, TREE_TYPE (t2))) { + /* No need to set cand->reason here; this is most likely + an ambiguous match. If it's not, either this candidate + will win, or we will have identified a reason for it + losing already. */ cand->viable = 0; } else @@ -1558,7 +1647,7 @@ add_candidate (struct z_candidate **candidates, tree fn, tree first_arg, const VEC(tree,gc) *args, size_t num_convs, conversion **convs, tree access_path, tree conversion_path, - int viable) + int viable, struct rejection_reason *reason) { struct z_candidate *cand = (struct z_candidate *) conversion_obstack_alloc (sizeof (struct z_candidate)); @@ -1571,12 +1660,28 @@ add_candidate (struct z_candidate **candidates, cand->access_path = access_path; cand->conversion_path = conversion_path; cand->viable = viable; + cand->reason = reason; cand->next = *candidates; *candidates = cand; return cand; } +/* Return the number of remaining arguments in the parameter list + beginning with ARG. */ + +static int +remaining_arguments (tree arg) +{ + int n; + + for (n = 0; arg != NULL_TREE && arg != void_list_node; + arg = TREE_CHAIN (arg)) + n++; + + return n; +} + /* Create an overload candidate for the function or method FN called with the argument list FIRST_ARG/ARGS and add it to CANDIDATES. FLAGS is passed on to implicit_conversion. @@ -1599,6 +1704,7 @@ add_function_candidate (struct z_candidate **candidates, tree orig_first_arg = first_arg; int skip; int viable = 1; + struct rejection_reason *reason = NULL; /* At this point we should not see any functions which haven't been explicitly declared, except for friend functions which will have @@ -1638,13 +1744,13 @@ add_function_candidate (struct z_candidate **candidates, parmnode = TREE_CHAIN (parmnode); } - if (i < len && parmnode) - viable = 0; - - /* Make sure there are default args for the rest of the parms. */ - else if (!sufficient_parms_p (parmnode)) - viable = 0; - + if ((i < len && parmnode) + || !sufficient_parms_p (parmnode)) + { + int remaining = remaining_arguments (parmnode); + viable = 0; + reason = arity_rejection (first_arg, i + remaining, len); + } /* When looking for a function from a subobject from an implicit copy/move constructor/operator=, don't consider anything that takes (a reference to) an unrelated type. See c++/44909 and core 1092. */ @@ -1680,7 +1786,7 @@ add_function_candidate (struct z_candidate **candidates, for (i = 0; i < len; ++i) { - tree arg, argtype; + tree arg, argtype, to_type; conversion *t; int is_this; @@ -1747,11 +1853,13 @@ add_function_candidate (struct z_candidate **candidates, t = implicit_conversion (parmtype, argtype, arg, /*c_cast_p=*/false, lflags); + to_type = parmtype; } else { t = build_identity_conv (argtype, arg); t->ellipsis_p = true; + to_type = argtype; } if (t && is_this) @@ -1761,16 +1869,20 @@ add_function_candidate (struct z_candidate **candidates, if (! t) { viable = 0; + reason = arg_conversion_rejection (first_arg, i, argtype, to_type); break; } if (t->bad_p) - viable = -1; + { + viable = -1; + reason = bad_arg_conversion_rejection (first_arg, i, argtype, to_type); + } } out: return add_candidate (candidates, fn, orig_first_arg, args, len, convs, - access_path, conversion_path, viable); + access_path, conversion_path, viable, reason); } /* Create an overload candidate for the conversion function FN which will @@ -1794,6 +1906,7 @@ add_conv_candidate (struct z_candidate **candidates, tree fn, tree obj, int i, len, viable, flags; tree parmlist, parmnode; conversion **convs; + struct rejection_reason *reason; for (parmlist = totype; TREE_CODE (parmlist) != FUNCTION_TYPE; ) parmlist = TREE_TYPE (parmlist); @@ -1804,6 +1917,7 @@ add_conv_candidate (struct z_candidate **candidates, tree fn, tree obj, parmnode = parmlist; viable = 1; flags = LOOKUP_IMPLICIT; + reason = NULL; /* Don't bother looking up the same type twice. */ if (*candidates && (*candidates)->fn == totype) @@ -1811,7 +1925,7 @@ add_conv_candidate (struct z_candidate **candidates, tree fn, tree obj, for (i = 0; i < len; ++i) { - tree arg, argtype; + tree arg, argtype, convert_type = NULL_TREE; conversion *t; if (i == 0) @@ -1824,17 +1938,24 @@ add_conv_candidate (struct z_candidate **candidates, tree fn, tree obj, argtype = lvalue_type (arg); if (i == 0) - t = implicit_conversion (totype, argtype, arg, /*c_cast_p=*/false, - flags); + { + t = implicit_conversion (totype, argtype, arg, /*c_cast_p=*/false, + flags); + convert_type = totype; + } else if (parmnode == void_list_node) break; else if (parmnode) - t = implicit_conversion (TREE_VALUE (parmnode), argtype, arg, - /*c_cast_p=*/false, flags); + { + t = implicit_conversion (TREE_VALUE (parmnode), argtype, arg, + /*c_cast_p=*/false, flags); + convert_type = TREE_VALUE (parmnode); + } else { t = build_identity_conv (argtype, arg); t->ellipsis_p = true; + convert_type = argtype; } convs[i] = t; @@ -1842,7 +1963,10 @@ add_conv_candidate (struct z_candidate **candidates, tree fn, tree obj, break; if (t->bad_p) - viable = -1; + { + viable = -1; + reason = bad_arg_conversion_rejection (NULL_TREE, i, argtype, convert_type); + } if (i == 0) continue; @@ -1851,14 +1975,16 @@ add_conv_candidate (struct z_candidate **candidates, tree fn, tree obj, parmnode = TREE_CHAIN (parmnode); } - if (i < len) - viable = 0; - - if (!sufficient_parms_p (parmnode)) - viable = 0; + if (i < len + || ! sufficient_parms_p (parmnode)) + { + int remaining = remaining_arguments (parmnode); + viable = 0; + reason = arity_rejection (NULL_TREE, i + remaining, len); + } return add_candidate (candidates, totype, first_arg, arglist, len, convs, - access_path, conversion_path, viable); + access_path, conversion_path, viable, reason); } static void @@ -1871,6 +1997,7 @@ build_builtin_candidate (struct z_candidate **candidates, tree fnname, size_t num_convs; int viable = 1, i; tree types[2]; + struct rejection_reason *reason = NULL; types[0] = type1; types[1] = type2; @@ -1898,9 +2025,13 @@ build_builtin_candidate (struct z_candidate **candidates, tree fnname, viable = 0; /* We need something for printing the candidate. */ t = build_identity_conv (types[i], NULL_TREE); + reason = arg_conversion_rejection (NULL_TREE, i, argtypes[i], types[i]); } else if (t->bad_p) - viable = 0; + { + viable = 0; + reason = bad_arg_conversion_rejection (NULL_TREE, i, argtypes[i], types[i]); + } convs[i] = t; } @@ -1914,14 +2045,18 @@ build_builtin_candidate (struct z_candidate **candidates, tree fnname, if (t) convs[0] = t; else - viable = 0; + { + viable = 0; + reason = arg_conversion_rejection (NULL_TREE, 0, argtypes[2], + boolean_type_node); + } } add_candidate (candidates, fnname, /*first_arg=*/NULL_TREE, /*args=*/NULL, num_convs, convs, /*access_path=*/NULL_TREE, /*conversion_path=*/NULL_TREE, - viable); + viable, reason); } static bool @@ -2573,6 +2708,7 @@ add_template_candidate_real (struct z_candidate **candidates, tree tmpl, struct z_candidate *cand; int i; tree fn; + struct rejection_reason *reason = NULL; /* We don't do deduction on the in-charge parameter, the VTT parameter or 'this'. */ @@ -2691,7 +2827,7 @@ add_template_candidate_real (struct z_candidate **candidates, tree tmpl, return cand; fail: return add_candidate (candidates, tmpl, first_arg, arglist, nargs, NULL, - access_path, conversion_path, 0); + access_path, conversion_path, 0, reason); } @@ -2802,6 +2938,20 @@ equal_functions (tree fn1, tree fn2) return fn1 == fn2; } +/* Print information about a candidate being rejected due to INFO. */ + +static void +print_conversion_rejection (location_t loc, struct conversion_info *info) +{ + if (info->n_arg == -1) + /* Conversion of implicit `this' argument failed. */ + inform (loc, "no known conversion for implicit %<this%> parameter from %qT to %qT", + info->from_type, info->to_type); + else + inform (loc, "no known conversion for argument %d from %qT to %qT", + info->n_arg+1, info->from_type, info->to_type); +} + /* Print information about one overload candidate CANDIDATE. MSGSTR is the text to print before the candidate itself. @@ -2812,38 +2962,68 @@ equal_functions (tree fn1, tree fn2) static void print_z_candidate (const char *msgstr, struct z_candidate *candidate) { + const char *msg = (msgstr == NULL + ? "" + : ACONCAT ((msgstr, " ", NULL))); + location_t loc = location_of (candidate->fn); + if (TREE_CODE (candidate->fn) == IDENTIFIER_NODE) { if (candidate->num_convs == 3) - inform (input_location, "%s %D(%T, %T, %T) <built-in>", msgstr, candidate->fn, + inform (input_location, "%s%D(%T, %T, %T) <built-in>", msg, candidate->fn, candidate->convs[0]->type, candidate->convs[1]->type, candidate->convs[2]->type); else if (candidate->num_convs == 2) - inform (input_location, "%s %D(%T, %T) <built-in>", msgstr, candidate->fn, + inform (input_location, "%s%D(%T, %T) <built-in>", msg, candidate->fn, candidate->convs[0]->type, candidate->convs[1]->type); else - inform (input_location, "%s %D(%T) <built-in>", msgstr, candidate->fn, + inform (input_location, "%s%D(%T) <built-in>", msg, candidate->fn, candidate->convs[0]->type); } else if (TYPE_P (candidate->fn)) - inform (input_location, "%s %T <conversion>", msgstr, candidate->fn); + inform (input_location, "%s%T <conversion>", msg, candidate->fn); else if (candidate->viable == -1) - inform (input_location, "%s %+#D <near match>", msgstr, candidate->fn); + inform (loc, "%s%#D <near match>", msg, candidate->fn); else if (DECL_DELETED_FN (STRIP_TEMPLATE (candidate->fn))) - inform (input_location, "%s %+#D <deleted>", msgstr, candidate->fn); + inform (loc, "%s%#D <deleted>", msg, candidate->fn); else - inform (input_location, "%s %+#D", msgstr, candidate->fn); + inform (loc, "%s%#D", msg, candidate->fn); + /* Give the user some information about why this candidate failed. */ + if (candidate->reason != NULL) + { + struct rejection_reason *r = candidate->reason; + + switch (r->code) + { + case rr_arity: + inform_n (loc, r->u.arity.expected, + " candidate expects %d argument, %d provided", + " candidate expects %d arguments, %d provided", + r->u.arity.expected, r->u.arity.actual); + break; + case rr_arg_conversion: + print_conversion_rejection (loc, &r->u.conversion); + break; + case rr_bad_arg_conversion: + print_conversion_rejection (loc, &r->u.bad_conversion); + break; + case rr_none: + default: + /* This candidate didn't have any issues or we failed to + handle a particular code. Either way... */ + gcc_unreachable (); + } + } } static void -print_z_candidates (struct z_candidate *candidates) +print_z_candidates (location_t loc, struct z_candidate *candidates) { - const char *str; struct z_candidate *cand1; struct z_candidate **cand2; - char *spaces; + int n_candidates; if (!candidates) return; @@ -2885,14 +3065,12 @@ print_z_candidates (struct z_candidate *candidates) } } - str = candidates->next ? _("candidates are:") : _("candidate is:"); - spaces = NULL; + for (n_candidates = 0, cand1 = candidates; cand1; cand1 = cand1->next) + n_candidates++; + + inform_n (loc, n_candidates, "candidate is:", "candidates are:"); for (; candidates; candidates = candidates->next) - { - print_z_candidate (spaces ? spaces : str, candidates); - spaces = spaces ? spaces : get_spaces (str); - } - free (spaces); + print_z_candidate (NULL, candidates); } /* USER_SEQ is a user-defined conversion sequence, beginning with a @@ -3129,9 +3307,20 @@ build_user_type_conversion_1 (tree totype, tree expr, int flags) cand->second_conv = ics; if (!ics) - cand->viable = 0; + { + tree rettype = TREE_TYPE (TREE_TYPE (cand->fn)); + cand->viable = 0; + cand->reason = arg_conversion_rejection (NULL_TREE, -1, + rettype, totype); + } else if (cand->viable == 1 && ics->bad_p) - cand->viable = -1; + { + tree rettype = TREE_TYPE (TREE_TYPE (cand->fn)); + cand->viable = -1; + cand->reason + = bad_arg_conversion_rejection (NULL_TREE, -1, + rettype, totype); + } } } @@ -3146,7 +3335,7 @@ build_user_type_conversion_1 (tree totype, tree expr, int flags) { error ("conversion from %qT to %qT is ambiguous", fromtype, totype); - print_z_candidates (candidates); + print_z_candidates (location_of (expr), candidates); } cand = candidates; /* any one will do */ @@ -3346,6 +3535,28 @@ perform_overload_resolution (tree fn, return cand; } +/* Print an error message about being unable to build a call to FN with + ARGS. ANY_VIABLE_P indicates whether any candidate functions could + be located; CANDIDATES is a possibly empty list of such + functions. */ + +static void +print_error_for_call_failure (tree fn, VEC(tree,gc) *args, bool any_viable_p, + struct z_candidate *candidates) +{ + tree name = DECL_NAME (OVL_CURRENT (fn)); + location_t loc = location_of (name); + + if (!any_viable_p) + error_at (loc, "no matching function for call to %<%D(%A)%>", + name, build_tree_list_vec (args)); + else + error_at (loc, "call of overloaded %<%D(%A)%> is ambiguous", + name, build_tree_list_vec (args)); + if (candidates) + print_z_candidates (loc, candidates); +} + /* Return an expression for a call to FN (a namespace-scope function, or a static member function) with the ARGS. This may change ARGS. */ @@ -3377,9 +3588,7 @@ build_new_function_call (tree fn, VEC(tree,gc) **args, bool koenig_p, if (!fn) { if (complain & tf_error) - error ("no matching function for call to %<%D(%A)%>", - DECL_NAME (OVL_CURRENT (orig_fn)), - build_tree_list_vec (*args)); + print_error_for_call_failure (orig_fn, *args, false, NULL); return error_mark_node; } } @@ -3398,14 +3607,7 @@ build_new_function_call (tree fn, VEC(tree,gc) **args, bool koenig_p, return cp_build_function_call_vec (candidates->fn, args, complain); if (TREE_CODE (fn) == TEMPLATE_ID_EXPR) fn = TREE_OPERAND (fn, 0); - if (!any_viable_p) - error ("no matching function for call to %<%D(%A)%>", - DECL_NAME (OVL_CURRENT (fn)), build_tree_list_vec (*args)); - else - error ("call of overloaded %<%D(%A)%> is ambiguous", - DECL_NAME (OVL_CURRENT (fn)), build_tree_list_vec (*args)); - if (candidates) - print_z_candidates (candidates); + print_error_for_call_failure (fn, *args, any_viable_p, candidates); } result = error_mark_node; } @@ -3463,14 +3665,7 @@ build_operator_new_call (tree fnname, VEC(tree,gc) **args, and give up. */ if (!cand) { - if (!any_viable_p) - error ("no matching function for call to %<%D(%A)%>", - DECL_NAME (OVL_CURRENT (fns)), build_tree_list_vec (*args)); - else - error ("call of overloaded %<%D(%A)%> is ambiguous", - DECL_NAME (OVL_CURRENT (fns)), build_tree_list_vec (*args)); - if (candidates) - print_z_candidates (candidates); + print_error_for_call_failure (fns, *args, any_viable_p, candidates); return error_mark_node; } @@ -3620,7 +3815,7 @@ build_op_call (tree obj, VEC(tree,gc) **args, tsubst_flags_t complain) { error ("no match for call to %<(%T) (%A)%>", TREE_TYPE (obj), build_tree_list_vec (*args)); - print_z_candidates (candidates); + print_z_candidates (location_of (TREE_TYPE (obj)), candidates); } result = error_mark_node; } @@ -3633,7 +3828,7 @@ build_op_call (tree obj, VEC(tree,gc) **args, tsubst_flags_t complain) { error ("call of %<(%T) (%A)%> is ambiguous", TREE_TYPE (obj), build_tree_list_vec (*args)); - print_z_candidates (candidates); + print_z_candidates (location_of (TREE_TYPE (obj)), candidates); } result = error_mark_node; } @@ -4052,7 +4247,7 @@ build_conditional_expr (tree arg1, tree arg2, tree arg3, if (complain & tf_error) { op_error (COND_EXPR, NOP_EXPR, arg1, arg2, arg3, FALSE); - print_z_candidates (candidates); + print_z_candidates (location_of (arg1), candidates); } return error_mark_node; } @@ -4062,7 +4257,7 @@ build_conditional_expr (tree arg1, tree arg2, tree arg3, if (complain & tf_error) { op_error (COND_EXPR, NOP_EXPR, arg1, arg2, arg3, FALSE); - print_z_candidates (candidates); + print_z_candidates (location_of (arg1), candidates); } return error_mark_node; } @@ -4581,7 +4776,7 @@ build_new_op (enum tree_code code, int flags, tree arg1, tree arg2, tree arg3, /* ... Otherwise, report the more generic "no matching operator found" error */ op_error (code, code2, arg1, arg2, arg3, FALSE); - print_z_candidates (candidates); + print_z_candidates (input_location, candidates); } } result = error_mark_node; @@ -4596,7 +4791,7 @@ build_new_op (enum tree_code code, int flags, tree arg1, tree arg2, tree arg3, if ((flags & LOOKUP_COMPLAIN) && (complain & tf_error)) { op_error (code, code2, arg1, arg2, arg3, TRUE); - print_z_candidates (candidates); + print_z_candidates (input_location, candidates); } result = error_mark_node; } @@ -6656,7 +6851,7 @@ build_new_method_call (tree instance, tree fns, VEC(tree,gc) **args, if (free_p) free (pretty_name); } - print_z_candidates (candidates); + print_z_candidates (location_of (name), candidates); } call = error_mark_node; } @@ -6677,7 +6872,7 @@ build_new_method_call (tree instance, tree fns, VEC(tree,gc) **args, arglist = TREE_CHAIN (arglist); error ("call of overloaded %<%s(%A)%> is ambiguous", pretty_name, arglist); - print_z_candidates (candidates); + print_z_candidates (location_of (name), candidates); if (free_p) free (pretty_name); } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e505dad28ed9c3c82f829ce5d9714e5d73bf53a5..b4e005e9c22180b908c29d337147a5abb6d3aa17 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,175 @@ +2010-12-08 Nathan Froyd <froydnj@codesourcery.com> + + PR c++/45329 + * testsuite/g++.dg/conversion/ambig1.C: Adjust. + * testsuite/g++.dg/conversion/op1.C: Adjust. + * testsuite/g++.dg/conversion/simd1.C: Adjust. + * testsuite/g++.dg/cpp0x/defaulted14.C: Adjust. + * testsuite/g++.dg/cpp0x/defaulted18.C: Adjust. + * testsuite/g++.dg/cpp0x/defaulted20.C: Adjust. + * testsuite/g++.dg/cpp0x/explicit3.C: Adjust. + * testsuite/g++.dg/cpp0x/explicit4.C: Adjust. + * testsuite/g++.dg/cpp0x/implicit4.C: Adjust. + * testsuite/g++.dg/cpp0x/nullptr15.C: Adjust. + * testsuite/g++.dg/cpp0x/nullptr19.C: Adjust. + * testsuite/g++.dg/cpp0x/pr31431-2.C: Adjust. + * testsuite/g++.dg/cpp0x/pr31431.C: Adjust. + * testsuite/g++.dg/cpp0x/pr31434.C: Adjust. + * testsuite/g++.dg/cpp0x/pr31437.C: Adjust. + * testsuite/g++.dg/cpp0x/rv2n.C: Adjust. + * testsuite/g++.dg/cpp0x/rv3n.C: Adjust. + * testsuite/g++.dg/cpp0x/rv4n.C: Adjust. + * testsuite/g++.dg/cpp0x/rv5n.C: Adjust. + * testsuite/g++.dg/cpp0x/rv6n.C: Adjust. + * testsuite/g++.dg/cpp0x/rv7n.C: Adjust. + * testsuite/g++.dg/cpp0x/temp_default2.C: Adjust. + * testsuite/g++.dg/cpp0x/trailing4.C: Adjust. + * testsuite/g++.dg/cpp0x/variadic-ex3.C: Adjust. + * testsuite/g++.dg/cpp0x/variadic-ex4.C: Adjust. + * testsuite/g++.dg/cpp0x/variadic35.C: Adjust. + * testsuite/g++.dg/cpp0x/vt-35147.C: Adjust. + * testsuite/g++.dg/cpp0x/vt-37737-2.C: Adjust. + * testsuite/g++.dg/expr/cond9.C: Adjust. + * testsuite/g++.dg/expr/pmf-1.C: Adjust. + * testsuite/g++.dg/ext/label5.C: Adjust. + * testsuite/g++.dg/ext/visibility/anon8.C: Adjust. + * testsuite/g++.dg/ext/vla2.C: Adjust. + * testsuite/g++.dg/gomp/pr26690-1.C: Adjust. + * testsuite/g++.dg/gomp/pr26690-2.C: Adjust. + * testsuite/g++.dg/init/synth2.C: Adjust. + * testsuite/g++.dg/lookup/conv-1.C: Adjust. + * testsuite/g++.dg/lookup/new1.C: Adjust. + * testsuite/g++.dg/lookup/using9.C: Adjust. + * testsuite/g++.dg/other/error13.C: Adjust. + * testsuite/g++.dg/other/error20.C: Adjust. + * testsuite/g++.dg/other/error31.C: Adjust. + * testsuite/g++.dg/other/pr28114.C: Adjust. + * testsuite/g++.dg/other/ptrmem10.C: Adjust. + * testsuite/g++.dg/other/ptrmem11.C: Adjust. + * testsuite/g++.dg/overload/ambig1.C: Adjust. + * testsuite/g++.dg/overload/arg3.C: Adjust. + * testsuite/g++.dg/overload/builtin1.C: Adjust. + * testsuite/g++.dg/overload/copy1.C: Adjust. + * testsuite/g++.dg/overload/new1.C: Adjust. + * testsuite/g++.dg/overload/template4.C: Adjust. + * testsuite/g++.dg/overload/unknown1.C: Adjust. + * testsuite/g++.dg/overload/using2.C: Adjust. + * testsuite/g++.dg/parse/crash5.C: Adjust. + * testsuite/g++.dg/parse/error19.C: Adjust. + * testsuite/g++.dg/parse/error28.C: Adjust. + * testsuite/g++.dg/parse/template7.C: Adjust. + * testsuite/g++.dg/parse/typename7.C: Adjust. + * testsuite/g++.dg/rtti/typeid6.C: Adjust. + * testsuite/g++.dg/tc1/dr152.C: Adjust. + * testsuite/g++.dg/template/conv11.C: Adjust. + * testsuite/g++.dg/template/copy1.C: Adjust. + * testsuite/g++.dg/template/crash37.C: Adjust. + * testsuite/g++.dg/template/deduce3.C: Adjust. + * testsuite/g++.dg/template/dependent-expr5.C: Adjust. + * testsuite/g++.dg/template/error38.C: Adjust. + * testsuite/g++.dg/template/error40.C: Adjust. + * testsuite/g++.dg/template/friend.C: Adjust. + * testsuite/g++.dg/template/incomplete2.C: Adjust. + * testsuite/g++.dg/template/instantiate5.C: Adjust. + * testsuite/g++.dg/template/local4.C: Adjust. + * testsuite/g++.dg/template/local6.C: Adjust. + * testsuite/g++.dg/template/new3.C: Adjust. + * testsuite/g++.dg/template/operator9.C: Adjust. + * testsuite/g++.dg/template/overload6.C: Adjust. + * testsuite/g++.dg/template/ptrmem2.C: Adjust. + * testsuite/g++.dg/template/ptrmem20.C: Adjust. + * testsuite/g++.dg/template/ptrmem4.C: Adjust. + * testsuite/g++.dg/template/ptrmem8.C: Adjust. + * testsuite/g++.dg/template/qualttp5.C: Adjust. + * testsuite/g++.dg/template/sfinae2.C: Adjust. + * testsuite/g++.dg/template/spec22.C: Adjust. + * testsuite/g++.dg/template/spec23.C: Adjust. + * testsuite/g++.dg/template/ttp25.C: Adjust. + * testsuite/g++.dg/template/typedef4.C: Adjust. + * testsuite/g++.dg/template/unify10.C: Adjust. + * testsuite/g++.dg/template/unify11.C: Adjust. + * testsuite/g++.dg/template/unify6.C: Adjust. + * testsuite/g++.dg/template/unify7.C: Adjust. + * testsuite/g++.dg/template/unify9.C: Adjust. + * testsuite/g++.dg/template/varmod1.C: Adjust. + * testsuite/g++.old-deja/g++.benjamin/15799.C: Adjust. + * testsuite/g++.old-deja/g++.benjamin/15800-1.C: Adjust. + * testsuite/g++.old-deja/g++.brendan/ambiguity1.C: Adjust. + * testsuite/g++.old-deja/g++.brendan/crash29.C: Adjust. + * testsuite/g++.old-deja/g++.brendan/crash48.C: Adjust. + * testsuite/g++.old-deja/g++.brendan/crash56.C: Adjust. + * testsuite/g++.old-deja/g++.brendan/cvt3.C: Adjust. + * testsuite/g++.old-deja/g++.brendan/overload1.C: Adjust. + * testsuite/g++.old-deja/g++.brendan/overload4.C: Adjust. + * testsuite/g++.old-deja/g++.brendan/overload9.C: Adjust. + * testsuite/g++.old-deja/g++.bugs/900127_01.C: Adjust. + * testsuite/g++.old-deja/g++.bugs/900205_04.C: Adjust. + * testsuite/g++.old-deja/g++.bugs/900330_02.C: Adjust. + * testsuite/g++.old-deja/g++.bugs/900404_03.C: Adjust. + * testsuite/g++.old-deja/g++.bugs/900514_03.C: Adjust. + * testsuite/g++.old-deja/g++.eh/ctor1.C: Adjust. + * testsuite/g++.old-deja/g++.jason/conversion11.C: Adjust. + * testsuite/g++.old-deja/g++.jason/crash3.C: Adjust. + * testsuite/g++.old-deja/g++.jason/overload16.C: Adjust. + * testsuite/g++.old-deja/g++.jason/overload28.C: Adjust. + * testsuite/g++.old-deja/g++.jason/scoping10.C: Adjust. + * testsuite/g++.old-deja/g++.jason/template30.C: Adjust. + * testsuite/g++.old-deja/g++.jason/temporary2.C: Adjust. + * testsuite/g++.old-deja/g++.law/arg1.C: Adjust. + * testsuite/g++.old-deja/g++.law/arg11.C: Adjust. + * testsuite/g++.old-deja/g++.law/arm9.C: Adjust. + * testsuite/g++.old-deja/g++.law/ctors11.C: Adjust. + * testsuite/g++.old-deja/g++.law/ctors17.C: Adjust. + * testsuite/g++.old-deja/g++.law/ctors5.C: Adjust. + * testsuite/g++.old-deja/g++.law/ctors9.C: Adjust. + * testsuite/g++.old-deja/g++.law/enum4.C: Adjust. + * testsuite/g++.old-deja/g++.law/missed-error2.C: Adjust. + * testsuite/g++.old-deja/g++.law/operators32.C: Adjust. + * testsuite/g++.old-deja/g++.law/operators9.C: Adjust. + * testsuite/g++.old-deja/g++.mike/net2.C: Adjust. + * testsuite/g++.old-deja/g++.mike/net22.C: Adjust. + * testsuite/g++.old-deja/g++.mike/p11110.C: Adjust. + * testsuite/g++.old-deja/g++.mike/p1989.C: Adjust. + * testsuite/g++.old-deja/g++.mike/p2431.C: Adjust. + * testsuite/g++.old-deja/g++.mike/p438.C: Adjust. + * testsuite/g++.old-deja/g++.mike/p807a.C: Adjust. + * testsuite/g++.old-deja/g++.mike/p9068.C: Adjust. + * testsuite/g++.old-deja/g++.niklas/t120.C: Adjust. + * testsuite/g++.old-deja/g++.niklas/t121.C: Adjust. + * testsuite/g++.old-deja/g++.niklas/t128.C: Adjust. + * testsuite/g++.old-deja/g++.ns/overload2.C: Adjust. + * testsuite/g++.old-deja/g++.ns/using12.C: Adjust. + * testsuite/g++.old-deja/g++.other/crash24.C: Adjust. + * testsuite/g++.old-deja/g++.other/expr1.C: Adjust. + * testsuite/g++.old-deja/g++.other/overload11.C: Adjust. + * testsuite/g++.old-deja/g++.other/pmf3.C: Adjust. + * testsuite/g++.old-deja/g++.other/volatile1.C: Adjust. + * testsuite/g++.old-deja/g++.pt/auto_ptr.C: Adjust. + * testsuite/g++.old-deja/g++.pt/crash28.C: Adjust. + * testsuite/g++.old-deja/g++.pt/crash60.C: Adjust. + * testsuite/g++.old-deja/g++.pt/explicit38.C: Adjust. + * testsuite/g++.old-deja/g++.pt/explicit39.C: Adjust. + * testsuite/g++.old-deja/g++.pt/explicit41.C: Adjust. + * testsuite/g++.old-deja/g++.pt/explicit67.C: Adjust. + * testsuite/g++.old-deja/g++.pt/explicit77.C: Adjust. + * testsuite/g++.old-deja/g++.pt/expr2.C: Adjust. + * testsuite/g++.old-deja/g++.pt/ptrmem10.C: Adjust. + * testsuite/g++.old-deja/g++.pt/ptrmem6.C: Adjust. + * testsuite/g++.old-deja/g++.pt/spec35.C: Adjust. + * testsuite/g++.old-deja/g++.pt/spec5.C: Adjust. + * testsuite/g++.old-deja/g++.pt/spec6.C: Adjust. + * testsuite/g++.old-deja/g++.pt/t05.C: Adjust. + * testsuite/g++.old-deja/g++.pt/t24.C: Adjust. + * testsuite/g++.old-deja/g++.pt/unify4.C: Adjust. + * testsuite/g++.old-deja/g++.pt/unify6.C: Adjust. + * testsuite/g++.old-deja/g++.pt/unify8.C: Adjust. + * testsuite/g++.old-deja/g++.robertl/eb109.C: Adjust. + * testsuite/g++.old-deja/g++.robertl/eb119.C: Adjust. + * testsuite/g++.old-deja/g++.robertl/eb131.C: Adjust. + * testsuite/g++.old-deja/g++.robertl/eb22.C: Adjust. + * testsuite/g++.old-deja/g++.robertl/eb69.C: Adjust. + * testsuite/g++.old-deja/g++.robertl/eb98.C: Adjust. + 2010-12-08 Jason Merrill <jason@redhat.com> PR c++/45822 diff --git a/gcc/testsuite/g++.dg/conversion/ambig1.C b/gcc/testsuite/g++.dg/conversion/ambig1.C index 1db1667073fe933c72f4ff313dbd586b305daf6d..85ea1d25f9e9ed20440e966ee203786c968eb522 100644 --- a/gcc/testsuite/g++.dg/conversion/ambig1.C +++ b/gcc/testsuite/g++.dg/conversion/ambig1.C @@ -6,3 +6,4 @@ struct H { }; int const& ref = H(); // { dg-error "ambiguous" } +// { dg-message "candidate" "candidate note" { target *-*-* } 8 } diff --git a/gcc/testsuite/g++.dg/conversion/op1.C b/gcc/testsuite/g++.dg/conversion/op1.C index 65b925a4d61d944fcc5cdbb06678b9f231a28384..e0a3e5f46edab32e6ec6fb6000da60377d5bed72 100644 --- a/gcc/testsuite/g++.dg/conversion/op1.C +++ b/gcc/testsuite/g++.dg/conversion/op1.C @@ -1,10 +1,11 @@ class C { template<typename U> - operator U(); // { dg-message "candidate" } + operator U(); // { dg-message "note" } }; int fn (C c) { return C::operator float(c); // { dg-error "operator float.C" } + // { dg-message "candidate" "candidate note" { target *-*-* } 9 } } diff --git a/gcc/testsuite/g++.dg/conversion/simd1.C b/gcc/testsuite/g++.dg/conversion/simd1.C index 56be6f47ca96e95e72e459ec521c0b520cdbe8a4..fa40b0eaad289637ce9ffd6188ba728e7f772692 100644 --- a/gcc/testsuite/g++.dg/conversion/simd1.C +++ b/gcc/testsuite/g++.dg/conversion/simd1.C @@ -5,8 +5,8 @@ #define vector __attribute__((vector_size(16))) -vector signed int vld (int a1, const vector signed int *a2) { return *a2; } /* { dg-message "vld" } */ -vector signed short vld (int a1, const vector signed short *a2) { return *a2; } /* { dg-message "vld" } */ +vector signed int vld (int a1, const vector signed int *a2) { return *a2; } /* { dg-message "vld|no known conversion" } */ +vector signed short vld (int a1, const vector signed short *a2) { return *a2; } /* { dg-message "vld|no known conversion" } */ extern int i; extern vector signed short vss; @@ -17,6 +17,7 @@ extern const vector signed short *cvssp; void foo () { vss = vld(i, vscp); /* { dg-error "no matching function for call" } */ + // { dg-message "candidate" "candidate note" { target *-*-* } 19 } vss = vld(i, vssp); vss = vld(i, cvssp); } diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted14.C b/gcc/testsuite/g++.dg/cpp0x/defaulted14.C index 235e646780a94e295dbbe5a8bf89b9476e0dfd97..e476d576cfaefacfa0e9bc2ef1e720afa345ae08 100644 --- a/gcc/testsuite/g++.dg/cpp0x/defaulted14.C +++ b/gcc/testsuite/g++.dg/cpp0x/defaulted14.C @@ -14,5 +14,7 @@ int main() { A a; a = B(); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 16 } a = 1.0; // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 18 } } diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted18.C b/gcc/testsuite/g++.dg/cpp0x/defaulted18.C index ae055e3bc633c67746364e85e71a22139633aea6..559dfde48332d94fdd8fb71eb5779cbb3ca65018 100644 --- a/gcc/testsuite/g++.dg/cpp0x/defaulted18.C +++ b/gcc/testsuite/g++.dg/cpp0x/defaulted18.C @@ -6,4 +6,5 @@ void f(int i, ...); // { dg-message "void f" } int main() { f(1,1); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 8 } } diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted20.C b/gcc/testsuite/g++.dg/cpp0x/defaulted20.C index d9ad04fec4e400bc42cfb30a4c61de6002c225ea..5d536a97eff510d61980fd30b71aeb49403aabc1 100644 --- a/gcc/testsuite/g++.dg/cpp0x/defaulted20.C +++ b/gcc/testsuite/g++.dg/cpp0x/defaulted20.C @@ -2,12 +2,13 @@ // { dg-options -std=c++0x } struct A { - A(A&&) = default; // { dg-message "A::A" } + A(A&&) = default; // { dg-message "A::A|no known conversion" } }; struct B { const A a; B(const B&) = default; B(B&&) = default; // { dg-error "implicitly deleted|no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 10 } }; void g(B); // { dg-error "argument 1" } diff --git a/gcc/testsuite/g++.dg/cpp0x/explicit3.C b/gcc/testsuite/g++.dg/cpp0x/explicit3.C index cd37a155eed6b58d7c847874568f20331b67887c..be0a14e7adf47c7c9a956fd9325480c7286529e5 100644 --- a/gcc/testsuite/g++.dg/cpp0x/explicit3.C +++ b/gcc/testsuite/g++.dg/cpp0x/explicit3.C @@ -42,6 +42,7 @@ int main() // These do not. switch (a); // { dg-error "" } bool b = a; // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 44 } f(a); // { dg-error "" } B b2 = { a }; // { dg-error "" } a + true; // { dg-message "" } diff --git a/gcc/testsuite/g++.dg/cpp0x/explicit4.C b/gcc/testsuite/g++.dg/cpp0x/explicit4.C index 67c60f67928e15f54022d8c2b520e7d7f090f499..0f3bc623a53e0b64e6060a803c9e80997bc1203a 100644 --- a/gcc/testsuite/g++.dg/cpp0x/explicit4.C +++ b/gcc/testsuite/g++.dg/cpp0x/explicit4.C @@ -2,7 +2,7 @@ // { dg-options "-std=c++0x" } struct A { - A(const A&, int = 0); // { dg-message "candidate" } + A(const A&, int = 0); // { dg-message "note" } }; struct B { @@ -14,4 +14,5 @@ int main() B b; (A(b)); // OK (A(b,1)); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 16 } } diff --git a/gcc/testsuite/g++.dg/cpp0x/implicit4.C b/gcc/testsuite/g++.dg/cpp0x/implicit4.C index 75606a3ce7e4ea3e33165ca0c1ee1e486cbee181..f97eb7549f9704aef8d12a84871b3e020f43dcf2 100644 --- a/gcc/testsuite/g++.dg/cpp0x/implicit4.C +++ b/gcc/testsuite/g++.dg/cpp0x/implicit4.C @@ -4,11 +4,12 @@ struct A { - A(); // { dg-message "A::A" } - A(A&&); // { dg-message "A::A" } + A(); // { dg-message "A::A|candidate expects" } + A(A&&); // { dg-message "A::A|no known conversion" } }; struct B: A // { dg-error "implicit|no match" } +// { dg-message "candidate" "candidate note" { target *-*-* } 11 } { }; diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr15.C b/gcc/testsuite/g++.dg/cpp0x/nullptr15.C index 67d9d4a23117fa1e159deca4c673d00c9374820a..e02fd5592eb9a1ab60c2c50dec8a2999e0c87771 100644 --- a/gcc/testsuite/g++.dg/cpp0x/nullptr15.C +++ b/gcc/testsuite/g++.dg/cpp0x/nullptr15.C @@ -10,15 +10,17 @@ template <typename T, typename U> inline typename tType_equal<T, U>::type type_equal(U) { } -template<typename T> T* g( T* t ); // { dg-message "candidate" } +template<typename T> T* g( T* t ); // { dg-message "note" } 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 } 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 } type_equal<float*>(g((float*)mynull)); } diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr19.C b/gcc/testsuite/g++.dg/cpp0x/nullptr19.C index 7eb00bb3f7ee6eb164cf2961f90ff80f92846c85..cf30f1c2396f76667d2abab2eb5a20f09a5d01ca 100644 --- a/gcc/testsuite/g++.dg/cpp0x/nullptr19.C +++ b/gcc/testsuite/g++.dg/cpp0x/nullptr19.C @@ -11,5 +11,7 @@ nullptr_t k( nullptr_t ); /* { dg-message "note" } { dg-message "note" } */ void test_k() { k(0); /* { dg-error "is ambiguous" } */ + // { dg-message "candidate" "candidate note" { target *-*-* } 13 } k(__null); /* { dg-error "is ambiguous" } */ + // { dg-message "candidate" "candidate note" { target *-*-* } 15 } } diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31431-2.C b/gcc/testsuite/g++.dg/cpp0x/pr31431-2.C index 59e1afeab25a88b88355af74be05cb3ad0b7b47e..15efbc5d35973312082f4f2b279f910f9a25e437 100644 --- a/gcc/testsuite/g++.dg/cpp0x/pr31431-2.C +++ b/gcc/testsuite/g++.dg/cpp0x/pr31431-2.C @@ -1,7 +1,8 @@ // { dg-options "-std=gnu++0x" } -template<typename, typename..., typename> void foo(); // { dg-message "candidate" } +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 } } diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31431.C b/gcc/testsuite/g++.dg/cpp0x/pr31431.C index b150a047f8c05ba3341e10b1b88f5547bb3a5f76..36f341f3d02ed4121822aacc07e714eaba60f515 100644 --- a/gcc/testsuite/g++.dg/cpp0x/pr31431.C +++ b/gcc/testsuite/g++.dg/cpp0x/pr31431.C @@ -1,7 +1,8 @@ // { dg-options "-std=gnu++0x" } -template<typename..., typename> void foo(); // { dg-message "candidate" } +template<typename..., typename> void foo(); // { dg-message "note" } void bar() { foo<int>(); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 6 } } diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31434.C b/gcc/testsuite/g++.dg/cpp0x/pr31434.C index a785ae934a626534b60f3a974ea49bb1b354cd9b..97ad079ab0b8b022d3429d2a0ff195a725a9c2a6 100644 --- a/gcc/testsuite/g++.dg/cpp0x/pr31434.C +++ b/gcc/testsuite/g++.dg/cpp0x/pr31434.C @@ -8,4 +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 } } diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31437.C b/gcc/testsuite/g++.dg/cpp0x/pr31437.C index 812c695f4ec01c14bff2dc20c9157f759afa1df2..0b64f7273fb3c3b1c400b068c68abfa58709bf1d 100644 --- a/gcc/testsuite/g++.dg/cpp0x/pr31437.C +++ b/gcc/testsuite/g++.dg/cpp0x/pr31437.C @@ -7,3 +7,4 @@ template <typename... T> struct A // { dg-error "candidates|A" } }; A<int> a(0); // { dg-error "no matching" } +// { dg-message "candidate" "candidate note" { target *-*-* } 9 } diff --git a/gcc/testsuite/g++.dg/cpp0x/rv2n.C b/gcc/testsuite/g++.dg/cpp0x/rv2n.C index a5c51778e347658c6c7751b3c94e00c4172ad4f2..2b3a9c06ae9fc72133d143787e7003f3267a6d6e 100644 --- a/gcc/testsuite/g++.dg/cpp0x/rv2n.C +++ b/gcc/testsuite/g++.dg/cpp0x/rv2n.C @@ -30,7 +30,7 @@ const volatile A cv_source(); // 2 at a time -one sink_2_12( A&); // { dg-message "candidates|argument" } +one sink_2_12( A&); // { dg-message "note|argument" } two sink_2_12(const A&); // { dg-message "note|argument" } int test2_12() @@ -40,13 +40,17 @@ int test2_12() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_12(va); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 42 } sink_2_12(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 44 } sink_2_12(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 46 } sink_2_12(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 48 } return 0; } -one sink_2_13( A&); // { dg-message "candidates|argument" } +one sink_2_13( A&); // { dg-message "note|argument" } three sink_2_13(volatile A&); // { dg-message "note|argument" } int test2_13() @@ -56,15 +60,21 @@ int test2_13() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_13(ca); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 62 } sink_2_13(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 64 } sink_2_13(source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 66 } sink_2_13(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 68 } sink_2_13(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 70 } sink_2_13(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 72 } return 0; } -one sink_2_14( A&); // { dg-message "candidates|argument" } +one sink_2_14( A&); // { dg-message "note|argument" } four sink_2_14(const volatile A&); // { dg-message "note|argument" } int test2_14() @@ -74,13 +84,17 @@ int test2_14() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_14(source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 86 } sink_2_14(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 88 } sink_2_14(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 90 } sink_2_14(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 92 } return 0; } -one sink_2_15( A&); // { dg-message "candidates|argument" } +one sink_2_15( A&); // { dg-message "note|argument" } five sink_2_15( A&&); // { dg-message "note|argument" } int test2_15() @@ -90,15 +104,21 @@ int test2_15() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_15(ca); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 106 } sink_2_15(va); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 108 } sink_2_15(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 110 } sink_2_15(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 112 } sink_2_15(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 114 } sink_2_15(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 116 } return 0; } -one sink_2_16( A&); // { dg-message "candidates|argument" } +one sink_2_16( A&); // { dg-message "note|argument" } six sink_2_16(const A&&); // { dg-message "note|argument" } int test2_16() @@ -109,13 +129,17 @@ int test2_16() const volatile A cva = a; // { dg-error "lvalue" } sink_2_16(ca); // { dg-error "lvalue" } sink_2_16(va); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 131 } sink_2_16(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 133 } sink_2_16(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 135 } sink_2_16(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 137 } return 0; } -one sink_2_17( A&); // { dg-message "candidates|argument" } +one sink_2_17( A&); // { dg-message "note|argument" } seven sink_2_17(volatile A&&); // { dg-message "note|argument" } int test2_17() @@ -125,10 +149,14 @@ int test2_17() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_17(ca); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 151 } sink_2_17(va); // { dg-error "lvalue" } sink_2_17(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 154 } sink_2_17(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 156 } sink_2_17(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 158 } return 0; } @@ -146,7 +174,7 @@ int test2_18() sink_2_18(cva); // { dg-error "lvalue" } } -two sink_2_23(const A&); // { dg-message "candidates|argument" } +two sink_2_23(const A&); // { dg-message "note|argument" } three sink_2_23(volatile A&); // { dg-message "note|argument" } int test2_23() @@ -156,13 +184,17 @@ int test2_23() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_23(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 186 } sink_2_23(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 188 } sink_2_23(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 190 } sink_2_23(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 192 } return 0; } -two sink_2_24(const A&); // { dg-message "candidates|argument" } +two sink_2_24(const A&); // { dg-message "note|argument" } four sink_2_24(const volatile A&); // { dg-message "note|argument" } int test2_24() @@ -172,11 +204,13 @@ int test2_24() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_24(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 206 } sink_2_24(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 208 } return 0; } -three sink_2_34(volatile A&); // { dg-message "candidate" } +three sink_2_34(volatile A&); // { dg-message "three sink_2_34|no known conversion" } four sink_2_34(const volatile A&); // { dg-message "note|argument" } int test2_34() @@ -186,13 +220,17 @@ int test2_34() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_34(source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 222 } sink_2_34(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 224 } sink_2_34(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 226 } sink_2_34(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 228 } return 0; } -two sink_2_25(const A&); // { dg-message "candidate" } +two sink_2_25(const A&); // { dg-message "two sink_2_25|no known conversion" } five sink_2_25( A&&); // { dg-message "note|argument" } int test2_25() @@ -202,13 +240,17 @@ int test2_25() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_25(va); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 242 } sink_2_25(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 244 } sink_2_25(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 246 } sink_2_25(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 248 } return 0; } -two sink_2_26(const A&); // { dg-message "candidate" } +two sink_2_26(const A&); // { dg-message "two sink_2_26|no known conversion" } six sink_2_26(const A&&); // { dg-message "note|argument" } int test2_26() @@ -218,13 +260,17 @@ int test2_26() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_26(va); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 262 } sink_2_26(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 264 } sink_2_26(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 266 } sink_2_26(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 268 } return 0; } -two sink_2_27(const A&); // { dg-message "candidate" } +two sink_2_27(const A&); // { dg-message "two sink_2_27|no known conversion" } seven sink_2_27(volatile A&&); // { dg-message "note|argument" } int test2_27() @@ -235,7 +281,9 @@ int test2_27() const volatile A cva = a; // { dg-error "lvalue" } sink_2_27(va); // { dg-error "lvalue" } sink_2_27(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 283 } sink_2_27(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 285 } return 0; } @@ -252,7 +300,7 @@ int test2_28() sink_2_28(cva); // { dg-error "lvalue" } } -three sink_2_35(volatile A&); // { dg-message "candidate" } +three sink_2_35(volatile A&); // { dg-message "three sink_2_35|no known conversion" } five sink_2_35( A&&); // { dg-message "note|argument" } int test2_35() @@ -262,14 +310,19 @@ int test2_35() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_35(ca); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 312 } sink_2_35(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 314 } sink_2_35(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 316 } sink_2_35(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 318 } sink_2_35(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 320 } return 0; } -three sink_2_36(volatile A&); // { dg-message "candidate" } +three sink_2_36(volatile A&); // { dg-message "three sink_2_36|no known conversion" } six sink_2_36(const A&&); // { dg-message "note|argument" } int test2_36() @@ -280,12 +333,15 @@ int test2_36() const volatile A cva = a; // { dg-error "lvalue" } sink_2_36(ca); // { dg-error "lvalue" } sink_2_36(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 335 } sink_2_36(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 337 } sink_2_36(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 339 } return 0; } -three sink_2_37(volatile A&); // { dg-message "candidate" } +three sink_2_37(volatile A&); // { dg-message "three sink_2_37|no known conversion" } seven sink_2_37(volatile A&&); // { dg-message "note|argument" } int test2_37() @@ -295,9 +351,13 @@ int test2_37() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_37(ca); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 353 } sink_2_37(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 355 } sink_2_37(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 357 } sink_2_37(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 359 } return 0; } @@ -314,7 +374,7 @@ int test2_38() sink_2_38(cva); // { dg-error "lvalue" } } -four sink_2_45(const volatile A&); // { dg-message "candidate" } +four sink_2_45(const volatile A&); // { dg-message "note" } five sink_2_45( A&&); // { dg-message "note|argument" } int test2_45() @@ -324,12 +384,15 @@ int test2_45() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_45(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 386 } sink_2_45(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 388 } sink_2_45(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 390 } return 0; } -four sink_2_46(const volatile A&); // { dg-message "candidate" } +four sink_2_46(const volatile A&); // { dg-message "note" } six sink_2_46(const A&&); // { dg-message "note|argument" } int test2_46() @@ -339,11 +402,13 @@ int test2_46() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_46(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 404 } sink_2_46(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 406 } return 0; } -four sink_2_47(const volatile A&); // { dg-message "candidate" } +four sink_2_47(const volatile A&); // { dg-message "note" } seven sink_2_47(volatile A&&); // { dg-message "note|argument" } int test2_47() @@ -353,11 +418,13 @@ int test2_47() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_47(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 420 } sink_2_47(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 422 } return 0; } -five sink_2_56( A&&); // { dg-message "candidate|argument" } +five sink_2_56( A&&); // { dg-message "note|argument" } six sink_2_56(const A&&); // { dg-message "note|argument" } int test2_56() @@ -369,13 +436,17 @@ int test2_56() sink_2_56(a); // { dg-error "lvalue" } sink_2_56(ca); // { dg-error "lvalue" } sink_2_56(va); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 438 } sink_2_56(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 440 } sink_2_56(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 442 } sink_2_56(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 444 } return 0; } -five sink_2_57( A&&); // { dg-message "candidate|argument" } +five sink_2_57( A&&); // { dg-message "note|argument" } seven sink_2_57(volatile A&&); // { dg-message "note|argument" } int test2_57() @@ -387,9 +458,13 @@ int test2_57() sink_2_57(a); // { dg-error "lvalue" } sink_2_57(va); // { dg-error "lvalue" } sink_2_57(ca); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 460 } sink_2_57(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 462 } sink_2_57(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 464 } sink_2_57(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 466 } return 0; } @@ -408,7 +483,7 @@ int test2_58() sink_2_58(cva); // { dg-error "lvalue" } } -six sink_2_67(const A&&); // { dg-message "candidate|argument" } +six sink_2_67(const A&&); // { dg-message "note|argument" } seven sink_2_67(volatile A&&); // { dg-message "note|argument" } int test2_67() @@ -418,11 +493,15 @@ int test2_67() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_67(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 495 } sink_2_67(ca); // { dg-error "lvalue" } sink_2_67(va); // { dg-error "lvalue" } sink_2_67(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 499 } sink_2_67(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 501 } sink_2_67(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 503 } return 0; } diff --git a/gcc/testsuite/g++.dg/cpp0x/rv3n.C b/gcc/testsuite/g++.dg/cpp0x/rv3n.C index cacbdb395e70ce2495c78f4e3257b0cc9a58106e..637716f9b44c050086f5147e9a170bc8db06025f 100644 --- a/gcc/testsuite/g++.dg/cpp0x/rv3n.C +++ b/gcc/testsuite/g++.dg/cpp0x/rv3n.C @@ -30,9 +30,9 @@ const volatile A cv_source(); // 3 at a time -one sink_3_123( A&); // { dg-message "candidates" } -two sink_3_123(const A&); // { dg-message "note" } -three sink_3_123(volatile A&); // { dg-message "note" } +one sink_3_123( A&); // { dg-message "one sink_3_123|no known conversion" } +two sink_3_123(const A&); // { dg-message "two sink_3_123|no known conversion" } +three sink_3_123(volatile A&); // { dg-message "three sink_3_123|no known conversion" } int test3_123() { @@ -41,18 +41,21 @@ int test3_123() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_123(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 43 } sink_3_123(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 45 } sink_3_123(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 47 } return 0; } -one sink_3_125( A&); // { dg-message "candidates" } -two sink_3_125(const A&); // { dg-message "note" } -five sink_3_125( A&&); // { dg-message "note" } +one sink_3_125( A&); // { dg-message "one sink_3_125|no known conversion" } +two sink_3_125(const A&); // { dg-message "two sink_3_125|no known conversion" } +five sink_3_125( A&&); // { dg-message "five sink_3_125|no known conversion" } -one sink_3_124( A&); // { dg-message "candidates" } -two sink_3_124(const A&); // { dg-message "note" } -four sink_3_124(const volatile A&); // { dg-message "note" } +one sink_3_124( A&); // { dg-message "one sink_3_124|no known conversion" } +two sink_3_124(const A&); // { dg-message "two sink_3_124|no known conversion" } +four sink_3_124(const volatile A&); // { dg-message "four sink_3_124|no known conversion" } int test3_124() { @@ -61,7 +64,9 @@ int test3_124() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_124(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 66 } sink_3_124(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 68 } return 0; } @@ -72,15 +77,19 @@ int test3_125() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_125(va); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 79 } sink_3_125(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 81 } sink_3_125(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 83 } sink_3_125(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 85 } return 0; } -one sink_3_126( A&); // { dg-message "candidates" } -two sink_3_126(const A&); // { dg-message "note" } -six sink_3_126(const A&&); // { dg-message "note" } +one sink_3_126( A&); // { dg-message "one sink_3_126|no known conversion" } +two sink_3_126(const A&); // { dg-message "two sink_3_126|no known conversion" } +six sink_3_126(const A&&); // { dg-message "six sink_3_126|no known conversion" } int test3_126() { @@ -89,15 +98,19 @@ int test3_126() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_126(va); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 100 } sink_3_126(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 102 } sink_3_126(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 104 } sink_3_126(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 106 } return 0; } -one sink_3_127( A&); // { dg-message "candidates" } -two sink_3_127(const A&); // { dg-message "note" } -seven sink_3_127(volatile A&&); // { dg-message "" } +one sink_3_127( A&); // { dg-message "one sink_3_127|no known conversion" } +two sink_3_127(const A&); // { dg-message "two sink_3_127|no known conversion" } +seven sink_3_127(volatile A&&); // { dg-message "seven sink_3_127|no known conversion" } int test3_127() { @@ -107,7 +120,9 @@ int test3_127() const volatile A cva = a; // { dg-error "lvalue" } sink_3_127(va); // { dg-error "lvalue" } sink_3_127(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 122 } sink_3_127(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 124 } return 0; } @@ -126,9 +141,9 @@ int test3_128() sink_3_128(cva); // { dg-error "lvalue" } } -one sink_3_134( A&); // { dg-message "candidates" } -three sink_3_134(volatile A&); // { dg-message "note" } -four sink_3_134(const volatile A&); // { dg-message "note" } +one sink_3_134( A&); // { dg-message "one sink_3_134|no known conversion" } +three sink_3_134(volatile A&); // { dg-message "three sink_3_134|no known conversion" } +four sink_3_134(const volatile A&); // { dg-message "four sink_3_134|no known conversion" } int test3_134() { @@ -137,15 +152,19 @@ int test3_134() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_134(source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 154 } sink_3_134(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 156 } sink_3_134(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 158 } sink_3_134(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 160 } return 0; } -one sink_3_135( A&); // { dg-message "candidates" } -three sink_3_135(volatile A&); // { dg-message "note" } -five sink_3_135( A&&); // { dg-message "note" } +one sink_3_135( A&); // { dg-message "one sink_3_135|no known conversion" } +three sink_3_135(volatile A&); // { dg-message "three sink_3_135|no known conversion" } +five sink_3_135( A&&); // { dg-message "five sink_3_135|no known conversion" } int test3_135() { @@ -154,14 +173,19 @@ int test3_135() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_135(ca); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 175 } sink_3_135(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 177 } sink_3_135(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 179 } sink_3_135(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 181 } sink_3_135(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 183 } return 0; } -one sink_3_136( A&); // { dg-message "candidates" } +one sink_3_136( A&); // { dg-message "one sink_3_136|no known conversion" } three sink_3_136(volatile A&); // { dg-message "note" } six sink_3_136(const A&&); // { dg-message "" } @@ -173,12 +197,15 @@ int test3_136() const volatile A cva = a; // { dg-error "lvalue" } sink_3_136(ca); // { dg-error "lvalue" } sink_3_136(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 199 } sink_3_136(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 201 } sink_3_136(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 203 } return 0; } -one sink_3_137( A&); // { dg-message "candidates" } +one sink_3_137( A&); // { dg-message "one sink_3_137|no known conversion" } three sink_3_137(volatile A&); // { dg-message "note" } seven sink_3_137(volatile A&&); // { dg-message "note" } @@ -189,9 +216,13 @@ int test3_137() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_137(ca); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 218 } sink_3_137(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 220 } sink_3_137(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 222 } sink_3_137(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 224 } return 0; } @@ -210,7 +241,7 @@ int test3_138() return 0; } -one sink_3_145( A&); // { dg-message "candidates" } +one sink_3_145( A&); // { dg-message "one sink_3_145|no known conversion" } four sink_3_145(const volatile A&); // { dg-message "note" } five sink_3_145( A&&); // { dg-message "note" } @@ -221,12 +252,15 @@ int test3_145() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_145(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 254 } sink_3_145(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 256 } sink_3_145(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 258 } return 0; } -one sink_3_146( A&); // { dg-message "candidates" } +one sink_3_146( A&); // { dg-message "one sink_3_146|no known conversion" } four sink_3_146(const volatile A&); // { dg-message "note" } six sink_3_146(const A&&); // { dg-message "note" } @@ -237,11 +271,13 @@ int test3_146() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_146(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 273 } sink_3_146(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 275 } return 0; } -one sink_3_147( A&); // { dg-message "candidates" } +one sink_3_147( A&); // { dg-message "one sink_3_147|no known conversion" } four sink_3_147(const volatile A&); // { dg-message "note" } seven sink_3_147(volatile A&&); // { dg-message "note" } @@ -252,11 +288,13 @@ int test3_147() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_147(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 290 } sink_3_147(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 292 } return 0; } -one sink_3_156( A&); // { dg-message "candidates" } +one sink_3_156( A&); // { dg-message "one sink_3_156|no known conversion" } five sink_3_156( A&&); // { dg-message "note" } six sink_3_156(const A&&); // { dg-message "" } @@ -268,13 +306,17 @@ int test3_156() const volatile A cva = a; // { dg-error "lvalue" } sink_3_156(ca); // { dg-error "lvalue" } sink_3_156(va); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 308 } sink_3_156(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 310 } sink_3_156(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 312 } sink_3_156(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 314 } return 0; } -one sink_3_157( A&); // { dg-message "candidates" } +one sink_3_157( A&); // { dg-message "one sink_3_157|no known conversion" } five sink_3_157( A&&); // { dg-message "note" } seven sink_3_157(volatile A&&); // { dg-message "" } @@ -285,10 +327,14 @@ int test3_157() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_157(ca); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 329 } sink_3_157(va); // { dg-error "lvalue" } sink_3_157(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 332 } sink_3_157(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 334 } sink_3_157(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 336 } return 0; } @@ -308,7 +354,7 @@ int test3_158() return 0; } -one sink_3_167( A&); // { dg-message "candidates" } +one sink_3_167( A&); // { dg-message "one sink_3_167|no known conversion" } six sink_3_167(const A&&); // { dg-message "" } seven sink_3_167(volatile A&&); // { dg-message "" } @@ -321,8 +367,11 @@ int test3_167() sink_3_167(ca); // { dg-error "lvalue" } sink_3_167(va); // { dg-error "lvalue" } sink_3_167(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 369 } sink_3_167(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 371 } sink_3_167(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 373 } return 0; } @@ -358,7 +407,7 @@ int test3_178() return 0; } -two sink_3_234(const A&); // { dg-message "candidates" } +two sink_3_234(const A&); // { dg-message "two sink_3_234|no known conversion" } three sink_3_234(volatile A&); // { dg-message "note" } four sink_3_234(const volatile A&); // { dg-message "note" } @@ -369,12 +418,15 @@ int test3_234() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_234(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 420 } sink_3_234(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 422 } sink_3_234(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 424 } return 0; } -two sink_3_235(const A&); // { dg-message "candidates" } +two sink_3_235(const A&); // { dg-message "two sink_3_235|no known conversion" } three sink_3_235(volatile A&); // { dg-message "note" } five sink_3_235( A&&); // { dg-message "note" } @@ -385,13 +437,17 @@ int test3_235() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_235(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 439 } sink_3_235(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 441 } sink_3_235(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 443 } sink_3_235(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 445 } return 0; } -two sink_3_236(const A&); // { dg-message "candidates" } +two sink_3_236(const A&); // { dg-message "two sink_3_236|no known conversion" } three sink_3_236(volatile A&); // { dg-message "note" } six sink_3_236(const A&&); // { dg-message "note" } @@ -402,13 +458,17 @@ int test3_236() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_236(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 460 } sink_3_236(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 462 } sink_3_236(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 464 } sink_3_236(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 466 } return 0; } -two sink_3_237(const A&); // { dg-message "candidates" } +two sink_3_237(const A&); // { dg-message "two sink_3_237|no known conversion" } three sink_3_237(volatile A&); // { dg-message "note" } seven sink_3_237(volatile A&&); // { dg-message "note" } @@ -419,14 +479,17 @@ int test3_237() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_237(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 481 } sink_3_237(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 483 } sink_3_237(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 485 } return 0; } -two sink_3_238(const A&); // { dg-message "candidates" } -three sink_3_238(volatile A&); // { dg-message "note" } -eight sink_3_238(const volatile A&&); // { dg-message "" } +two sink_3_238(const A&); // { dg-message "two sink_3_238|no known conversion" } +three sink_3_238(volatile A&); // { dg-message "three sink_3_238|no known conversion" } +eight sink_3_238(const volatile A&&); // { dg-message "eight sink_3_238|no known conversion" } int test3_238() { @@ -435,13 +498,14 @@ int test3_238() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_238(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 500 } sink_3_238(cva); // { dg-error "lvalue" } return 0; } -two sink_3_245(const A&); // { dg-message "candidates" } -four sink_3_245(const volatile A&); // { dg-message "note" } -five sink_3_245( A&&); // { dg-message "note" } +two sink_3_245(const A&); // { dg-message "two sink_3_245|no known conversion" } +four sink_3_245(const volatile A&); // { dg-message "four sink_3_245|no known conversion" } +five sink_3_245( A&&); // { dg-message "five sink_3_245|no known conversion" } int test3_245() { @@ -450,13 +514,15 @@ int test3_245() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_245(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 516 } sink_3_245(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 518 } return 0; } -two sink_3_246(const A&); // { dg-message "candidates" } -four sink_3_246(const volatile A&); // { dg-message "note" } -six sink_3_246(const A&&); // { dg-message "note" } +two sink_3_246(const A&); // { dg-message "two sink_3_246|no known conversion" } +four sink_3_246(const volatile A&); // { dg-message "four sink_3_246|no known conversion" } +six sink_3_246(const A&&); // { dg-message "six sink_3_246|no known conversion" } int test3_246() { @@ -465,13 +531,15 @@ int test3_246() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_246(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 533 } sink_3_246(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 535 } return 0; } -two sink_3_247(const A&); // { dg-message "candidates" } -four sink_3_247(const volatile A&); // { dg-message "note" } -seven sink_3_247(volatile A&&); // { dg-message "note" } +two sink_3_247(const A&); // { dg-message "two sink_3_247|no known conversion" } +four sink_3_247(const volatile A&); // { dg-message "four sink_3_247|no known conversion" } +seven sink_3_247(volatile A&&); // { dg-message "seven sink_3_247|no known conversion" } int test3_247() { @@ -480,12 +548,13 @@ int test3_247() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_247(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 550 } return 0; } -two sink_3_256(const A&); // { dg-message "candidates" } -five sink_3_256( A&&); // { dg-message "note" } -six sink_3_256(const A&&); // { dg-message "note" } +two sink_3_256(const A&); // { dg-message "two sink_3_256|no known conversion" } +five sink_3_256( A&&); // { dg-message "five sink_3_256|no known conversion" } +six sink_3_256(const A&&); // { dg-message "six sink_3_256|no known conversion" } int test3_256() { @@ -494,15 +563,19 @@ int test3_256() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_256(va); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 565 } sink_3_256(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 567 } sink_3_256(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 569 } sink_3_256(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 571 } return 0; } -two sink_3_257(const A&); // { dg-message "candidates" } -five sink_3_257( A&&); // { dg-message "note" } -seven sink_3_257(volatile A&&); // { dg-message "" } +two sink_3_257(const A&); // { dg-message "two sink_3_257|no known conversion" } +five sink_3_257( A&&); // { dg-message "five sink_3_257|no known conversion" } +seven sink_3_257(volatile A&&); // { dg-message "seven sink_3_257|no known conversion" } int test3_257() { @@ -512,7 +585,9 @@ int test3_257() const volatile A cva = a; // { dg-error "lvalue" } sink_3_257(va); // { dg-error "lvalue" } sink_3_257(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 587 } sink_3_257(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 589 } return 0; } @@ -531,9 +606,9 @@ int test3_258() return 0; } -two sink_3_267(const A&); // { dg-message "candidates" } -six sink_3_267(const A&&); // { dg-message "note" } -seven sink_3_267(volatile A&&); // { dg-message "" } +two sink_3_267(const A&); // { dg-message "two sink_3_267|no known conversion" } +six sink_3_267(const A&&); // { dg-message "six sink_3_267|no known conversion" } +seven sink_3_267(volatile A&&); // { dg-message "seven sink_3_267|no known conversion" } int test3_267() { @@ -543,8 +618,11 @@ int test3_267() const volatile A cva = a; // { dg-error "lvalue" } sink_3_267(va); // { dg-error "lvalue" } sink_3_267(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 620 } sink_3_267(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 622 } sink_3_267(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 624 } return 0; } @@ -578,9 +656,9 @@ int test3_278() return 0; } -three sink_3_345(volatile A&); // { dg-message "candidates" } -four sink_3_345(const volatile A&); // { dg-message "note" } -five sink_3_345( A&&); // { dg-message "note" } +three sink_3_345(volatile A&); // { dg-message "three sink_3_345|no known conversion" } +four sink_3_345(const volatile A&); // { dg-message "four sink_3_345|no known conversion" } +five sink_3_345( A&&); // { dg-message "five sink_3_345|no known conversion" } int test3_345() { @@ -589,14 +667,17 @@ int test3_345() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_345(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 669 } sink_3_345(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 671 } sink_3_345(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 673 } return 0; } -three sink_3_346(volatile A&); // { dg-message "candidates" } -four sink_3_346(const volatile A&); // { dg-message "note" } -six sink_3_346(const A&&); // { dg-message "note" } +three sink_3_346(volatile A&); // { dg-message "three sink_3_346|no known conversion" } +four sink_3_346(const volatile A&); // { dg-message "four sink_3_346|no known conversion" } +six sink_3_346(const A&&); // { dg-message "six sink_3_346|no known conversion" } int test3_346() { @@ -605,13 +686,15 @@ int test3_346() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_346(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 688 } sink_3_346(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 690 } return 0; } -three sink_3_347(volatile A&); // { dg-message "candidates" } -four sink_3_347(const volatile A&); // { dg-message "note" } -seven sink_3_347(volatile A&&); // { dg-message "note" } +three sink_3_347(volatile A&); // { dg-message "three sink_3_347|no known conversion" } +four sink_3_347(const volatile A&); // { dg-message "four sink_3_347|no known conversion" } +seven sink_3_347(volatile A&&); // { dg-message "seven sink_3_347|no known conversion" } int test3_347() { @@ -620,13 +703,15 @@ int test3_347() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_347(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 705 } sink_3_347(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 707 } return 0; } -three sink_3_356(volatile A&); // { dg-message "candidates" } -five sink_3_356( A&&); // { dg-message "note" } -six sink_3_356(const A&&); // { dg-message "" } +three sink_3_356(volatile A&); // { dg-message "three sink_3_356|no known conversion" } +five sink_3_356( A&&); // { dg-message "five sink_3_356|no known conversion" } +six sink_3_356(const A&&); // { dg-message "six sink_3_356|no known conversion" } int test3_356() { @@ -636,14 +721,17 @@ int test3_356() const volatile A cva = a; // { dg-error "lvalue" } sink_3_356(ca); // { dg-error "lvalue" } sink_3_356(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 723 } sink_3_356(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 725 } sink_3_356(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 727 } return 0; } -three sink_3_357(volatile A&); // { dg-message "candidates" } -five sink_3_357( A&&); // { dg-message "note" } -seven sink_3_357(volatile A&&); // { dg-message "note" } +three sink_3_357(volatile A&); // { dg-message "three sink_3_357|no known conversion" } +five sink_3_357( A&&); // { dg-message "five sink_3_357|no known conversion" } +seven sink_3_357(volatile A&&); // { dg-message "seven sink_3_357|no known conversion" } int test3_357() { @@ -652,9 +740,13 @@ int test3_357() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_357(ca); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 742 } sink_3_357(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 744 } sink_3_357(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 746 } sink_3_357(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 748 } return 0; } @@ -673,9 +765,9 @@ int test3_358() return 0; } -three sink_3_367(volatile A&); // { dg-message "candidates" } -six sink_3_367(const A&&); // { dg-message "" } -seven sink_3_367(volatile A&&); // { dg-message "note" } +three sink_3_367(volatile A&); // { dg-message "three sink_3_367|no known conversion" } +six sink_3_367(const A&&); // { dg-message "six sink_3_367|no known conversion" } +seven sink_3_367(volatile A&&); // { dg-message "seven sink_3_367|no known conversion" } int test3_367() { @@ -685,8 +777,11 @@ int test3_367() const volatile A cva = a; // { dg-error "lvalue" } sink_3_367(ca); // { dg-error "lvalue" } sink_3_367(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 779 } sink_3_367(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 781 } sink_3_367(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 783 } return 0; } @@ -720,7 +815,7 @@ int test3_378() return 0; } -four sink_3_456(const volatile A&); // { dg-message "candidates" } +four sink_3_456(const volatile A&); // { dg-message "note" } five sink_3_456( A&&); // { dg-message "note" } six sink_3_456(const A&&); // { dg-message "note" } @@ -731,11 +826,13 @@ int test3_456() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_456(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 828 } sink_3_456(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 830 } return 0; } -four sink_3_457(const volatile A&); // { dg-message "candidates" } +four sink_3_457(const volatile A&); // { dg-message "note" } five sink_3_457( A&&); // { dg-message "note" } seven sink_3_457(volatile A&&); // { dg-message "note" } @@ -746,11 +843,13 @@ int test3_457() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_457(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 845 } sink_3_457(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 847 } return 0; } -four sink_3_467(const volatile A&); // { dg-message "candidates" } +four sink_3_467(const volatile A&); // { dg-message "note" } six sink_3_467(const A&&); // { dg-message "note" } seven sink_3_467(volatile A&&); // { dg-message "note" } @@ -761,13 +860,15 @@ int test3_467() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_467(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 862 } sink_3_467(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 864 } return 0; } -five sink_3_567( A&&); // { dg-message "" } -six sink_3_567(const A&&); // { dg-message "" } -seven sink_3_567(volatile A&&); // { dg-message "" } +five sink_3_567( A&&); // { dg-message "five sink_3_567|no known conversion" } +six sink_3_567(const A&&); // { dg-message "six sink_3_567|no known conversion" } +seven sink_3_567(volatile A&&); // { dg-message "seven sink_3_567|no known conversion" } int test3_567() { @@ -779,7 +880,9 @@ int test3_567() sink_3_567(ca); // { dg-error "lvalue" } sink_3_567(va); // { dg-error "lvalue" } sink_3_567(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 882 } sink_3_567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 884 } return 0; } @@ -817,9 +920,9 @@ int test3_578() return 0; } -six sink_3_678(const A&&); // { dg-message "" } -seven sink_3_678(volatile A&&); // { dg-message "" } -eight sink_3_678(const volatile A&&); // { dg-message "" } +six sink_3_678(const A&&); // { dg-message "six sink_3_678|no known conversion" } +seven sink_3_678(volatile A&&); // { dg-message "seven sink_3_678|no known conversion" } +eight sink_3_678(const volatile A&&); // { dg-message "eight sink_3_678|no known conversion" } int test3_678() { @@ -828,10 +931,12 @@ int test3_678() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_678(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 933 } sink_3_678(ca); // { dg-error "lvalue" } sink_3_678(va); // { dg-error "lvalue" } sink_3_678(cva); // { dg-error "lvalue" } sink_3_678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 938 } return 0; } diff --git a/gcc/testsuite/g++.dg/cpp0x/rv4n.C b/gcc/testsuite/g++.dg/cpp0x/rv4n.C index 524885f1d6079d97fc93e1d4f1ed438999238c20..daff30798516ec4c69b0ffb6d74a257bbb83a341 100644 --- a/gcc/testsuite/g++.dg/cpp0x/rv4n.C +++ b/gcc/testsuite/g++.dg/cpp0x/rv4n.C @@ -30,7 +30,7 @@ const volatile A cv_source(); // 4 at a time -one sink_4_1234( A&); // { dg-message "candidates" } +one sink_4_1234( A&); // { dg-message "one sink_4_1234|no known conversion" } two sink_4_1234(const A&); // { dg-message "note" } three sink_4_1234(volatile A&); // { dg-message "note" } four sink_4_1234(const volatile A&); // { dg-message "note" } @@ -42,11 +42,13 @@ int test4_1234() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1234(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 44 } sink_4_1234(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 46 } return 0; } -one sink_4_1235( A&); // { dg-message "candidates" } +one sink_4_1235( A&); // { dg-message "one sink_4_1235|no known conversion" } two sink_4_1235(const A&); // { dg-message "note" } three sink_4_1235(volatile A&); // { dg-message "note" } five sink_4_1235( A&&); // { dg-message "note" } @@ -58,12 +60,15 @@ int test4_1235() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1235(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 62 } sink_4_1235(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 64 } sink_4_1235(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 66 } return 0; } -one sink_4_1236( A&); // { dg-message "candidates" } +one sink_4_1236( A&); // { dg-message "one sink_4_1236|no known conversion" } two sink_4_1236(const A&); // { dg-message "note" } three sink_4_1236(volatile A&); // { dg-message "note" } six sink_4_1236(const A&&); // { dg-message "note" } @@ -75,12 +80,15 @@ int test4_1236() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1236(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 82 } sink_4_1236(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 84 } sink_4_1236(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 86 } return 0; } -one sink_4_1237( A&); // { dg-message "candidates" } +one sink_4_1237( A&); // { dg-message "one sink_4_1237|no known conversion" } two sink_4_1237(const A&); // { dg-message "note" } three sink_4_1237(volatile A&); // { dg-message "note" } seven sink_4_1237(volatile A&&); // { dg-message "note" } @@ -92,7 +100,9 @@ int test4_1237() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1237(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 102 } sink_4_1237(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 104 } return 0; } @@ -111,7 +121,7 @@ int test4_1238() return 0; } -one sink_4_1245( A&); // { dg-message "candidates" } +one sink_4_1245( A&); // { dg-message "one sink_4_1245|no known conversion" } two sink_4_1245(const A&); // { dg-message "note" } four sink_4_1245(const volatile A&); // { dg-message "note" } five sink_4_1245( A&&); // { dg-message "note" } @@ -123,11 +133,13 @@ int test4_1245() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1245(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 135 } sink_4_1245(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 137 } return 0; } -one sink_4_1246( A&); // { dg-message "candidates" } +one sink_4_1246( A&); // { dg-message "one sink_4_1246|no known conversion" } two sink_4_1246(const A&); // { dg-message "note" } four sink_4_1246(const volatile A&); // { dg-message "note" } six sink_4_1246(const A&&); // { dg-message "note" } @@ -139,11 +151,13 @@ int test4_1246() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1246(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 153 } sink_4_1246(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 155 } return 0; } -one sink_4_1247( A&); // { dg-message "candidates" } +one sink_4_1247( A&); // { dg-message "one sink_4_1247|no known conversion" } two sink_4_1247(const A&); // { dg-message "note" } four sink_4_1247(const volatile A&); // { dg-message "note" } seven sink_4_1247(volatile A&&); // { dg-message "note" } @@ -155,10 +169,11 @@ int test4_1247() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1247(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 171 } return 0; } -one sink_4_1256( A&); // { dg-message "candidates" } +one sink_4_1256( A&); // { dg-message "one sink_4_1256|no known conversion" } two sink_4_1256(const A&); // { dg-message "note" } five sink_4_1256( A&&); // { dg-message "note" } six sink_4_1256(const A&&); // { dg-message "note" } @@ -170,13 +185,17 @@ int test4_1256() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1256(va); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 187 } sink_4_1256(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 189 } sink_4_1256(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 191 } sink_4_1256(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 193 } return 0; } -one sink_4_1257( A&); // { dg-message "candidates" } +one sink_4_1257( A&); // { dg-message "one sink_4_1257|no known conversion" } two sink_4_1257(const A&); // { dg-message "note" } five sink_4_1257( A&&); // { dg-message "note" } seven sink_4_1257(volatile A&&); // { dg-message "" } @@ -189,7 +208,9 @@ int test4_1257() const volatile A cva = a; // { dg-error "lvalue" } sink_4_1257(va); // { dg-error "lvalue" } sink_4_1257(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 210 } sink_4_1257(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 212 } return 0; } @@ -209,7 +230,7 @@ int test4_1258() return 0; } -one sink_4_1267( A&); // { dg-message "candidates" } +one sink_4_1267( A&); // { dg-message "one sink_4_1267|no known conversion" } two sink_4_1267(const A&); // { dg-message "note" } six sink_4_1267(const A&&); // { dg-message "note" } seven sink_4_1267(volatile A&&); // { dg-message "" } @@ -222,8 +243,11 @@ int test4_1267() const volatile A cva = a; // { dg-error "lvalue" } sink_4_1267(va); // { dg-error "lvalue" } sink_4_1267(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 245 } sink_4_1267(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 247 } sink_4_1267(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 249 } return 0; } @@ -259,7 +283,7 @@ int test4_1278() return 0; } -one sink_4_1345( A&); // { dg-message "candidates" } +one sink_4_1345( A&); // { dg-message "one sink_4_1345|no known conversion" } three sink_4_1345(volatile A&); // { dg-message "note" } four sink_4_1345(const volatile A&); // { dg-message "note" } five sink_4_1345( A&&); // { dg-message "note" } @@ -271,12 +295,15 @@ int test4_1345() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1345(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 297 } sink_4_1345(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 299 } sink_4_1345(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 301 } return 0; } -one sink_4_1346( A&); // { dg-message "candidates" } +one sink_4_1346( A&); // { dg-message "one sink_4_1346|no known conversion" } three sink_4_1346(volatile A&); // { dg-message "note" } four sink_4_1346(const volatile A&); // { dg-message "note" } six sink_4_1346(const A&&); // { dg-message "note" } @@ -288,11 +315,13 @@ int test4_1346() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1346(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 317 } sink_4_1346(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 319 } return 0; } -one sink_4_1347( A&); // { dg-message "candidates" } +one sink_4_1347( A&); // { dg-message "one sink_4_1347|no known conversion" } three sink_4_1347(volatile A&); // { dg-message "note" } four sink_4_1347(const volatile A&); // { dg-message "note" } seven sink_4_1347(volatile A&&); // { dg-message "note" } @@ -304,11 +333,13 @@ int test4_1347() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1347(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 335 } sink_4_1347(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 337 } return 0; } -one sink_4_1356( A&); // { dg-message "candidates" } +one sink_4_1356( A&); // { dg-message "one sink_4_1356|no known conversion" } three sink_4_1356(volatile A&); // { dg-message "note" } five sink_4_1356( A&&); // { dg-message "note" } six sink_4_1356(const A&&); // { dg-message "" } @@ -321,12 +352,15 @@ int test4_1356() const volatile A cva = a; // { dg-error "lvalue" } sink_4_1356(ca); // { dg-error "lvalue" } sink_4_1356(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 354 } sink_4_1356(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 356 } sink_4_1356(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 358 } return 0; } -one sink_4_1357( A&); // { dg-message "candidates" } +one sink_4_1357( A&); // { dg-message "one sink_4_1357|no known conversion" } three sink_4_1357(volatile A&); // { dg-message "note" } five sink_4_1357( A&&); // { dg-message "note" } seven sink_4_1357(volatile A&&); // { dg-message "note" } @@ -338,9 +372,13 @@ int test4_1357() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1357(ca); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 374 } sink_4_1357(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 376 } sink_4_1357(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 378 } sink_4_1357(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 380 } return 0; } @@ -360,7 +398,7 @@ int test4_1358() return 0; } -one sink_4_1367( A&); // { dg-message "candidates" } +one sink_4_1367( A&); // { dg-message "one sink_4_1367|no known conversion" } three sink_4_1367(volatile A&); // { dg-message "note" } six sink_4_1367(const A&&); // { dg-message "" } seven sink_4_1367(volatile A&&); // { dg-message "note" } @@ -373,8 +411,11 @@ int test4_1367() const volatile A cva = a; // { dg-error "lvalue" } sink_4_1367(ca); // { dg-error "lvalue" } sink_4_1367(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 413 } sink_4_1367(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 415 } sink_4_1367(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 417 } return 0; } @@ -410,7 +451,7 @@ int test4_1378() return 0; } -one sink_4_1456( A&); // { dg-message "candidates" } +one sink_4_1456( A&); // { dg-message "one sink_4_1456|no known conversion" } four sink_4_1456(const volatile A&); // { dg-message "note" } five sink_4_1456( A&&); // { dg-message "note" } six sink_4_1456(const A&&); // { dg-message "note" } @@ -422,11 +463,13 @@ int test4_1456() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1456(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 465 } sink_4_1456(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 467 } return 0; } -one sink_4_1457( A&); // { dg-message "candidates" } +one sink_4_1457( A&); // { dg-message "one sink_4_1457|no known conversion" } four sink_4_1457(const volatile A&); // { dg-message "note" } five sink_4_1457( A&&); // { dg-message "note" } seven sink_4_1457(volatile A&&); // { dg-message "note" } @@ -438,11 +481,13 @@ int test4_1457() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1457(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 483 } sink_4_1457(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 485 } return 0; } -one sink_4_1467( A&); // { dg-message "candidates" } +one sink_4_1467( A&); // { dg-message "one sink_4_1467|no known conversion" } four sink_4_1467(const volatile A&); // { dg-message "note" } six sink_4_1467(const A&&); // { dg-message "note" } seven sink_4_1467(volatile A&&); // { dg-message "note" } @@ -454,11 +499,13 @@ int test4_1467() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1467(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 501 } sink_4_1467(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 503 } return 0; } -one sink_4_1567( A&); // { dg-message "candidates" } +one sink_4_1567( A&); // { dg-message "one sink_4_1567|no known conversion" } five sink_4_1567( A&&); // { dg-message "note" } six sink_4_1567(const A&&); // { dg-message "" } seven sink_4_1567(volatile A&&); // { dg-message "" } @@ -472,7 +519,9 @@ int test4_1567() sink_4_1567(ca); // { dg-error "lvalue" } sink_4_1567(va); // { dg-error "lvalue" } sink_4_1567(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 521 } sink_4_1567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 523 } return 0; } @@ -525,10 +574,11 @@ int test4_1678() sink_4_1678(va); // { dg-error "lvalue" } sink_4_1678(cva); // { dg-error "lvalue" } sink_4_1678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 576 } return 0; } -two sink_4_2345(const A&); // { dg-message "candidates" } +two sink_4_2345(const A&); // { dg-message "two sink_4_2345|no known conversion" } three sink_4_2345(volatile A&); // { dg-message "note" } four sink_4_2345(const volatile A&); // { dg-message "note" } five sink_4_2345( A&&); // { dg-message "note" } @@ -540,12 +590,15 @@ int test4_2345() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_2345(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 592 } sink_4_2345(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 594 } sink_4_2345(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 596 } return 0; } -two sink_4_2346(const A&); // { dg-message "candidates" } +two sink_4_2346(const A&); // { dg-message "two sink_4_2346|no known conversion" } three sink_4_2346(volatile A&); // { dg-message "note" } four sink_4_2346(const volatile A&); // { dg-message "note" } six sink_4_2346(const A&&); // { dg-message "note" } @@ -557,12 +610,15 @@ int test4_2346() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_2346(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 612 } sink_4_2346(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 614 } sink_4_2346(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 616 } return 0; } -two sink_4_2347(const A&); // { dg-message "candidates" } +two sink_4_2347(const A&); // { dg-message "two sink_4_2347|no known conversion" } three sink_4_2347(volatile A&); // { dg-message "note" } four sink_4_2347(const volatile A&); // { dg-message "note" } seven sink_4_2347(volatile A&&); // { dg-message "note" } @@ -574,11 +630,13 @@ int test4_2347() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_2347(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 632 } sink_4_2347(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 634 } return 0; } -two sink_4_2348(const A&); // { dg-message "candidates" } +two sink_4_2348(const A&); // { dg-message "note" } three sink_4_2348(volatile A&); // { dg-message "note" } four sink_4_2348(const volatile A&); // { dg-message "note" } eight sink_4_2348(const volatile A&&); // { dg-message "note" } @@ -590,10 +648,11 @@ int test4_2348() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_2348(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 650 } return 0; } -two sink_4_2356(const A&); // { dg-message "candidates" } +two sink_4_2356(const A&); // { dg-message "two sink_4_2356|no known conversion" } three sink_4_2356(volatile A&); // { dg-message "note" } five sink_4_2356( A&&); // { dg-message "note" } six sink_4_2356(const A&&); // { dg-message "note" } @@ -605,13 +664,17 @@ int test4_2356() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_2356(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 666 } sink_4_2356(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 668 } sink_4_2356(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 670 } sink_4_2356(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 672 } return 0; } -two sink_4_2357(const A&); // { dg-message "candidates" } +two sink_4_2357(const A&); // { dg-message "two sink_4_2357|no known conversion" } three sink_4_2357(volatile A&); // { dg-message "note" } five sink_4_2357( A&&); // { dg-message "note" } seven sink_4_2357(volatile A&&); // { dg-message "note" } @@ -623,12 +686,15 @@ int test4_2357() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_2357(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 688 } sink_4_2357(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 690 } sink_4_2357(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 692 } return 0; } -two sink_4_2358(const A&); // { dg-message "candidates" } +two sink_4_2358(const A&); // { dg-message "note" } three sink_4_2358(volatile A&); // { dg-message "note" } five sink_4_2358( A&&); // { dg-message "note" } eight sink_4_2358(const volatile A&&); // { dg-message "" } @@ -640,11 +706,12 @@ int test4_2358() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_2358(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 708 } sink_4_2358(cva); // { dg-error "lvalue" } return 0; } -two sink_4_2367(const A&); // { dg-message "candidates" } +two sink_4_2367(const A&); // { dg-message "two sink_4_2367|no known conversion" } three sink_4_2367(volatile A&); // { dg-message "note" } six sink_4_2367(const A&&); // { dg-message "note" } seven sink_4_2367(volatile A&&); // { dg-message "note" } @@ -656,13 +723,17 @@ int test4_2367() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_2367(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 725 } sink_4_2367(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 727 } sink_4_2367(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 729 } sink_4_2367(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 731 } return 0; } -two sink_4_2368(const A&); // { dg-message "candidates" } +two sink_4_2368(const A&); // { dg-message "note" } three sink_4_2368(volatile A&); // { dg-message "note" } six sink_4_2368(const A&&); // { dg-message "note" } eight sink_4_2368(const volatile A&&); // { dg-message "" } @@ -674,11 +745,12 @@ int test4_2368() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_2368(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 747 } sink_4_2368(cva); // { dg-error "lvalue" } return 0; } -two sink_4_2378(const A&); // { dg-message "candidates" } +two sink_4_2378(const A&); // { dg-message "note" } three sink_4_2378(volatile A&); // { dg-message "note" } seven sink_4_2378(volatile A&&); // { dg-message "note" } eight sink_4_2378(const volatile A&&); // { dg-message "" } @@ -690,11 +762,12 @@ int test4_2378() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_2378(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 764 } sink_4_2378(cva); // { dg-error "lvalue" } return 0; } -two sink_4_2456(const A&); // { dg-message "candidates" } +two sink_4_2456(const A&); // { dg-message "two sink_4_2456|no known conversion" } four sink_4_2456(const volatile A&); // { dg-message "note" } five sink_4_2456( A&&); // { dg-message "note" } six sink_4_2456(const A&&); // { dg-message "note" } @@ -706,11 +779,13 @@ int test4_2456() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_2456(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 781 } sink_4_2456(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 783 } return 0; } -two sink_4_2457(const A&); // { dg-message "candidates" } +two sink_4_2457(const A&); // { dg-message "two sink_4_2457|no known conversion" } four sink_4_2457(const volatile A&); // { dg-message "note" } five sink_4_2457( A&&); // { dg-message "note" } seven sink_4_2457(volatile A&&); // { dg-message "note" } @@ -722,10 +797,11 @@ int test4_2457() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_2457(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 799 } return 0; } -two sink_4_2467(const A&); // { dg-message "candidates" } +two sink_4_2467(const A&); // { dg-message "two sink_4_2467|no known conversion" } four sink_4_2467(const volatile A&); // { dg-message "note" } six sink_4_2467(const A&&); // { dg-message "note" } seven sink_4_2467(volatile A&&); // { dg-message "note" } @@ -737,11 +813,13 @@ int test4_2467() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_2467(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 815 } sink_4_2467(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 817 } return 0; } -two sink_4_2567(const A&); // { dg-message "candidates" } +two sink_4_2567(const A&); // { dg-message "two sink_4_2567|no known conversion" } five sink_4_2567( A&&); // { dg-message "note" } six sink_4_2567(const A&&); // { dg-message "note" } seven sink_4_2567(volatile A&&); // { dg-message "" } @@ -754,7 +832,9 @@ int test4_2567() const volatile A cva = a; // { dg-error "lvalue" } sink_4_2567(va); // { dg-error "lvalue" } sink_4_2567(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 834 } sink_4_2567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 836 } return 0; } @@ -790,7 +870,7 @@ int test4_2578() return 0; } -two sink_4_2678(const A&); // { dg-message "candidates" } +two sink_4_2678(const A&); // { dg-message "note" } six sink_4_2678(const A&&); // { dg-message "note" } seven sink_4_2678(volatile A&&); // { dg-message "" } eight sink_4_2678(const volatile A&&); // { dg-message "" } @@ -804,10 +884,11 @@ int test4_2678() sink_4_2678(va); // { dg-error "lvalue" } sink_4_2678(cva); // { dg-error "lvalue" } sink_4_2678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 886 } return 0; } -three sink_4_3456(volatile A&); // { dg-message "candidates" } +three sink_4_3456(volatile A&); // { dg-message "three sink_4_3456|no known conversion" } four sink_4_3456(const volatile A&); // { dg-message "note" } five sink_4_3456( A&&); // { dg-message "note" } six sink_4_3456(const A&&); // { dg-message "note" } @@ -819,11 +900,13 @@ int test4_3456() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_3456(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 902 } sink_4_3456(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 904 } return 0; } -three sink_4_3457(volatile A&); // { dg-message "candidates" } +three sink_4_3457(volatile A&); // { dg-message "three sink_4_3457|no known conversion" } four sink_4_3457(const volatile A&); // { dg-message "note" } five sink_4_3457( A&&); // { dg-message "note" } seven sink_4_3457(volatile A&&); // { dg-message "note" } @@ -835,11 +918,13 @@ int test4_3457() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_3457(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 920 } sink_4_3457(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 922 } return 0; } -three sink_4_3467(volatile A&); // { dg-message "candidates" } +three sink_4_3467(volatile A&); // { dg-message "three sink_4_3467|no known conversion" } four sink_4_3467(const volatile A&); // { dg-message "note" } six sink_4_3467(const A&&); // { dg-message "note" } seven sink_4_3467(volatile A&&); // { dg-message "note" } @@ -851,11 +936,13 @@ int test4_3467() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_3467(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 938 } sink_4_3467(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 940 } return 0; } -three sink_4_3567(volatile A&); // { dg-message "candidates" } +three sink_4_3567(volatile A&); // { dg-message "three sink_4_3567|no known conversion" } five sink_4_3567( A&&); // { dg-message "note" } six sink_4_3567(const A&&); // { dg-message "" } seven sink_4_3567(volatile A&&); // { dg-message "note" } @@ -868,7 +955,9 @@ int test4_3567() const volatile A cva = a; // { dg-error "lvalue" } sink_4_3567(ca); // { dg-error "lvalue" } sink_4_3567(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 957 } sink_4_3567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 959 } return 0; } @@ -918,10 +1007,11 @@ int test4_3678() sink_4_3678(ca); // { dg-error "lvalue" } sink_4_3678(cva); // { dg-error "lvalue" } sink_4_3678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 1009 } return 0; } -four sink_4_4567(const volatile A&); // { dg-message "candidates" } +four sink_4_4567(const volatile A&); // { dg-message "note" } five sink_4_4567( A&&); // { dg-message "note" } six sink_4_4567(const A&&); // { dg-message "note" } seven sink_4_4567(volatile A&&); // { dg-message "note" } @@ -933,11 +1023,12 @@ int test4_4567() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_4567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 1025 } return 0; } four sink_4_4678(const volatile A&); -six sink_4_4678(const A&&); // { dg-message "candidates" } +six sink_4_4678(const A&&); // { dg-message "note" } seven sink_4_4678(volatile A&&); // { dg-message "note" } eight sink_4_4678(const volatile A&&); // { dg-message "note" } @@ -948,6 +1039,7 @@ int test4_4678() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_4678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 1041 } return 0; } diff --git a/gcc/testsuite/g++.dg/cpp0x/rv5n.C b/gcc/testsuite/g++.dg/cpp0x/rv5n.C index 92ec1d925e1f85a43a87aee7f791594e9056b9d2..660a68986a0c125226d0c8c1a7882a7a0e73b6c1 100644 --- a/gcc/testsuite/g++.dg/cpp0x/rv5n.C +++ b/gcc/testsuite/g++.dg/cpp0x/rv5n.C @@ -30,7 +30,7 @@ const volatile A cv_source(); // 5 at a time -one sink_5_12345( A&); // { dg-message "candidates" } +one sink_5_12345( A&); // { dg-message "one sink_5_12345|no known conversion" } two sink_5_12345(const A&); // { dg-message "note" } three sink_5_12345(volatile A&); // { dg-message "note" } four sink_5_12345(const volatile A&); // { dg-message "note" } @@ -43,11 +43,13 @@ int test5_12345() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_12345(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 45 } sink_5_12345(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 47 } return 0; } -one sink_5_12346( A&); // { dg-message "candidates" } +one sink_5_12346( A&); // { dg-message "one sink_5_12346|no known conversion" } two sink_5_12346(const A&); // { dg-message "note" } three sink_5_12346(volatile A&); // { dg-message "note" } four sink_5_12346(const volatile A&); // { dg-message "note" } @@ -60,11 +62,13 @@ int test5_12346() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_12346(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 64 } sink_5_12346(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 66 } return 0; } -one sink_5_12347( A&); // { dg-message "candidates" } +one sink_5_12347( A&); // { dg-message "one sink_5_12347|no known conversion" } two sink_5_12347(const A&); // { dg-message "note" } three sink_5_12347(volatile A&); // { dg-message "note" } four sink_5_12347(const volatile A&); // { dg-message "note" } @@ -77,10 +81,11 @@ int test5_12347() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_12347(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 83 } return 0; } -one sink_5_12356( A&); // { dg-message "candidates" } +one sink_5_12356( A&); // { dg-message "one sink_5_12356|no known conversion" } two sink_5_12356(const A&); // { dg-message "note" } three sink_5_12356(volatile A&); // { dg-message "note" } five sink_5_12356( A&&); // { dg-message "note" } @@ -93,12 +98,15 @@ int test5_12356() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_12356(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 100 } sink_5_12356(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 102 } sink_5_12356(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 104 } return 0; } -one sink_5_12357( A&); // { dg-message "candidates" } +one sink_5_12357( A&); // { dg-message "one sink_5_12357|no known conversion" } two sink_5_12357(const A&); // { dg-message "note" } three sink_5_12357(volatile A&); // { dg-message "note" } five sink_5_12357( A&&); // { dg-message "note" } @@ -111,7 +119,9 @@ int test5_12357() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_12357(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 121 } sink_5_12357(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 123 } return 0; } @@ -131,7 +141,7 @@ int test5_12358() return 0; } -one sink_5_12367( A&); // { dg-message "candidates" } +one sink_5_12367( A&); // { dg-message "one sink_5_12367|no known conversion" } two sink_5_12367(const A&); // { dg-message "note" } three sink_5_12367(volatile A&); // { dg-message "note" } six sink_5_12367(const A&&); // { dg-message "note" } @@ -144,8 +154,11 @@ int test5_12367() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_12367(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 156 } sink_5_12367(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 158 } sink_5_12367(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 160 } return 0; } @@ -181,7 +194,7 @@ int test5_12378() return 0; } -one sink_5_12456( A&); // { dg-message "candidates" } +one sink_5_12456( A&); // { dg-message "one sink_5_12456|no known conversion" } two sink_5_12456(const A&); // { dg-message "note" } four sink_5_12456(const volatile A&); // { dg-message "note" } five sink_5_12456( A&&); // { dg-message "note" } @@ -194,11 +207,13 @@ int test5_12456() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_12456(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 209 } sink_5_12456(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 211 } return 0; } -one sink_5_12457( A&); // { dg-message "candidates" } +one sink_5_12457( A&); // { dg-message "one sink_5_12457|no known conversion" } two sink_5_12457(const A&); // { dg-message "note" } four sink_5_12457(const volatile A&); // { dg-message "note" } five sink_5_12457( A&&); // { dg-message "note" } @@ -211,10 +226,11 @@ int test5_12457() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_12457(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 228 } return 0; } -one sink_5_12467( A&); // { dg-message "candidates" } +one sink_5_12467( A&); // { dg-message "one sink_5_12467|no known conversion" } two sink_5_12467(const A&); // { dg-message "note" } four sink_5_12467(const volatile A&); // { dg-message "note" } six sink_5_12467(const A&&); // { dg-message "note" } @@ -227,11 +243,13 @@ int test5_12467() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_12467(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 245 } sink_5_12467(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 247 } return 0; } -one sink_5_12567( A&); // { dg-message "candidates" } +one sink_5_12567( A&); // { dg-message "one sink_5_12567|no known conversion" } two sink_5_12567(const A&); // { dg-message "note" } five sink_5_12567( A&&); // { dg-message "note" } six sink_5_12567(const A&&); // { dg-message "note" } @@ -245,7 +263,9 @@ int test5_12567() const volatile A cva = a; // { dg-error "lvalue" } sink_5_12567(va); // { dg-error "lvalue" } sink_5_12567(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 265 } sink_5_12567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 267 } return 0; } @@ -284,7 +304,7 @@ int test5_12578() } one sink_5_12678( A&); -two sink_5_12678(const A&); // { dg-message "candidates" } +two sink_5_12678(const A&); // { dg-message "note" } six sink_5_12678(const A&&); // { dg-message "note" } seven sink_5_12678(volatile A&&); // { dg-message "" } eight sink_5_12678(const volatile A&&); // { dg-message "" } @@ -298,10 +318,11 @@ int test5_12678() sink_5_12678(va); // { dg-error "lvalue" } sink_5_12678(cva); // { dg-error "lvalue" } sink_5_12678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 320 } return 0; } -one sink_5_13456( A&); // { dg-message "candidates" } +one sink_5_13456( A&); // { dg-message "one sink_5_13456|no known conversion" } three sink_5_13456(volatile A&); // { dg-message "note" } four sink_5_13456(const volatile A&); // { dg-message "note" } five sink_5_13456( A&&); // { dg-message "note" } @@ -314,11 +335,13 @@ int test5_13456() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_13456(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 337 } sink_5_13456(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 339 } return 0; } -one sink_5_13457( A&); // { dg-message "candidates" } +one sink_5_13457( A&); // { dg-message "one sink_5_13457|no known conversion" } three sink_5_13457(volatile A&); // { dg-message "note" } four sink_5_13457(const volatile A&); // { dg-message "note" } five sink_5_13457( A&&); // { dg-message "note" } @@ -331,11 +354,13 @@ int test5_13457() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_13457(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 356 } sink_5_13457(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 358 } return 0; } -one sink_5_13467( A&); // { dg-message "candidates" } +one sink_5_13467( A&); // { dg-message "one sink_5_13467|no known conversion" } three sink_5_13467(volatile A&); // { dg-message "note" } four sink_5_13467(const volatile A&); // { dg-message "note" } six sink_5_13467(const A&&); // { dg-message "note" } @@ -348,11 +373,13 @@ int test5_13467() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_13467(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 375 } sink_5_13467(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 377 } return 0; } -one sink_5_13567( A&); // { dg-message "candidates" } +one sink_5_13567( A&); // { dg-message "one sink_5_13567|no known conversion" } three sink_5_13567(volatile A&); // { dg-message "note" } five sink_5_13567( A&&); // { dg-message "note" } six sink_5_13567(const A&&); // { dg-message "" } @@ -366,7 +393,9 @@ int test5_13567() const volatile A cva = a; // { dg-error "lvalue" } sink_5_13567(ca); // { dg-error "lvalue" } sink_5_13567(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 395 } sink_5_13567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 397 } return 0; } @@ -419,10 +448,11 @@ int test5_13678() sink_5_13678(ca); // { dg-error "lvalue" } sink_5_13678(cva); // { dg-error "lvalue" } sink_5_13678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 450 } return 0; } -one sink_5_14567( A&); // { dg-message "candidates" } +one sink_5_14567( A&); // { dg-message "one sink_5_14567|no known conversion" } four sink_5_14567(const volatile A&); // { dg-message "note" } five sink_5_14567( A&&); // { dg-message "note" } six sink_5_14567(const A&&); // { dg-message "note" } @@ -435,12 +465,13 @@ int test5_14567() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_14567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 467 } return 0; } one sink_5_14678( A&); four sink_5_14678(const volatile A&); -six sink_5_14678(const A&&); // { dg-message "candidates" } +six sink_5_14678(const A&&); // { dg-message "note" } seven sink_5_14678(volatile A&&); // { dg-message "note" } eight sink_5_14678(const volatile A&&); // { dg-message "note" } @@ -451,6 +482,7 @@ int test5_14678() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_14678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 484 } return 0; } @@ -472,7 +504,7 @@ int test5_15678() return 0; } -two sink_5_23456(const A&); // { dg-message "candidates" } +two sink_5_23456(const A&); // { dg-message "two sink_5_23456|no known conversion" } three sink_5_23456(volatile A&); // { dg-message "note" } four sink_5_23456(const volatile A&); // { dg-message "note" } five sink_5_23456( A&&); // { dg-message "note" } @@ -485,12 +517,15 @@ int test5_23456() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_23456(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 519 } sink_5_23456(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 521 } sink_5_23456(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 523 } return 0; } -two sink_5_23457(const A&); // { dg-message "candidates" } +two sink_5_23457(const A&); // { dg-message "two sink_5_23457|no known conversion" } three sink_5_23457(volatile A&); // { dg-message "note" } four sink_5_23457(const volatile A&); // { dg-message "note" } five sink_5_23457( A&&); // { dg-message "note" } @@ -503,11 +538,13 @@ int test5_23457() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_23457(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 540 } sink_5_23457(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 542 } return 0; } -two sink_5_23458(const A&); // { dg-message "candidates" } +two sink_5_23458(const A&); // { dg-message "note" } three sink_5_23458(volatile A&); // { dg-message "note" } four sink_5_23458(const volatile A&); // { dg-message "note" } five sink_5_23458( A&&); // { dg-message "note" } @@ -520,10 +557,11 @@ int test5_23458() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_23458(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 559 } return 0; } -two sink_5_23467(const A&); // { dg-message "candidates" } +two sink_5_23467(const A&); // { dg-message "two sink_5_23467|no known conversion" } three sink_5_23467(volatile A&); // { dg-message "note" } four sink_5_23467(const volatile A&); // { dg-message "note" } six sink_5_23467(const A&&); // { dg-message "note" } @@ -536,12 +574,15 @@ int test5_23467() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_23467(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 576 } sink_5_23467(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 578 } sink_5_23467(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 580 } return 0; } -two sink_5_23468(const A&); // { dg-message "candidates" } +two sink_5_23468(const A&); // { dg-message "note" } three sink_5_23468(volatile A&); // { dg-message "note" } four sink_5_23468(const volatile A&); // { dg-message "note" } six sink_5_23468(const A&&); // { dg-message "note" } @@ -554,10 +595,11 @@ int test5_23468() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_23468(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 597 } return 0; } -two sink_5_23478(const A&); // { dg-message "candidates" } +two sink_5_23478(const A&); // { dg-message "note" } three sink_5_23478(volatile A&); // { dg-message "note" } four sink_5_23478(const volatile A&); // { dg-message "note" } seven sink_5_23478(volatile A&&); // { dg-message "note" } @@ -570,10 +612,11 @@ int test5_23478() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_23478(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 614 } return 0; } -two sink_5_23567(const A&); // { dg-message "candidates" } +two sink_5_23567(const A&); // { dg-message "two sink_5_23567|no known conversion" } three sink_5_23567(volatile A&); // { dg-message "note" } five sink_5_23567( A&&); // { dg-message "note" } six sink_5_23567(const A&&); // { dg-message "note" } @@ -586,12 +629,15 @@ int test5_23567() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_23567(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 631 } sink_5_23567(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 633 } sink_5_23567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 635 } return 0; } -two sink_5_23568(const A&); // { dg-message "candidates" } +two sink_5_23568(const A&); // { dg-message "note" } three sink_5_23568(volatile A&); // { dg-message "note" } five sink_5_23568( A&&); // { dg-message "note" } six sink_5_23568(const A&&); // { dg-message "note" } @@ -605,10 +651,11 @@ int test5_23568() const volatile A cva = a; // { dg-error "lvalue" } sink_5_23568(cva); // { dg-error "lvalue" } sink_5_23568(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 653 } return 0; } -two sink_5_23578(const A&); // { dg-message "candidates" } +two sink_5_23578(const A&); // { dg-message "note" } three sink_5_23578(volatile A&); // { dg-message "note" } five sink_5_23578( A&&); // { dg-message "note" } seven sink_5_23578(volatile A&&); // { dg-message "note" } @@ -622,10 +669,11 @@ int test5_23578() const volatile A cva = a; // { dg-error "lvalue" } sink_5_23578(cva); // { dg-error "lvalue" } sink_5_23578(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 671 } return 0; } -two sink_5_23678(const A&); // { dg-message "candidates" } +two sink_5_23678(const A&); // { dg-message "note" } three sink_5_23678(volatile A&); // { dg-message "note" } six sink_5_23678(const A&&); // { dg-message "note" } seven sink_5_23678(volatile A&&); // { dg-message "note" } @@ -638,12 +686,14 @@ int test5_23678() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_23678(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 688 } sink_5_23678(cva); // { dg-error "lvalue" } sink_5_23678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 691 } return 0; } -two sink_5_24567(const A&); // { dg-message "candidates" } +two sink_5_24567(const A&); // { dg-message "two sink_5_24567|no known conversion" } four sink_5_24567(const volatile A&); // { dg-message "note" } five sink_5_24567( A&&); // { dg-message "note" } six sink_5_24567(const A&&); // { dg-message "note" } @@ -656,10 +706,11 @@ int test5_24567() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_24567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 708 } return 0; } -two sink_5_24678(const A&); // { dg-message "candidates" } +two sink_5_24678(const A&); // { dg-message "note" } four sink_5_24678(const volatile A&); six sink_5_24678(const A&&); // { dg-message "note" } seven sink_5_24678(volatile A&&); // { dg-message "note" } @@ -672,6 +723,7 @@ int test5_24678() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_24678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 725 } return 0; } @@ -692,7 +744,7 @@ int test5_25678() return 0; } -three sink_5_34567(volatile A&); // { dg-message "candidates" } +three sink_5_34567(volatile A&); // { dg-message "three sink_5_34567|no known conversion" } four sink_5_34567(const volatile A&); // { dg-message "note" } five sink_5_34567( A&&); // { dg-message "note" } six sink_5_34567(const A&&); // { dg-message "note" } @@ -705,12 +757,13 @@ int test5_34567() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_34567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 759 } return 0; } three sink_5_34678(volatile A&); four sink_5_34678(const volatile A&); -six sink_5_34678(const A&&); // { dg-message "candidates" } +six sink_5_34678(const A&&); // { dg-message "note" } seven sink_5_34678(volatile A&&); // { dg-message "note" } eight sink_5_34678(const volatile A&&); // { dg-message "note" } @@ -721,6 +774,7 @@ int test5_34678() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_34678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 776 } return 0; } diff --git a/gcc/testsuite/g++.dg/cpp0x/rv6n.C b/gcc/testsuite/g++.dg/cpp0x/rv6n.C index 6a81f66fa5c19a5f3541159e7cb47b9549036a35..d0fdbb7e509db11c9408fe425ea0a37a891b80e6 100644 --- a/gcc/testsuite/g++.dg/cpp0x/rv6n.C +++ b/gcc/testsuite/g++.dg/cpp0x/rv6n.C @@ -30,7 +30,7 @@ const volatile A cv_source(); // 6 at a time -one sink_6_123456( A&); // { dg-message "candidates" } +one sink_6_123456( A&); // { dg-message "one sink_6_123456|no known conversion" } two sink_6_123456(const A&); // { dg-message "note" } three sink_6_123456(volatile A&); // { dg-message "note" } four sink_6_123456(const volatile A&); // { dg-message "note" } @@ -44,11 +44,13 @@ int test6_123456() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_6_123456(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 46 } sink_6_123456(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 48 } return 0; } -one sink_6_123457( A&); // { dg-message "candidates" } +one sink_6_123457( A&); // { dg-message "one sink_6_123457|no known conversion" } two sink_6_123457(const A&); // { dg-message "note" } three sink_6_123457(volatile A&); // { dg-message "note" } four sink_6_123457(const volatile A&); // { dg-message "note" } @@ -62,10 +64,11 @@ int test6_123457() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_6_123457(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 66 } return 0; } -two sink_6_235678(const A&); // { dg-message "candidates" } +two sink_6_235678(const A&); // { dg-message "note" } three sink_6_235678(volatile A&); // { dg-message "note" } five sink_6_235678( A&&); // { dg-message "note" } six sink_6_235678(const A&&); // { dg-message "note" } @@ -79,11 +82,12 @@ int test6_235678() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_6_235678(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 84 } sink_6_235678(cva); // { dg-error "lvalue" } return 0; } -two sink_6_234678(const A&); // { dg-message "candidates" } +two sink_6_234678(const A&); // { dg-message "note" } three sink_6_234678(volatile A&); // { dg-message "note" } four sink_6_234678(const volatile A&); // { dg-message "note" } six sink_6_234678(const A&&); // { dg-message "note" } @@ -97,11 +101,13 @@ int test6_234678() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_6_234678(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 103 } sink_6_234678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 105 } return 0; } -two sink_6_234578(const A&); // { dg-message "candidates" } +two sink_6_234578(const A&); // { dg-message "note" } three sink_6_234578(volatile A&); // { dg-message "note" } four sink_6_234578(const volatile A&); // { dg-message "note" } five sink_6_234578( A&&); // { dg-message "note" } @@ -115,10 +121,11 @@ int test6_234578() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_6_234578(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 123 } return 0; } -two sink_6_234568(const A&); // { dg-message "candidates" } +two sink_6_234568(const A&); // { dg-message "note" } three sink_6_234568(volatile A&); // { dg-message "note" } four sink_6_234568(const volatile A&); // { dg-message "note" } five sink_6_234568( A&&); // { dg-message "note" } @@ -132,10 +139,11 @@ int test6_234568() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_6_234568(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 141 } return 0; } -two sink_6_234567(const A&); // { dg-message "candidates" } +two sink_6_234567(const A&); // { dg-message "two sink_6_234567|no known conversion" } three sink_6_234567(volatile A&); // { dg-message "note" } four sink_6_234567(const volatile A&); // { dg-message "note" } five sink_6_234567( A&&); // { dg-message "note" } @@ -149,14 +157,16 @@ int test6_234567() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_6_234567(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 159 } sink_6_234567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 161 } return 0; } one sink_6_134678( A&); three sink_6_134678(volatile A&); four sink_6_134678(const volatile A&); -six sink_6_134678(const A&&); // { dg-message "candidates" } +six sink_6_134678(const A&&); // { dg-message "note" } seven sink_6_134678(volatile A&&); // { dg-message "note" } eight sink_6_134678(const volatile A&&); // { dg-message "note" } @@ -167,11 +177,12 @@ int test6_134678() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_6_134678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 179 } return 0; } one sink_6_124678( A&); -two sink_6_124678(const A&); // { dg-message "candidates" } +two sink_6_124678(const A&); // { dg-message "note" } four sink_6_124678(const volatile A&); six sink_6_124678(const A&&); // { dg-message "note" } seven sink_6_124678(volatile A&&); // { dg-message "note" } @@ -184,11 +195,12 @@ int test6_124678() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_6_124678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 197 } return 0; } one sink_6_123678( A&); -two sink_6_123678(const A&); // { dg-message "candidates" } +two sink_6_123678(const A&); // { dg-message "note" } three sink_6_123678(volatile A&); six sink_6_123678(const A&&); // { dg-message "note" } seven sink_6_123678(volatile A&&); // { dg-message "note" } @@ -202,10 +214,11 @@ int test6_123678() const volatile A cva = a; // { dg-error "lvalue" } sink_6_123678(cva); // { dg-error "lvalue" } sink_6_123678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 216 } return 0; } -one sink_6_123567( A&); // { dg-message "candidates" } +one sink_6_123567( A&); // { dg-message "one sink_6_123567|no known conversion" } two sink_6_123567(const A&); // { dg-message "note" } three sink_6_123567(volatile A&); // { dg-message "note" } five sink_6_123567( A&&); // { dg-message "note" } @@ -219,7 +232,9 @@ int test6_123567() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_6_123567(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 234 } sink_6_123567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 236 } return 0; } @@ -257,7 +272,7 @@ int test6_123578() return 0; } -one sink_6_123467( A&); // { dg-message "candidates" } +one sink_6_123467( A&); // { dg-message "one sink_6_123467|no known conversion" } two sink_6_123467(const A&); // { dg-message "note" } three sink_6_123467(volatile A&); // { dg-message "note" } four sink_6_123467(const volatile A&); // { dg-message "note" } @@ -271,11 +286,13 @@ int test6_123467() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_6_123467(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 288 } sink_6_123467(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 290 } return 0; } -one sink_6_124567( A&); // { dg-message "candidates" } +one sink_6_124567( A&); // { dg-message "one sink_6_124567|no known conversion" } two sink_6_124567(const A&); // { dg-message "note" } four sink_6_124567(const volatile A&); // { dg-message "note" } five sink_6_124567( A&&); // { dg-message "note" } @@ -289,6 +306,7 @@ int test6_124567() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_6_124567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 308 } return 0; } @@ -310,7 +328,7 @@ int test6_125678() return 0; } -one sink_6_134567( A&); // { dg-message "candidates" } +one sink_6_134567( A&); // { dg-message "one sink_6_134567|no known conversion" } three sink_6_134567(volatile A&); // { dg-message "note" } four sink_6_134567(const volatile A&); // { dg-message "note" } five sink_6_134567( A&&); // { dg-message "note" } @@ -324,6 +342,7 @@ int test6_134567() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_6_134567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 344 } return 0; } diff --git a/gcc/testsuite/g++.dg/cpp0x/rv7n.C b/gcc/testsuite/g++.dg/cpp0x/rv7n.C index 94254b5824b953c261969dd2ff774bff705e8e28..6071e0568133941de21d037200f1b4321a51fa6b 100644 --- a/gcc/testsuite/g++.dg/cpp0x/rv7n.C +++ b/gcc/testsuite/g++.dg/cpp0x/rv7n.C @@ -30,7 +30,7 @@ const volatile A cv_source(); // 7 at a time -one sink_7_1234567( A&); // { dg-message "candidates" } +one sink_7_1234567( A&); // { dg-message "one sink_7_1234567|no known conversion" } two sink_7_1234567(const A&); // { dg-message "note" } three sink_7_1234567(volatile A&); // { dg-message "note" } four sink_7_1234567(const volatile A&); // { dg-message "note" } @@ -45,6 +45,7 @@ int test7_1234567() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_7_1234567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 47 } return 0; } @@ -66,7 +67,7 @@ int test7_1235678() return 0; } -two sink_7_2345678(const A&); // { dg-message "candidates" } +two sink_7_2345678(const A&); // { dg-message "note" } three sink_7_2345678(volatile A&); // { dg-message "note" } four sink_7_2345678(const volatile A&); // { dg-message "note" } five sink_7_2345678( A&&); // { dg-message "note" } @@ -81,11 +82,12 @@ int test7_2345678() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_7_2345678(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 84 } return 0; } one sink_7_1234678( A&); -two sink_7_1234678(const A&); // { dg-message "candidates" } +two sink_7_1234678(const A&); // { dg-message "note" } three sink_7_1234678(volatile A&); four sink_7_1234678(const volatile A&); six sink_7_1234678(const A&&); // { dg-message "note" } @@ -99,6 +101,7 @@ int test7_1234678() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_7_1234678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 103 } return 0; } diff --git a/gcc/testsuite/g++.dg/cpp0x/temp_default2.C b/gcc/testsuite/g++.dg/cpp0x/temp_default2.C index 5a9cbe03e743154df13aa7558f9b9472a0a30fb6..fa2bb6aed863b526e00d3872fb4664289abce75f 100644 --- a/gcc/testsuite/g++.dg/cpp0x/temp_default2.C +++ b/gcc/testsuite/g++.dg/cpp0x/temp_default2.C @@ -1,13 +1,14 @@ // { dg-options "-std=c++0x" } template <class T, class U = double> -void f(T t = 0, U u = 0); // { dg-message "candidate" } +void f(T t = 0, U u = 0); // { dg-message "note" } 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 } 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 247efd4b56cb8dcc0cb480a30fe382d801234101..d67b3b61151622f562239cbff1d3b98b08273232 100644 --- a/gcc/testsuite/g++.dg/cpp0x/trailing4.C +++ b/gcc/testsuite/g++.dg/cpp0x/trailing4.C @@ -5,7 +5,8 @@ template<class T, class U> auto f(T,U) -> decltype(T() + U()) { return T() + U(); } -template<class T> void g(T){} // { dg-message "candidate" } +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 } diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C index 60c47176d0029bb61989228e8faa517f424d6915..bd973055d062a452b4aae0fe74ea9e9980577021 100644 --- a/gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C +++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C @@ -1,9 +1,11 @@ // { dg-options "-std=gnu++0x" } -template<class X, class Y, class... Z> X f(Y); // { dg-message "candidate" } +template<class X, class Y, class... Z> X f(Y); // { dg-message "note" } void g() { int i = f<int>(5.6); int j = f(5.6); // { dg-error "no matching" } - f<void>(f<int, bool>); + // { dg-message "candidate" "candidate note" { target *-*-* } 6 } + f<void>(f<int, bool>); f<void>(f<int>); // { dg-error "no matching" } + // { dg-message "candidate" "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 b8aec1f5140c428e4260c8214bac343a0c736b2e..5bf211696a3170d71bfbdc4c0e97eb3c7891a5c8 100644 --- a/gcc/testsuite/g++.dg/cpp0x/variadic-ex4.C +++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex4.C @@ -1,5 +1,5 @@ // { dg-options "-std=gnu++0x" } -template<class X, class Y, class Z> X f(Y,Z); // { dg-message "candidate" } +template<class X, class Y, class Z> X f(Y,Z); // { dg-message "note" } template<class... Args> void f2(); void g() { @@ -8,5 +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 } f2<char, short, int, long>(); // okay } diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic35.C b/gcc/testsuite/g++.dg/cpp0x/variadic35.C index a85771d1595681e638f40bdd72ff5fb0d2f1d4ef..1f21976e864c39aa512ec0b8a42933d78898b0b1 100644 --- a/gcc/testsuite/g++.dg/cpp0x/variadic35.C +++ b/gcc/testsuite/g++.dg/cpp0x/variadic35.C @@ -1,9 +1,10 @@ // { dg-options "-std=gnu++0x" } template<int I, typename... Args> -void get_ith(const Args&... args); // { dg-message "candidate" } +void get_ith(const Args&... args); // { dg-message "note" } void f() { get_ith<1, float>(1, 2.0, 'x'); get_ith<1, int, double, char, int>(1, 2.0, 'x'); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 8 } } diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-35147.C b/gcc/testsuite/g++.dg/cpp0x/vt-35147.C index 9008180799b1e41594a1a8a7c58c11c41e959097..fecb36ec8c9a123a63fa5b1fe547141b2f3f870f 100644 --- a/gcc/testsuite/g++.dg/cpp0x/vt-35147.C +++ b/gcc/testsuite/g++.dg/cpp0x/vt-35147.C @@ -1,7 +1,7 @@ // { dg-options "-std=c++0x" } template<typename _Tp> - _Tp&& forward(_Tp&& __t) { return __t; } // { dg-message "candidate" } + _Tp&& forward(_Tp&& __t) { return __t; } // { dg-message "note" } void f(...); @@ -9,6 +9,7 @@ template<typename... Args> void g(Args&&... args) { f(forward<Args...>(args...)); // { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 11 } } void h() diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-37737-2.C b/gcc/testsuite/g++.dg/cpp0x/vt-37737-2.C index 16df69bd89285d9e812a3ef6f03f092323eb842a..2ff7e5b0b51db5c5342f21e2305c03eb3579bb4e 100644 --- a/gcc/testsuite/g++.dg/cpp0x/vt-37737-2.C +++ b/gcc/testsuite/g++.dg/cpp0x/vt-37737-2.C @@ -1,9 +1,10 @@ // { dg-options "-std=c++0x" } template<class U, class... T> -void f() // { dg-message "candidate" } +void f() // { dg-message "note" } { f<T...>(); // { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 6 } } template<> diff --git a/gcc/testsuite/g++.dg/expr/cond9.C b/gcc/testsuite/g++.dg/expr/cond9.C index e71a84ba43e22216ea930e1ec3c3f415ec28297c..e8e1397c06ea7195ee84446314b81f41197001c9 100644 --- a/gcc/testsuite/g++.dg/expr/cond9.C +++ b/gcc/testsuite/g++.dg/expr/cond9.C @@ -6,5 +6,7 @@ struct A { // { dg-message "A" } void foo(volatile A a) { 1 ? a : 0; // { dg-error "match|temporary" } + // { dg-message "candidate" "candidate note" { target *-*-* } 8 } 1 ? 0 : a; // { dg-error "match|temporary" } + // { dg-message "candidate" "candidate note" { target *-*-* } 10 } } diff --git a/gcc/testsuite/g++.dg/expr/pmf-1.C b/gcc/testsuite/g++.dg/expr/pmf-1.C index 8f6426b401b1ce5e4236f53bfc126894a3450ec7..3dd01c6b90f3d3588e2cffd7168c192448a5ee9a 100644 --- a/gcc/testsuite/g++.dg/expr/pmf-1.C +++ b/gcc/testsuite/g++.dg/expr/pmf-1.C @@ -7,7 +7,7 @@ struct A { void f(); - void foo(void (A::*)(int)); // { dg-message "candidate" "" } + void foo(void (A::*)(int)); // { dg-message "void A::foo|no known conversion" "" } template<typename T> void g(T); void h() @@ -15,5 +15,6 @@ struct A void (A::*p)() = &A::f; void (A::*q)() = &(A::f); // { dg-error "parenthesized" "" } foo(&g<int>); // { dg-error "no matching" "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 17 } } }; diff --git a/gcc/testsuite/g++.dg/ext/label5.C b/gcc/testsuite/g++.dg/ext/label5.C index 9c5a24e5803ac0f3ccd3eb837856bf46d78c1d01..fc611cd4159474bd0e66e82a831194fa548b404b 100644 --- a/gcc/testsuite/g++.dg/ext/label5.C +++ b/gcc/testsuite/g++.dg/ext/label5.C @@ -3,5 +3,4 @@ struct A { }; int main() { b: A() && && b; } // { dg-error "A\\(\\) && && *b" } - -// { dg-message "candidate" "additional" { target *-*-* } 5 } +// { dg-message "candidate|operator&&|no known conversion" "additional" { target *-*-* } 5 } diff --git a/gcc/testsuite/g++.dg/ext/visibility/anon8.C b/gcc/testsuite/g++.dg/ext/visibility/anon8.C index b0d3849b26fe0ee6dcba4ea224a21af40a074dee..8ef8d682336512e7e8d6563ee5bd8940cfa3eaaa 100644 --- a/gcc/testsuite/g++.dg/ext/visibility/anon8.C +++ b/gcc/testsuite/g++.dg/ext/visibility/anon8.C @@ -2,7 +2,7 @@ // { dg-do compile } template <void (*fn) ()> -void call () // { dg-message "candidate" } +void call () // { dg-message "note" } { fn (); } @@ -27,7 +27,9 @@ int main () }; call<&B1::fn1> (); call<&B2::fn2> (); // { dg-error "not external linkage|no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 29 } call<&fn3> (); call<&B1::fn4> (); call<&fn5> (); // { dg-error "not external linkage|no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 33 } } diff --git a/gcc/testsuite/g++.dg/ext/vla2.C b/gcc/testsuite/g++.dg/ext/vla2.C index 5e37f8a5fc2c96e1617fb4b02bf21dc836bbd302..f6a9debca98731446de86efea51081bb034e1955 100644 --- a/gcc/testsuite/g++.dg/ext/vla2.C +++ b/gcc/testsuite/g++.dg/ext/vla2.C @@ -8,11 +8,12 @@ // errors. template <unsigned int N> -char* begin(char (&a) [N] ); // { dg-message "candidate" } +char* begin(char (&a) [N] ); // { dg-message "note" } void bar(int i) { char d[i] ; begin(d); // { dg-error "no matching function" "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 17 } } diff --git a/gcc/testsuite/g++.dg/gomp/pr26690-1.C b/gcc/testsuite/g++.dg/gomp/pr26690-1.C index 71f1eb311ee4779c44e88d7f0117da0f5eb9612d..17e01b3d55399501d69d24d67987dda816228831 100644 --- a/gcc/testsuite/g++.dg/gomp/pr26690-1.C +++ b/gcc/testsuite/g++.dg/gomp/pr26690-1.C @@ -1,9 +1,9 @@ // PR c++/26690 // { dg-do compile } -struct A // { dg-message "A::A" } +struct A // { dg-message "A::A|candidate expects" } { - A (int); // { dg-message "candidates" } + A (int); // { dg-message "note" } }; void @@ -11,5 +11,6 @@ foo () { A a(0); #pragma omp parallel private (a) // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 13 } ; } diff --git a/gcc/testsuite/g++.dg/gomp/pr26690-2.C b/gcc/testsuite/g++.dg/gomp/pr26690-2.C index 5d29f322c9d8aae758f83f2341f3d3cabe339bfd..ca01a3a59547d9f7139cb6c452e72c718278d005 100644 --- a/gcc/testsuite/g++.dg/gomp/pr26690-2.C +++ b/gcc/testsuite/g++.dg/gomp/pr26690-2.C @@ -4,7 +4,7 @@ struct A { A (int x = 6); // { dg-message "A::A\\(int\\)" } - A (long long x = 12LL); // { dg-message "candidates" } + A (long long x = 12LL); // { dg-message "note" } }; void @@ -12,5 +12,6 @@ foo () { A a(6); #pragma omp parallel private (a) // { dg-error "call of overloaded" } + // { dg-message "candidate" "candidate note" { target *-*-* } 14 } ; } diff --git a/gcc/testsuite/g++.dg/init/synth2.C b/gcc/testsuite/g++.dg/init/synth2.C index 9e8a08a6ea3bea7eec3e0963828b7073bca61fd5..ed5046715598baba5b72eb8c761238d7bddebd77 100644 --- a/gcc/testsuite/g++.dg/init/synth2.C +++ b/gcc/testsuite/g++.dg/init/synth2.C @@ -6,6 +6,7 @@ struct G { }; class A // { dg-error "" } +// { dg-message "candidate" "candidate note" { target *-*-* } 8 } { const G g; }; diff --git a/gcc/testsuite/g++.dg/lookup/conv-1.C b/gcc/testsuite/g++.dg/lookup/conv-1.C index b861c6036dfbf75bc14f3c649e5b83a91c818af8..0c4393e8a401e96a617f21752c70139eaf421bb9 100644 --- a/gcc/testsuite/g++.dg/lookup/conv-1.C +++ b/gcc/testsuite/g++.dg/lookup/conv-1.C @@ -22,5 +22,6 @@ struct B : A1, A2 int Foo (B const &b) { return b; // { dg-error "ambiguous" "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 24 } } diff --git a/gcc/testsuite/g++.dg/lookup/new1.C b/gcc/testsuite/g++.dg/lookup/new1.C index b29aa46ce424f14a636d9cfd00da26f79029fbff..11a6d97ddf7829816997c04cb8ad353c92628a7e 100644 --- a/gcc/testsuite/g++.dg/lookup/new1.C +++ b/gcc/testsuite/g++.dg/lookup/new1.C @@ -6,8 +6,9 @@ int main() { int i; void* operator new(__SIZE_TYPE__ s, int* p); int* e = new(&i) int; // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 8 } int* f = new int; return 0; } -// { dg-message "candidate" "" { target *-*-* } 0 } +// { dg-message "operator new|candidate expects" "" { target *-*-* } 0 } diff --git a/gcc/testsuite/g++.dg/lookup/using9.C b/gcc/testsuite/g++.dg/lookup/using9.C index 7c3b30d8873b5b34e862e797c660377b13a6c7c1..32abb5371f280c1f99373e41ffe0a2296abdb188 100644 --- a/gcc/testsuite/g++.dg/lookup/using9.C +++ b/gcc/testsuite/g++.dg/lookup/using9.C @@ -4,7 +4,7 @@ // an ambiguous overload set to be created. namespace B { - void f(int); // { dg-message "candidates" } + void f(int); // { dg-message "note" } void f(double); // { dg-message "note" } } @@ -20,6 +20,7 @@ void h() using C::f; f('h'); f(1); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 22 } void f(int); // { dg-error "previous using declaration" } } diff --git a/gcc/testsuite/g++.dg/other/error13.C b/gcc/testsuite/g++.dg/other/error13.C index 784550180ffa9706cbf43bb6cade0b346d4e43e3..4ee935ad60965e491af71a219adabf78dab9205f 100644 --- a/gcc/testsuite/g++.dg/other/error13.C +++ b/gcc/testsuite/g++.dg/other/error13.C @@ -3,8 +3,10 @@ struct A // { dg-message "note" } { A(void x); // { dg-error "invalid use|incomplete type|candidates" } + // { dg-message "" "match candidate text" { target *-*-* } 5 } }; struct B : A {}; // { dg-error "no matching function for call|deleted" } +// { dg-message "candidate" "candidate note" { target *-*-* } 9 } B b; // { dg-message "synthesized method|deleted" } diff --git a/gcc/testsuite/g++.dg/other/error20.C b/gcc/testsuite/g++.dg/other/error20.C index e546b3726e363a5235c3950d72a30caa11d31626..f3b17aa196a36640947f7ee1ec93a4992173862a 100644 --- a/gcc/testsuite/g++.dg/other/error20.C +++ b/gcc/testsuite/g++.dg/other/error20.C @@ -1,7 +1,7 @@ // PR c++/34275 // { dg-do compile } -struct A // { dg-message "operator=" } +struct A // { dg-message "operator=|no known conversion" } { virtual A foo (); }; @@ -9,4 +9,5 @@ struct A // { dg-message "operator=" } void bar (A& a) { a.foo () = 0; // { dg-error "A::foo\\(\\) = 0" } + // { dg-message "candidate" "candidate note" { target *-*-* } 11 } } diff --git a/gcc/testsuite/g++.dg/other/error31.C b/gcc/testsuite/g++.dg/other/error31.C index d3e3e09a37c07dd09e5c6bae88cddd01c767ed76..95c9d737413b398fbb59657761ebfd853ab4e6e7 100644 --- a/gcc/testsuite/g++.dg/other/error31.C +++ b/gcc/testsuite/g++.dg/other/error31.C @@ -3,11 +3,12 @@ // { dg-options "" } // { dg-bogus "not supported by" "" { target *-*-* } 0 } -struct A {}; // { dg-message "operator=" } +struct A {}; // { dg-message "operator=|no known conversion" } void foo () { A a; a = ({ { 1; } }); // { dg-error "no match for" } + // { dg-message "candidate" "candidate note" { target *-*-* } 12 } } diff --git a/gcc/testsuite/g++.dg/other/pr28114.C b/gcc/testsuite/g++.dg/other/pr28114.C index d54fec960857aa4dc4afa9b979fcddb79ad9f60a..63ecbf51f4f99321679b63c54d1d43ca6c6aa581 100644 --- a/gcc/testsuite/g++.dg/other/pr28114.C +++ b/gcc/testsuite/g++.dg/other/pr28114.C @@ -6,4 +6,5 @@ template<int> void foo(struct {}*); // { dg-message "" } void bar() { foo<0>(0); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 8 } } diff --git a/gcc/testsuite/g++.dg/other/ptrmem10.C b/gcc/testsuite/g++.dg/other/ptrmem10.C index 53d5c85a80794d8b044110a642bbb3a0ca9f1b84..bc386ed56befa123414430bfbdac22188465b6b1 100644 --- a/gcc/testsuite/g++.dg/other/ptrmem10.C +++ b/gcc/testsuite/g++.dg/other/ptrmem10.C @@ -3,7 +3,7 @@ template <class C, void (C::*M) ()> static -void foo(void *obj) // { dg-message "candidate" } +void foo(void *obj) // { dg-message "note" } { C *p = static_cast<C*>(obj); (p->*M)(); @@ -14,6 +14,7 @@ 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)" } + // { dg-message "candidate" "candidate note" { target *-*-* } 16 } } struct S diff --git a/gcc/testsuite/g++.dg/other/ptrmem11.C b/gcc/testsuite/g++.dg/other/ptrmem11.C index c1c8677c9dc07ea59aa1807ceb97a6077884cb05..119cbb078a2f97f42d4ffc4f2968021a45d3158f 100644 --- a/gcc/testsuite/g++.dg/other/ptrmem11.C +++ b/gcc/testsuite/g++.dg/other/ptrmem11.C @@ -5,7 +5,7 @@ struct A {}; template <int A::* p> int -foo(A* q) // { dg-message "candidate" } +foo(A* q) // { dg-message "note" } { return q->*p; } @@ -15,6 +15,7 @@ int bar(int T::* p) { return foo<p>(0);// { dg-error "(not a valid template arg|no matching func|pointer-to-member)" } + // { dg-message "candidate" "candidate note" { target *-*-* } 17 } } int i = bar<A>(0); diff --git a/gcc/testsuite/g++.dg/overload/ambig1.C b/gcc/testsuite/g++.dg/overload/ambig1.C index 21948bf3146cb41679945eadcb1581dd9a586e6a..d11e00a187b5459e2d7a8f0959d3001406a79ca4 100644 --- a/gcc/testsuite/g++.dg/overload/ambig1.C +++ b/gcc/testsuite/g++.dg/overload/ambig1.C @@ -20,4 +20,5 @@ void f(B); // { dg-message "note" "candidate" } int main() { f (42); // { dg-error "ambiguous" "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 22 } } diff --git a/gcc/testsuite/g++.dg/overload/arg3.C b/gcc/testsuite/g++.dg/overload/arg3.C index eb65271752e8c6737acb5e6140bba0a3f6b20bae..34624cd22e43c82e61f9d3f711f46a6fe8ecf2ac 100644 --- a/gcc/testsuite/g++.dg/overload/arg3.C +++ b/gcc/testsuite/g++.dg/overload/arg3.C @@ -10,8 +10,8 @@ struct A {}; struct B : A { - B(int); // { dg-message "B::B" "" } - B(B&); // { dg-message "candidates" "" } + B(int); // { dg-message "B::B|no known conversion" "" } + B(B&); // { dg-message "note" "" } }; void foo(B); // { dg-error "initializing" } @@ -19,4 +19,5 @@ void foo(B); // { dg-error "initializing" } void bar() { foo(0); // { dg-error "no matching function" "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 21 } } diff --git a/gcc/testsuite/g++.dg/overload/builtin1.C b/gcc/testsuite/g++.dg/overload/builtin1.C index 652b8e1b760cbb7d91d9992b6a92c8b3e6ba0b2a..fdd208135c7ca8e476a0b75653cb976dc410b506 100644 --- a/gcc/testsuite/g++.dg/overload/builtin1.C +++ b/gcc/testsuite/g++.dg/overload/builtin1.C @@ -13,5 +13,6 @@ int main () { A a; a + a; // { dg-error "ambiguous" "ambiguous" } - // { dg-message "candidates" "candidates" { target *-*-* } 15 } + // { dg-message "operator" "match candidate text" { target *-*-* } 15 } + // { dg-message "candidates" "candidates" { target *-*-* } 15 } } diff --git a/gcc/testsuite/g++.dg/overload/copy1.C b/gcc/testsuite/g++.dg/overload/copy1.C index 2bd8e539dd1a14f131eecbffac6a8b6937557eb3..f0ec385fc9cb1d0781f9eddc918c7f270a350dd5 100644 --- a/gcc/testsuite/g++.dg/overload/copy1.C +++ b/gcc/testsuite/g++.dg/overload/copy1.C @@ -17,4 +17,5 @@ B f (B const& b) { return b; // { dg-error "matching" "matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 19 } } diff --git a/gcc/testsuite/g++.dg/overload/new1.C b/gcc/testsuite/g++.dg/overload/new1.C index 89282faf66cbb7c6f9e5e3acefdb4469f67e373c..9adb4c07245b4a8a48c21e857f1a03701e89d14d 100644 --- a/gcc/testsuite/g++.dg/overload/new1.C +++ b/gcc/testsuite/g++.dg/overload/new1.C @@ -16,6 +16,7 @@ void f(X *x = new X[4]); // { dg-error "" } void f(X *x = new (3) X(6)); // { dg-error "" } void f(X *x = new (2) X[10]); // { dg-error "" } -// { dg-message "candidate" "" { target *-*-* } 00 } +// { dg-message "candidate" "candidate note" { target *-*-* } 18 } +// { dg-message "operator new|candidate expects" "match candidate text" { target *-*-* } 00 } void f(X *x = new X[10][5]); // { dg-error "" } diff --git a/gcc/testsuite/g++.dg/overload/template4.C b/gcc/testsuite/g++.dg/overload/template4.C index 6638dc9d24672bead5cd6e7d453537989e9ebfbb..8f00d4171d4d994f68aa92879292498268d068e9 100644 --- a/gcc/testsuite/g++.dg/overload/template4.C +++ b/gcc/testsuite/g++.dg/overload/template4.C @@ -8,14 +8,17 @@ namespace void baz (...); // { dg-message "baz" } } -template <int> void foo (...); // { dg-message "candidate" } -template <int> void bar (int, ...); // { dg-message "candidate" } -void baz (...); // { dg-message "candidate" } +template <int> void foo (...); // { dg-message "note" } +template <int> void bar (int, ...); // { dg-message "note" } +void baz (...); // { dg-message "note" } void test () { foo <0> (0); // { dg-error "is ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 18 } bar <1> (0, 1); // { dg-error "is ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 20 } baz (0); // { dg-error "is ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 22 } } diff --git a/gcc/testsuite/g++.dg/overload/unknown1.C b/gcc/testsuite/g++.dg/overload/unknown1.C index 61b60b063cd798f4dfce30274991c6c0dfb8384b..935f8d4963da77ba67c8a844a1f77b8def2a4325 100644 --- a/gcc/testsuite/g++.dg/overload/unknown1.C +++ b/gcc/testsuite/g++.dg/overload/unknown1.C @@ -2,8 +2,9 @@ void foo(void); int foo(int); -template <typename T> void bar(T f); // { dg-message "candidate" } +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 } } diff --git a/gcc/testsuite/g++.dg/overload/using2.C b/gcc/testsuite/g++.dg/overload/using2.C index 54b12219bd8f1551ae82f6fd06538242eb452a95..514d83f34d8801a63b76961c81ea616f298717f3 100644 --- a/gcc/testsuite/g++.dg/overload/using2.C +++ b/gcc/testsuite/g++.dg/overload/using2.C @@ -73,10 +73,12 @@ int main () { exit (0); _exit (0); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 75 } abort (); c1 (); C1 (); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 80 } c2 (); C2 (); // one might expect an ambiguous call error here as well, but @@ -84,6 +86,7 @@ int main () { c3 (); C3 (); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 88 } C3 (0); C3 (0l); } diff --git a/gcc/testsuite/g++.dg/parse/crash5.C b/gcc/testsuite/g++.dg/parse/crash5.C index 4597d6cf9af533d2060c73003d220dac639b0d75..0ac70297992509c3826a23e663cecfe42b7992f0 100644 --- a/gcc/testsuite/g++.dg/parse/crash5.C +++ b/gcc/testsuite/g++.dg/parse/crash5.C @@ -1,13 +1,15 @@ // { dg-options "-w" } class QString { // { dg-error "previous definition" } - QString (const QString & a); // { dg-message "candidate is" } + QString (const QString & a); // { dg-message "QString::QString|candidate expects" } }; class QString { }; // { dg-error "redefinition" } const QString q () { QString z; // { dg-error "matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 10 } int x; return x ? QString () : QString (); // { dg-error "matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 13 } } diff --git a/gcc/testsuite/g++.dg/parse/error19.C b/gcc/testsuite/g++.dg/parse/error19.C index 3b7e7175b17a400a1c14c1a14d1401ea89c0918d..010a4032e76aae137316260a16e2ba1a720cc022 100644 --- a/gcc/testsuite/g++.dg/parse/error19.C +++ b/gcc/testsuite/g++.dg/parse/error19.C @@ -1,7 +1,7 @@ // { dg-options "-fshow-column -fmessage-length=0 -ansi -pedantic-errors -Wno-long-long " } // PR C++/17867 -struct A // { dg-message "8:operator=" } +struct A // { dg-message "8:operator=|no known conversion for implicit" } { A(int); }; @@ -11,4 +11,5 @@ const A& foo(); void bar() { foo()=A(0); // { dg-error "12:no match for 'operator='" } + // { dg-message "candidate" "candidate note" { target *-*-* } 13 } } diff --git a/gcc/testsuite/g++.dg/parse/error28.C b/gcc/testsuite/g++.dg/parse/error28.C index a0b1e7f690ff00fdc83aa1e22d5791340ab52fb3..3ca210aa6b7cc12865bb437299879fde3bd5907b 100644 --- a/gcc/testsuite/g++.dg/parse/error28.C +++ b/gcc/testsuite/g++.dg/parse/error28.C @@ -2,10 +2,11 @@ // PR c++/21908 struct virt { virt () {} virt (int i) {} }; -struct der : public virtual virt { // { dg-message "8:der::der" } - der (int i) : virt(i) {} // { dg-message "3:der::der" } +struct der : public virtual virt { // { dg-message "8:der::der|candidate expects" } + der (int i) : virt(i) {} // { dg-message "3:der::der|candidate expects" } }; struct top : public der { top () {} // { dg-bogus "der\\(const" } + // { dg-message "candidate" "candidate note" { target *-*-* } 9 } }; // { dg-error "10:no matching function for call to 'der" "" { target *-*-* } 9 } diff --git a/gcc/testsuite/g++.dg/parse/template7.C b/gcc/testsuite/g++.dg/parse/template7.C index e07d5f85d8f3e1c8dd1e7158e16f6c4a44e73d10..0d3f3fa24a1c27b70de671a4a02179b2e963512e 100644 --- a/gcc/testsuite/g++.dg/parse/template7.C +++ b/gcc/testsuite/g++.dg/parse/template7.C @@ -1,4 +1,5 @@ template <int I> -void f(); // { dg-message "candidate" } +void f(); // { dg-message "note" } void g() { f<(3, 2)>(); } // { dg-error "" } +// { dg-message "candidate" "candidate note" { target *-*-* } 4 } diff --git a/gcc/testsuite/g++.dg/parse/typename7.C b/gcc/testsuite/g++.dg/parse/typename7.C index 0ac53112126bd4c7d466b7123f3de5717fd4b3be..2d823f8078e5844e331b9b3f3c49a86c47c55a3a 100644 --- a/gcc/testsuite/g++.dg/parse/typename7.C +++ b/gcc/testsuite/g++.dg/parse/typename7.C @@ -7,9 +7,10 @@ struct A { - template<typename> void foo(int); // { dg-message "candidate" } - template<typename T> void bar(T t) { // { dg-message "candidate" } + template<typename> void foo(int); // { dg-message "note" } + template<typename T> void bar(T t) { // { dg-message "note" } this->foo<typename T>(t); } // { dg-error "expected|parse error|no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 12 } template<typename T> void bad(T t) { foo<typename T>(t); } // { dg-error "expected|parse error|no matching" } }; @@ -19,6 +20,7 @@ struct B { void bar(T t) { A().bar<typename T>(t); } // { dg-error "expected|parse error|no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 22 } void bad(T t) { B<typename T>::bar(t); } // { dg-error "invalid|not a template" } }; diff --git a/gcc/testsuite/g++.dg/rtti/typeid6.C b/gcc/testsuite/g++.dg/rtti/typeid6.C index adc5bbb02fb72aea427530dcf9d17a4a66ac3ccf..d8879c59ced4c9bccfd4f9c0bd58a4ccb01029a7 100644 --- a/gcc/testsuite/g++.dg/rtti/typeid6.C +++ b/gcc/testsuite/g++.dg/rtti/typeid6.C @@ -8,4 +8,5 @@ namespace std template<int> void foo() { !typeid(void); // { dg-error "!typeid\\(void\\)|candidate is" } + // { dg-message "" "match candidate text" { target *-*-* } 10 } } diff --git a/gcc/testsuite/g++.dg/tc1/dr152.C b/gcc/testsuite/g++.dg/tc1/dr152.C index fdf4f124bb17c100345defbaf4f35f53e1a50c94..f930d2e28ea34173ffd0141b8209d168a274b580 100644 --- a/gcc/testsuite/g++.dg/tc1/dr152.C +++ b/gcc/testsuite/g++.dg/tc1/dr152.C @@ -4,7 +4,7 @@ namespace N1 { struct X { - X(); // { dg-message "candidate" } + X(); // { dg-message "note" } explicit X(const X&); }; void f(X); // { dg-error "initializing" } @@ -12,13 +12,14 @@ namespace N1 { { X x; f(x); // { dg-error "matching" "matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 14 } } } namespace N2 { template <class T> struct X { - X(); // { dg-message "candidate" } + X(); // { dg-message "note" } explicit X(const X&); }; @@ -30,6 +31,7 @@ namespace N2 { { X<T> x; N2::f(x); // { dg-error "matching" "matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 33 } } template int foo<float>(); // { dg-message "instantiated from here" } diff --git a/gcc/testsuite/g++.dg/template/conv11.C b/gcc/testsuite/g++.dg/template/conv11.C index de41d6a2122d6a7034c3c427790440d916991455..57d06af3ee75ed89115a1d5e567b06ed83f116e9 100644 --- a/gcc/testsuite/g++.dg/template/conv11.C +++ b/gcc/testsuite/g++.dg/template/conv11.C @@ -1,10 +1,11 @@ int i; struct A { - template <class T> operator T&() { return i; } // { dg-message "candidate" } + template <class T> operator T&() { return i; } // { dg-message "note" } }; int main() { A().operator int(); // { dg-error "operator int" } + // { dg-message "candidate" "candidate note" { target *-*-* } 9 } } diff --git a/gcc/testsuite/g++.dg/template/copy1.C b/gcc/testsuite/g++.dg/template/copy1.C index bec506dd991fa19d8f885d30e46d7a60a8059666..c6b3ff8066575c68609b32110af597f32d37b9ef 100644 --- a/gcc/testsuite/g++.dg/template/copy1.C +++ b/gcc/testsuite/g++.dg/template/copy1.C @@ -7,8 +7,9 @@ struct A { A(A&); // { dg-message "note" } - template <class T> A(T); // { dg-message "candidate" } + template <class T> A(T); // { dg-message "note" } }; A a = 0; // { dg-error "no matching function" } +// { dg-message "candidate" "candidate note" { target *-*-* } 13 } diff --git a/gcc/testsuite/g++.dg/template/crash37.C b/gcc/testsuite/g++.dg/template/crash37.C index aef0df0846ec6316274e13c5c3f94b5b5fb105de..60724231eabbbaf324a1faaec3444a515ac32751 100644 --- a/gcc/testsuite/g++.dg/template/crash37.C +++ b/gcc/testsuite/g++.dg/template/crash37.C @@ -11,7 +11,7 @@ struct coperator_stack struct helper {}; template<class F> -void bla(F f) // { dg-message "candidate is" } +void bla(F f) // { dg-message "bla|no known conversion" } { } @@ -21,6 +21,7 @@ struct definition definition() { bla(coperator_stack::push3<helper>); // { dg-error "matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 23 } } }; diff --git a/gcc/testsuite/g++.dg/template/deduce3.C b/gcc/testsuite/g++.dg/template/deduce3.C index fbf41e0e32850452c838a80c4bcbdcc9a6500975..e8a1d4e2b51cea72d23548a453f62baf69c6f5c8 100644 --- a/gcc/testsuite/g++.dg/template/deduce3.C +++ b/gcc/testsuite/g++.dg/template/deduce3.C @@ -1,9 +1,11 @@ template <typename T> -void f(int, T (*)() = 0); // { dg-message "candidate" } +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 } typedef void F(); f<F>(0); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 9 } } diff --git a/gcc/testsuite/g++.dg/template/dependent-expr5.C b/gcc/testsuite/g++.dg/template/dependent-expr5.C index b36d38233e9eaa1e83731ef228aa2482011d4f3d..1e850cd54e5f0d4f97a30a3b94346a2de3927487 100644 --- a/gcc/testsuite/g++.dg/template/dependent-expr5.C +++ b/gcc/testsuite/g++.dg/template/dependent-expr5.C @@ -40,9 +40,12 @@ struct foo { bind (&bar::baikt); bind (&barf); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 42 } bind (&foo::barf); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 44 } bindm (&barf); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 47 } bindm (&foo::barf); bindn (&barf); @@ -50,11 +53,15 @@ struct foo { bindb (&barf); bindb (&foo::barf); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 55 } bind (&bark); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 58 } bind (&bar::bark); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 60 } bindm (&bark); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 63 } bindm (&bar::bark); bindn (&bark); @@ -62,6 +69,7 @@ struct foo { bindb (&bark); bindb (&bar::bark); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 71 } } }; @@ -84,9 +92,12 @@ struct foo { bind (&barT::baikt); bind (&barf); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 94 } bind (&foo::barf); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 96 } bindm (&barf); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 99 } bindm (&foo::barf); bindn (&barf); @@ -94,11 +105,15 @@ struct foo { bindb (&barf); bindb (&foo::barf); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 107 } bind (&bark); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 110 } bind (&barT::bark); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 112 } bindm (&bark); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 115 } bindm (&barT::bark); bindn (&bark); @@ -106,6 +121,7 @@ struct foo { bindb (&bark); bindb (&barT::bark); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 123 } } }; diff --git a/gcc/testsuite/g++.dg/template/error38.C b/gcc/testsuite/g++.dg/template/error38.C index 6c25b9f9c0fa193479f94d13252d9c946267a814..14a21329988d122761e5979e4369128ca9cca7af 100644 --- a/gcc/testsuite/g++.dg/template/error38.C +++ b/gcc/testsuite/g++.dg/template/error38.C @@ -32,8 +32,12 @@ int main() { A<B> a; a.f(); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 34 } a.g(); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 36 } f(i); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 39 } f(p); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 41 } } diff --git a/gcc/testsuite/g++.dg/template/error40.C b/gcc/testsuite/g++.dg/template/error40.C index c5df56fc1be0f9315f2a6c6cc1bdb131f6e69bc7..7746ed2cee3e3c16edcadc50c41ef8b1b26c4922 100644 --- a/gcc/testsuite/g++.dg/template/error40.C +++ b/gcc/testsuite/g++.dg/template/error40.C @@ -26,5 +26,7 @@ struct B int main() { f(1); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 28 } B<A<int> >().f(); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 30 } } diff --git a/gcc/testsuite/g++.dg/template/friend.C b/gcc/testsuite/g++.dg/template/friend.C index ac22f2ffb2de003d235ff425ae5c6cc55f9fe00c..44cbce938d74d96e4f41f5226d227f608a5fe505 100644 --- a/gcc/testsuite/g++.dg/template/friend.C +++ b/gcc/testsuite/g++.dg/template/friend.C @@ -26,4 +26,5 @@ int main() { s<int>::t y; cout << y; // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 28 } } diff --git a/gcc/testsuite/g++.dg/template/incomplete2.C b/gcc/testsuite/g++.dg/template/incomplete2.C index 73b6c6fd64d816d224e02f197db3e2a5f3fac7cb..d86ea06bcd07f4c4d40002f71f073dccf9833792 100644 --- a/gcc/testsuite/g++.dg/template/incomplete2.C +++ b/gcc/testsuite/g++.dg/template/incomplete2.C @@ -3,11 +3,12 @@ struct A; -template<A&> void foo(); // { dg-message "candidate" } +template<A&> void foo(); // { dg-message "note" } A a; // { dg-error "incomplete type" } void bar() { foo<a>(); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 12 } } diff --git a/gcc/testsuite/g++.dg/template/instantiate5.C b/gcc/testsuite/g++.dg/template/instantiate5.C index 9cdf310c738b75c85bc657700bb69396a49ba71b..e592c65d816cbf92f0ac7438d4b948496294b1a4 100644 --- a/gcc/testsuite/g++.dg/template/instantiate5.C +++ b/gcc/testsuite/g++.dg/template/instantiate5.C @@ -13,12 +13,13 @@ int baz() { return A<0>::i; } struct B { - static void foo (int); // { dg-message "candidate is" } + static void foo (int); // { dg-message "B::foo|candidate expects" } }; template <typename T> struct C { virtual void bar() const { T::foo(); } // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 21 } }; C<B> c; // { dg-message "instantiated" } diff --git a/gcc/testsuite/g++.dg/template/local4.C b/gcc/testsuite/g++.dg/template/local4.C index e3044e993eea2843f212fa029e202f9569d9b066..7ee922ba6d3c67da341da9701155a29ae5e2ac37 100644 --- a/gcc/testsuite/g++.dg/template/local4.C +++ b/gcc/testsuite/g++.dg/template/local4.C @@ -1,8 +1,9 @@ // PR c++/17413 -template <typename T> void foo() {} // { dg-message "candidate" } +template <typename T> void foo() {} // { dg-message "note" } int main () { struct S {}; foo<S> (); // { dg-error "match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 7 } } diff --git a/gcc/testsuite/g++.dg/template/local6.C b/gcc/testsuite/g++.dg/template/local6.C index 1fa39bc7a758eebf6ed2c84038a86b8497e4e25b..4a87177c9a13d778021dc67cac25eb8e2bead247 100644 --- a/gcc/testsuite/g++.dg/template/local6.C +++ b/gcc/testsuite/g++.dg/template/local6.C @@ -1,10 +1,11 @@ template <class T> struct PCVector2 // { dg-message "note" } { - template <class T2> PCVector2(const PCVector2<T> &cv) ; // { dg-message "candidate" } + template <class T2> PCVector2(const PCVector2<T> &cv) ; // { 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 } } T xFIELD, yFIELD; diff --git a/gcc/testsuite/g++.dg/template/new3.C b/gcc/testsuite/g++.dg/template/new3.C index 50be5f1c3ba1d9ca1feedd6be0b0efd167539d86..230330ec66cd34dd9f946e7415ecdae0f8ec98d1 100644 --- a/gcc/testsuite/g++.dg/template/new3.C +++ b/gcc/testsuite/g++.dg/template/new3.C @@ -1,4 +1,4 @@ -extern void *operator new(__SIZE_TYPE__); // { dg-message "candidate" } +extern void *operator new(__SIZE_TYPE__); // { dg-message "note" } template <class T > struct C @@ -6,6 +6,7 @@ struct C void f() { int* node; new (&node) int(0); // { dg-error "new" } + // { dg-message "candidate" "candidate note" { target *-*-* } 8 } } }; diff --git a/gcc/testsuite/g++.dg/template/operator9.C b/gcc/testsuite/g++.dg/template/operator9.C index dfd491d4f04be697e560f20443b3b1f48b76325e..35be778765a4eeece1497ce002c44e1aca54f2eb 100644 --- a/gcc/testsuite/g++.dg/template/operator9.C +++ b/gcc/testsuite/g++.dg/template/operator9.C @@ -5,5 +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 } } diff --git a/gcc/testsuite/g++.dg/template/overload6.C b/gcc/testsuite/g++.dg/template/overload6.C index fd868333447d345c47e658ecf80f4a64b622728d..5e26c448b18ab9973e4e96ab8c1ac34d59537ed4 100644 --- a/gcc/testsuite/g++.dg/template/overload6.C +++ b/gcc/testsuite/g++.dg/template/overload6.C @@ -14,4 +14,5 @@ struct A template<int> void foo() { unique(A().begin); // { dg-error "no matching function" "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 16 } } diff --git a/gcc/testsuite/g++.dg/template/ptrmem2.C b/gcc/testsuite/g++.dg/template/ptrmem2.C index 848a6d9cca0e1a07483379e95caeaee49d4e5628..1919047360a3ac6134ac01bcff7c7a2f541d1cb0 100644 --- a/gcc/testsuite/g++.dg/template/ptrmem2.C +++ b/gcc/testsuite/g++.dg/template/ptrmem2.C @@ -7,9 +7,10 @@ struct A {}; -template <typename T> T A::* Foo (); // { dg-message "candidate" } +template <typename T> T A::* Foo (); // { dg-message "note" } void Baz () { Foo <int &> (); // { dg-error "no matching function" "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 14 } } diff --git a/gcc/testsuite/g++.dg/template/ptrmem20.C b/gcc/testsuite/g++.dg/template/ptrmem20.C index 23488737a6771f10abee5b64b50a86ab8375fe3a..dee3c629a70dc32cac17e5a98032c516b004fd9d 100644 --- a/gcc/testsuite/g++.dg/template/ptrmem20.C +++ b/gcc/testsuite/g++.dg/template/ptrmem20.C @@ -8,9 +8,10 @@ struct B void foo(); }; -template<void (A::*)()> void bar(); // { dg-message "candidate" } +template<void (A::*)()> void bar(); // { dg-message "note" } void baz() { bar<&B::foo>(); // { dg-error "not a valid template argument|no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 15 } } diff --git a/gcc/testsuite/g++.dg/template/ptrmem4.C b/gcc/testsuite/g++.dg/template/ptrmem4.C index b1422c3e811c67ebf20d407cd76a6995fecb6000..62262c4b8e9326fcc855a61f2df1ad0f8076d27b 100644 --- a/gcc/testsuite/g++.dg/template/ptrmem4.C +++ b/gcc/testsuite/g++.dg/template/ptrmem4.C @@ -6,7 +6,7 @@ // Pointer to member function template argument deduction ICE. -template <class CONT> void queryAliases(CONT& fill_me); // { dg-message "candidate is" } +template <class CONT> void queryAliases(CONT& fill_me); // { dg-message "queryAliases|no known conversion" } struct SpyExample { @@ -17,4 +17,5 @@ struct SpyExample void SpyExample::ready() { queryAliases(inputs); // { dg-error "matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 19 } } diff --git a/gcc/testsuite/g++.dg/template/ptrmem8.C b/gcc/testsuite/g++.dg/template/ptrmem8.C index 8585f83578737b9bc80b43c4cbe65571a87eaecf..d0473f5cc16a0a68413a8b25be179ff93db428e3 100644 --- a/gcc/testsuite/g++.dg/template/ptrmem8.C +++ b/gcc/testsuite/g++.dg/template/ptrmem8.C @@ -11,7 +11,7 @@ struct B struct D : B {}; -template <int (D::*fun)() const> int Get(); // { dg-message "candidate" } +template <int (D::*fun)() const> int Get(); // { dg-message "note" } int main () { diff --git a/gcc/testsuite/g++.dg/template/qualttp5.C b/gcc/testsuite/g++.dg/template/qualttp5.C index c3ebd8c82f627c8b32d75837a1ebffcd42895f8b..8bca7f696601f674e75e019fecf49ecb42293214 100644 --- a/gcc/testsuite/g++.dg/template/qualttp5.C +++ b/gcc/testsuite/g++.dg/template/qualttp5.C @@ -4,13 +4,14 @@ template <class U> struct A { - template <class T> class B {}; // { dg-message "operator=" } + template <class T> class B {}; // { dg-message "operator=|no known conversion" } }; template <template <class> class TT> void f() { TT<int> y; y = 0; // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 13 } } template <class T> struct C diff --git a/gcc/testsuite/g++.dg/template/sfinae2.C b/gcc/testsuite/g++.dg/template/sfinae2.C index 0b11ecc0f020c8f7fac6b45b45099fa560cc6aab..e39ca6b76aac520c2377334e4b625ec6cbce21bc 100644 --- a/gcc/testsuite/g++.dg/template/sfinae2.C +++ b/gcc/testsuite/g++.dg/template/sfinae2.C @@ -8,10 +8,11 @@ template<int T> struct cl { const static int value = T; }; -template<int I> void fn (char (*) [cl<I>::value] = 0 ); // { dg-message "candidate" } +template<int I> void fn (char (*) [cl<I>::value] = 0 ); // { dg-message "note" } void foo (void) { fn<0> (); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 15 } } diff --git a/gcc/testsuite/g++.dg/template/spec22.C b/gcc/testsuite/g++.dg/template/spec22.C index 7e627f16763b12a0e6cdbcae47c96fb313024b5d..f916ea468941339927a661b21b68fbda0be842b9 100644 --- a/gcc/testsuite/g++.dg/template/spec22.C +++ b/gcc/testsuite/g++.dg/template/spec22.C @@ -16,6 +16,6 @@ template <typename T> struct srp }; ptr<int> parent_get() { - srp<int> parent; + srp<int> parent; // { dg-message "candidate" } return parent; // { dg-error "is ambiguous" } } diff --git a/gcc/testsuite/g++.dg/template/spec23.C b/gcc/testsuite/g++.dg/template/spec23.C index 1c027fa43886ae2a9c4b5550f19484b2a22bec9a..3d401f00ef9a5b87d2c352c10f8b2ecf509ec432 100644 --- a/gcc/testsuite/g++.dg/template/spec23.C +++ b/gcc/testsuite/g++.dg/template/spec23.C @@ -20,6 +20,7 @@ struct Bar Foo Quux (Bar const &b) { return b; // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 22 } } diff --git a/gcc/testsuite/g++.dg/template/ttp25.C b/gcc/testsuite/g++.dg/template/ttp25.C index 23e5a7a799099129cff23dc944dc9fc55c9d0b20..861d187d4db7f089927afc94e67648ad580966d8 100644 --- a/gcc/testsuite/g++.dg/template/ttp25.C +++ b/gcc/testsuite/g++.dg/template/ttp25.C @@ -18,9 +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 } f2(X<5>(), 5); f3(X<5>(), 5l); // { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 23 } f4(5, X<5>()); f4(5l, X<5>()); // { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 26 } f4((short)5, X<5>()); } diff --git a/gcc/testsuite/g++.dg/template/typedef4.C b/gcc/testsuite/g++.dg/template/typedef4.C index 2676d8fec1df467097d3fe1ab3c0709c49909e34..60fad0688580ff413b2a46d8d0b6f73f9b021615 100644 --- a/gcc/testsuite/g++.dg/template/typedef4.C +++ b/gcc/testsuite/g++.dg/template/typedef4.C @@ -6,4 +6,5 @@ template<typedef> void foo(); // { dg-error "no type|typedef declaration|templa void bar() { foo<int>(); // { dg-error "matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 8 } } diff --git a/gcc/testsuite/g++.dg/template/unify10.C b/gcc/testsuite/g++.dg/template/unify10.C index 7b19e1ebfe82d3267988af7d3317bb7b6216177d..8dc434b7577205a2058277687968a6cdd9a6a0c7 100644 --- a/gcc/testsuite/g++.dg/template/unify10.C +++ b/gcc/testsuite/g++.dg/template/unify10.C @@ -12,36 +12,48 @@ struct MyClass { }; template<class CLASS> -void mFunction(void (CLASS::* method)()) {} // { dg-message "candidate" } +void mFunction(void (CLASS::* method)()) {} // { dg-message "note" } template<class CLASS> -void cFunction(void (CLASS::* method)() const) {} // { dg-message "candidate" } +void cFunction(void (CLASS::* method)() const) {} // { dg-message "note" } template<class CLASS> -void vFunction(void (CLASS::* method)() volatile) {} // { dg-message "candidate" } +void vFunction(void (CLASS::* method)() volatile) {} // { dg-message "note" } template<class CLASS> -void cvFunction(void (CLASS::* method)() const volatile) {} // { dg-message "candidate" } +void cvFunction(void (CLASS::* method)() const volatile) {} // { dg-message "note" } int main() { mFunction(&MyClass::mMethod); mFunction(&MyClass::cMethod); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 28 } mFunction(&MyClass::vMethod); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 30 } mFunction(&MyClass::cvMethod); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 32 } cFunction(&MyClass::mMethod); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 35 } cFunction(&MyClass::cMethod); cFunction(&MyClass::vMethod); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 38 } cFunction(&MyClass::cvMethod); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 40 } vFunction(&MyClass::mMethod); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 43 } vFunction(&MyClass::cMethod); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 45 } vFunction(&MyClass::vMethod); vFunction(&MyClass::cvMethod); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 48 } cvFunction(&MyClass::mMethod); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 51 } cvFunction(&MyClass::cMethod); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 53 } cvFunction(&MyClass::vMethod); // { dg-error "no matching function" } + // { dg-message "candidate" "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 a49f5c1b2d0aef535136de8e8c1f9281239d70d1..ed6b31c31c46ce7f6ec2a4cb6c677e69092cca43 100644 --- a/gcc/testsuite/g++.dg/template/unify11.C +++ b/gcc/testsuite/g++.dg/template/unify11.C @@ -8,7 +8,7 @@ struct A template <typename S, typename T, typename U, typename S::v = &S::v::s> typename S::A -foo (S c, T t, U u) // { dg-message "candidate" } +foo (S c, T t, U u) // { dg-message "note" } { } @@ -21,6 +21,7 @@ struct B { A a; A b = foo (this, a, t); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 23 } } } c; B () : c (A ()) diff --git a/gcc/testsuite/g++.dg/template/unify6.C b/gcc/testsuite/g++.dg/template/unify6.C index 4e890fe50b3ed025189d2179b3b8635be2bd54cc..b12ecb29b215b60d997072a3efb7735ce0350d30 100644 --- a/gcc/testsuite/g++.dg/template/unify6.C +++ b/gcc/testsuite/g++.dg/template/unify6.C @@ -8,7 +8,7 @@ template <typename T> void Foo1 (T const *a) {a (1);} // #2 template <typename T> T const *Foo2 (T *); -template <typename T> void Foo3 (T *, T const * = 0); // { dg-message "candidate" } +template <typename T> void Foo3 (T *, T const * = 0); // { dg-message "note" } void Bar () { @@ -19,4 +19,5 @@ void Bar () Foo3 (&Baz); Foo3 (&Baz, &Baz); // { dg-error "no matching function" "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 21 } } diff --git a/gcc/testsuite/g++.dg/template/unify7.C b/gcc/testsuite/g++.dg/template/unify7.C index 23f61f3dcca578a42099537cbcbf3902e8625c2d..2bfa56303da9c85701fb48fe7d666b397d405206 100644 --- a/gcc/testsuite/g++.dg/template/unify7.C +++ b/gcc/testsuite/g++.dg/template/unify7.C @@ -3,7 +3,7 @@ // PR c++/3518 template <typename T> void Foo (const T &); -template <typename T> void Baz (const T (*)()); // { dg-message "candidate" } +template <typename T> void Baz (const T (*)()); // { dg-message "note" } int &f (); @@ -11,4 +11,5 @@ int main() { Foo (f); Baz (f); // { dg-error "no matching function" "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 13 } } diff --git a/gcc/testsuite/g++.dg/template/unify9.C b/gcc/testsuite/g++.dg/template/unify9.C index 1e16c432b8a8b416b4af188deed8a10f9c4a59bb..40f6b9271fc5082d132a8e734649120c7c12bfcf 100644 --- a/gcc/testsuite/g++.dg/template/unify9.C +++ b/gcc/testsuite/g++.dg/template/unify9.C @@ -4,7 +4,7 @@ // Origin:Wolfgang Bangerth <bangerth@dealii.org> // PR 21799: deduction of cvqualifiers on member functions was wrong -template <class T> void f (T &, void (T::*)() ); // { dg-message "candidate" } +template <class T> void f (T &, void (T::*)() ); // { dg-message "note" } struct X { void g() const {} @@ -14,4 +14,5 @@ const X *x; int main () { f (*x, &X::g); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 16 } } diff --git a/gcc/testsuite/g++.dg/template/varmod1.C b/gcc/testsuite/g++.dg/template/varmod1.C index c2c51c72173dca78a39b0b6cfe8f039f8235641e..6ae78d9003f58c98e978168545100a92a435c466 100644 --- a/gcc/testsuite/g++.dg/template/varmod1.C +++ b/gcc/testsuite/g++.dg/template/varmod1.C @@ -1,10 +1,11 @@ // { dg-options "-w" } -template<typename T> void foo(T); // { dg-message "candidate" } +template<typename T> void foo(T); // { dg-message "note" } void bar() { int i; int A[i][i]; foo(A); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 9 } } diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/15799.C b/gcc/testsuite/g++.old-deja/g++.benjamin/15799.C index 35d882b21b355381b6a3a6a1b916f0cc4c1ddd94..24725c999b0f08f5d6df1cb154f3b04245bf76e6 100644 --- a/gcc/testsuite/g++.old-deja/g++.benjamin/15799.C +++ b/gcc/testsuite/g++.old-deja/g++.benjamin/15799.C @@ -24,6 +24,7 @@ enum { first, last}; void foo(void) { sanjose obj(first); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 26 } } diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/15800-1.C b/gcc/testsuite/g++.old-deja/g++.benjamin/15800-1.C index 3441ae5bed070082d31b8be30be0df02367737d4..4f6d878e88548dcd302461302714daa97ed47372 100644 --- a/gcc/testsuite/g++.old-deja/g++.benjamin/15800-1.C +++ b/gcc/testsuite/g++.old-deja/g++.benjamin/15800-1.C @@ -5,7 +5,7 @@ struct panama { panama(); panama(panama &); - panama& operator=(panama&); // { dg-message "candidate is" } + panama& operator=(panama&); // { dg-message "operator=|no known conversion" } }; extern panama dig(); @@ -13,5 +13,6 @@ extern panama dig(); void foo() { panama obj; obj = dig(); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 15 } } diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/ambiguity1.C b/gcc/testsuite/g++.old-deja/g++.brendan/ambiguity1.C index ddf93c4bdae8bfa831ee7eb478fec99b3387ff9d..4706d7e8a715ea9ef4bfcf7d986954bfa791c252 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/ambiguity1.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/ambiguity1.C @@ -8,10 +8,11 @@ struct B { B (int); }; -void myfunc (const A& t0); // { dg-message "candidates" } +void myfunc (const A& t0); // { dg-message "note" } void myfunc (const B& t0); // { dg-message "note" } int main () { myfunc(1); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 16 } } diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash29.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash29.C index 33be95f20447d3743f5f50a0e59d293bdeb2dbc6..38c9d49a19ded350b9e1ae6bea91a6022d1ba05b 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/crash29.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash29.C @@ -8,12 +8,13 @@ union Value struct GlobalAddress // { dg-message "note" } { - GlobalAddress(Value *nvar){} // { dg-message "candidates" } + GlobalAddress(Value *nvar){} // { dg-message "note" } }; int main() { new GlobalAddress(Value()); // internal error occured here// { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 17 } //new GlobalAddress(new Value()); // This line is correct code } diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash48.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash48.C index e7d621cf0a25d55b2a8586063748f1e372f14325..fe759406ee139b0eeae8bf0c4893a48c55cf6083 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/crash48.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash48.C @@ -1,22 +1,24 @@ // { dg-do compile } // GROUPS passed old-abort -class internal { // { dg-message "internal::internal" } +class internal { // { dg-message "internal::internal|candidate expects|no known conversion" } int field; int anotherfield; }; -class bug { // { dg-message "bug::bug" } +class bug { // { dg-message "bug::bug|candidate expects" } internal* numbers; bug(int size); }; -bug::bug(int size) // { dg-message "bug::bug" } +bug::bug(int size) // { dg-message "bug::bug|candidate expects" } { numbers = new internal(size * size);// { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 15 } } int main() { bug test; // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 22 } } diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash56.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash56.C index 5dc1a87490309ee1074180fd547b3f613e5c529e..ad652cf93588e9428ebe312a80e4eb50e0191e22 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/crash56.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash56.C @@ -278,6 +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 } } template<class T> bool @@ -286,6 +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 } return TRUE; } return FALSE; @@ -343,7 +345,7 @@ operator>=(const SetLD<T>& a, const SetLD<T>& b) class String { }; class IcaseString: public String { }; template <> class SetLD< IcaseString >: public SetLD< String > { public: SetLD (): SetLD< String >() { }; SetLD (const ::ListD< IcaseString >& other): SetLD< String >() { ::ListD< IcaseString >::Vix x; for (other.first(x); 0 != x; other.next(x)) add(other(x)); }; SetLD (const SetLD & other): SetLD< String >(other) { }; const IcaseString & operator()(const Vix& x) const { return ( IcaseString &) SetLD< String >::operator()(x); } }; typedef SetLD< String > SetLD_String_IcaseString_old_tmp99; typedef SetLD< IcaseString > SetLD_String_IcaseString_new_tmp99; -inline int operator== (const SetLD_String_IcaseString_new_tmp99& a, const SetLD_String_IcaseString_new_tmp99& b) // { dg-message "operator==" } +inline int operator== (const SetLD_String_IcaseString_new_tmp99& a, const SetLD_String_IcaseString_new_tmp99& b) // { dg-message "operator==|no known conversion" } { const SetLD_String_IcaseString_old_tmp99& oa = a; const SetLD_String_IcaseString_old_tmp99& ob = b; diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/cvt3.C b/gcc/testsuite/g++.old-deja/g++.brendan/cvt3.C index e77c437a6d066c82303154e2b1d7333d4a581e80..8be5d6ed3334468173df1d8e88f9171563b3ae5f 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/cvt3.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/cvt3.C @@ -38,11 +38,12 @@ struct bar class nnyacc { public: - static void assign(void*& lval, void*& rval); // { dg-message "candidate is" } + static void assign(void*& lval, void*& rval); // { dg-message "nnyacc::assign|no known conversion" } }; void foo (bar yylval, bar *yyvsp) { nnyacc::assign(yylval.valueList, yyvsp[0].valueList);// { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 47 } } diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/overload1.C b/gcc/testsuite/g++.old-deja/g++.brendan/overload1.C index 328bcdfe2ce8206f93f56fb61ecff90597d34178..1b9415b0ed07bc674885c2632c847b87a7a0942a 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/overload1.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/overload1.C @@ -9,7 +9,7 @@ public: class Bar : public Foo { public: - int f (int); // { dg-message "candidate is" } + int f (int); // { dg-message "Bar::f|candidate expects" } }; int main () @@ -17,5 +17,6 @@ int main () Bar b; b.f ();// { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 19 } b.f (10); } diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/overload4.C b/gcc/testsuite/g++.old-deja/g++.brendan/overload4.C index 7a1941cac4e7aac70cec5c49107267bd99e8d9dc..6206d0b9eb13f5a31ac7457d42b810b5bf179f7c 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/overload4.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/overload4.C @@ -5,7 +5,7 @@ class B { public: - static void WantsNew (NewObject creator); // { dg-message "candidate is" } + static void WantsNew (NewObject creator); // { dg-message "B::WantsNew|no known conversion" } }; class A @@ -19,5 +19,6 @@ // This used to die in convert_harshness_{ansi,old} cuz it // didn't know what to do about a void type. B::WantsNew ( A::NewOne );// { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 21 } } }; diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/overload9.C b/gcc/testsuite/g++.old-deja/g++.brendan/overload9.C index b168e860410b1b535ec5cd6f9d2d90e5fe45efa0..b24a1f6479f7cc071dc472f71549e99b6040f4cc 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/overload9.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/overload9.C @@ -1,13 +1,13 @@ // { dg-do assemble } // GROUPS passed overloading -class CLogger +class CLogger // { dg-message "candidate" } { public: - void operator() (int,const char *) {}; // { dg-message "candidates" } + void operator() (int,const char *) {}; // { dg-message "note" } void operator() (int,const char *, ...) {}; // { dg-message "note" } } Log; -class CGLogger : public CLogger +class CGLogger : public CLogger // { dg-message "candidate" } { } GLog; diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900127_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900127_01.C index 1c315b7fadde784b197a2d3efa20687e986cb689..a066d584880aa766cb48c95e9ce455ab04e3416b 100644 --- a/gcc/testsuite/g++.old-deja/g++.bugs/900127_01.C +++ b/gcc/testsuite/g++.old-deja/g++.bugs/900127_01.C @@ -21,6 +21,7 @@ void bar (f_ptr_t2); // { dg-message "note" } void function () { bar (foo); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 23 } } int main () { return 0; } diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900205_04.C b/gcc/testsuite/g++.old-deja/g++.bugs/900205_04.C index 4290144f89ff487b2a44453c5436207dfef28ab1..3d8625e5c8d51684b4c0a826223e672cccfb8e03 100644 --- a/gcc/testsuite/g++.old-deja/g++.bugs/900205_04.C +++ b/gcc/testsuite/g++.old-deja/g++.bugs/900205_04.C @@ -24,6 +24,7 @@ struct0::struct0 (int, void *) // { dg-message "note" } } struct struct0_derived_struct_0 : public struct0 { // { dg-error "no matching|deleted" } + // { dg-message "candidate" "candidate note" { target *-*-* } 26 } }; struct0_derived_struct_0 object; // { dg-message "synthesized|deleted" } diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900330_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900330_02.C index 5038f23b16c5464aeb8c2a77f58953e9c2e28e92..cad19a2c3053d566fb0af703ba03856659286141 100644 --- a/gcc/testsuite/g++.old-deja/g++.bugs/900330_02.C +++ b/gcc/testsuite/g++.old-deja/g++.bugs/900330_02.C @@ -19,12 +19,13 @@ struct B { }; struct D : public B { - int f(struct B); // { dg-message "candidate is" } referred to below + int f(struct B); // { dg-message "D::f|no known conversion" } referred to below }; void h(D* pd) { pd->f(1); // { dg-error "no matching" } D::f(struct B) hides B::f(int) + // { dg-message "candidate" "candidate note" { target *-*-* } 27 } } int main () { return 0; } diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900404_03.C b/gcc/testsuite/g++.old-deja/g++.bugs/900404_03.C index 6f7ea3f4581c6282e86889f78f70346a1e1382de..7e2829f7b095558972cb23a43b9dd38c9ab25d38 100644 --- a/gcc/testsuite/g++.old-deja/g++.bugs/900404_03.C +++ b/gcc/testsuite/g++.old-deja/g++.bugs/900404_03.C @@ -23,6 +23,7 @@ char c; void test () { function0 (c,c); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 25 } } int main () { return 0; } diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900514_03.C b/gcc/testsuite/g++.old-deja/g++.bugs/900514_03.C index c06cef1838030855ac9cc0cf4243e991b9dffc13..30c2603a7321d407848617ee09e8c043a2e3ac0a 100644 --- a/gcc/testsuite/g++.old-deja/g++.bugs/900514_03.C +++ b/gcc/testsuite/g++.old-deja/g++.bugs/900514_03.C @@ -29,7 +29,7 @@ struct t_0_st_0 { operator t_0_st_1 ();// { dg-message "note" } }; -t_0_st_0 t_0_st_0_obj0; +t_0_st_0 t_0_st_0_obj0; // { dg-message "candidate" } void t_0_assignment () { @@ -54,7 +54,7 @@ struct t_1_st_1 { t_1_st_1 (t_1_st_0&); // { dg-message "note" } t_1_st_1 (); - void operator= (t_1_st_1&); // { dg-message "note" } + void operator= (t_1_st_1&); // { dg-message "operator=|no known conversion" } }; struct t_1_st_0 { @@ -63,7 +63,7 @@ struct t_1_st_0 { operator t_1_st_1 (); // { dg-message "note" } }; -t_1_st_0 t_1_st_0_obj0; +t_1_st_0 t_1_st_0_obj0; // { dg-message "candidate" } void t_1_assignment () { @@ -72,7 +72,9 @@ void t_1_assignment () t_1_st_1 t_1_st_1_obj2; t_1_st_1_obj0 = t_1_st_0_obj0; // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 74 } t_1_st_1_obj1 = t_1_st_1 (t_1_st_0_obj0); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 76 } } void t_1_local_init () @@ -93,10 +95,10 @@ struct t_2_st_1 { // { dg-error "initializing" } struct t_2_st_0 { int member; - operator t_2_st_1 (); // { dg-message "candidate" } + operator t_2_st_1 (); // { dg-message "note" } }; -t_2_st_0 t_2_st_0_obj0; +t_2_st_0 t_2_st_0_obj0; // { dg-message "candidate" } void t_2_assignment () { diff --git a/gcc/testsuite/g++.old-deja/g++.eh/ctor1.C b/gcc/testsuite/g++.old-deja/g++.eh/ctor1.C index 1cd71c4d82a422752651c6b772dde06fba903ebc..0e7218f0c8f96f2eeaecd560f492a2e17c662e30 100644 --- a/gcc/testsuite/g++.old-deja/g++.eh/ctor1.C +++ b/gcc/testsuite/g++.old-deja/g++.eh/ctor1.C @@ -1,8 +1,8 @@ // { dg-do assemble } struct A { - A(); // { dg-message "" } candidate - A(A&); // { dg-message "candidates" } referenced below + A(); // { dg-message "A::A|candidate expects" } candidate + A(A&); // { dg-message "A::A|no known conversion" } referenced below }; int @@ -11,6 +11,7 @@ main () try { throw A(); // { dg-error "no matching" "match" } can't copy + // { dg-message "candidate" "candidate note" { target *-*-* } 13 } // { dg-error "thrown expression" "expr" { target *-*-* } 13 } } catch (...) { } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/conversion11.C b/gcc/testsuite/g++.old-deja/g++.jason/conversion11.C index 1e64693d804723ad04229bde29e561f3b86f43ef..607cf9cc841b0b42d3eeb40c2dc0f5728193be7a 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/conversion11.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/conversion11.C @@ -14,7 +14,7 @@ public: class Something { public: - void DoSomething(Ding A); // { dg-message "candidate is" } referred to + void DoSomething(Ding A); // { dg-message "Something::DoSomething|no known conversion" } referred to }; void DoSomething(Ding A); @@ -23,5 +23,7 @@ void foo(Something* pX) { DoSomething(1); // { dg-error "conversion" } pX->DoSomething(1); // { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 25 } (*pX).DoSomething(1); // { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 27 } } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/crash3.C b/gcc/testsuite/g++.old-deja/g++.jason/crash3.C index e94cc7c978157e739571775bbd43c2774911eff1..9dcf6368aada266aa3d81fcab59bdaf093d52655 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/crash3.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/crash3.C @@ -10,4 +10,5 @@ struct Node // { dg-message "note" } void bug(int i) { Node* q = new Node(i); // { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 12 } } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload16.C b/gcc/testsuite/g++.old-deja/g++.jason/overload16.C index 455376fc8812af7b9455b1907e8134c6fdba99fb..fba33eda70db251e21fcd8292c5320f7f11efe87 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload16.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/overload16.C @@ -1,7 +1,8 @@ // { dg-do assemble } -void f (int); // { dg-message "candidates" } +void f (int); // { dg-message "note" } void f (long); // { dg-message "note" } int main() { f (1 & 0xffffff00UL); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 6 } } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload28.C b/gcc/testsuite/g++.old-deja/g++.jason/overload28.C index 46bf918d047cf470a2844845ce88971550d4d9d7..fe0dae1031f86a766279a1a65e846ed0b8ade329 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload28.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/overload28.C @@ -9,4 +9,5 @@ struct Foo { int main() { Foo* f1 = new Foo(); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 11 } } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/scoping10.C b/gcc/testsuite/g++.old-deja/g++.jason/scoping10.C index bc14974accacf362854944aac6ebdfcaf34700d2..a1b563297fc3609b6bfaf6c73b2984f130c43743 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/scoping10.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/scoping10.C @@ -3,13 +3,14 @@ void f (char *); struct A { - void f (); // { dg-message "candidate is" } referred to + void f (); // { dg-message "A::f|candidate expects" } referred to }; struct B : public A { void g (char *); void h () { extern void g (); // { dg-message "" } f("foo"); // { dg-error "" } hidden + // { dg-message "candidate" "candidate note" { target *-*-* } 12 } g("foo"); // { dg-error "" } hidden } }; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template30.C b/gcc/testsuite/g++.old-deja/g++.jason/template30.C index e5d194012ea0c74a1aba6d60bbeaa62aea9fab4c..9414c06cee283aeb12454fa9f0c16d6d6202ecd6 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/template30.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/template30.C @@ -1,6 +1,6 @@ // { dg-do assemble } template <class T, class U> -int func(U, T); // { dg-message "candidates" } +int func(U, T); // { dg-message "note" } template <class T, class U> int func(T, U) // { dg-message "note" } @@ -11,4 +11,5 @@ int func(T, U) // { dg-message "note" } int main () { func (0, 1); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 13 } } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/temporary2.C b/gcc/testsuite/g++.old-deja/g++.jason/temporary2.C index efd09fd06b18ef6325f7f9ff5601197f14fd3159..da216ae5cc7936e90d9c0244f910fd16a8b35989 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/temporary2.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/temporary2.C @@ -13,5 +13,7 @@ X foo() { X x; return x; } int main() { X x(foo()); // { dg-error "no match" } Compiler doesn't warn about temporary reference. + // { dg-message "candidate" "candidate note" { target *-*-* } 15 } x.bar(foo()); // { dg-error "no match" } The same mistake is warned about in this case. + // { dg-message "candidate" "candidate note" { target *-*-* } 17 } } diff --git a/gcc/testsuite/g++.old-deja/g++.law/arg1.C b/gcc/testsuite/g++.old-deja/g++.law/arg1.C index 8b117aa89168feb746d68e8caa01f694a7cd6914..3fc42bccc1bc202fc553a7cee6e72cf6bc9f1102 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/arg1.C +++ b/gcc/testsuite/g++.old-deja/g++.law/arg1.C @@ -9,13 +9,13 @@ // check the order of declarations class A { public: - void f(double* p) { std::cout << "A(double*)\n"; } // { dg-message "candidates" } + void f(double* p) { std::cout << "A(double*)\n"; } // { dg-message "note" } void f(int* p) { std::cout << "A(int*)\n"; } // { dg-message "note" } }; class B { public: - void f(int* p) { std::cout << "B(int*)\n"; } // { dg-message "candidates" } + void f(int* p) { std::cout << "B(int*)\n"; } // { dg-message "note" } void f(double* p) { std::cout << "B(double*)\n"; } // { dg-message "note" } }; @@ -25,6 +25,8 @@ int main() B b; a.f(0);// { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 27 } b.f(0);// { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 29 } } diff --git a/gcc/testsuite/g++.old-deja/g++.law/arg11.C b/gcc/testsuite/g++.old-deja/g++.law/arg11.C index 01331535ee2c42a5f797befe39c87cff6dca27f7..fc590c4387a13a3f6ded28b36b9edf9690e987dc 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/arg11.C +++ b/gcc/testsuite/g++.old-deja/g++.law/arg11.C @@ -9,7 +9,7 @@ struct String { String(const char*); }; struct Ack { Ack(String); }; -struct S { void method(Ack); }; // { dg-message "candidate is" } referenced below +struct S { void method(Ack); }; // { dg-message "S::method|no known conversion" } referenced below void function(Ack); @@ -18,5 +18,6 @@ foo(S *o) { // Neither call has a usable constructor for conversions of char[5] to Ack. function("adsf");// { dg-error "conversion" } o->method("adsf");// { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 20 } return 0; } diff --git a/gcc/testsuite/g++.old-deja/g++.law/arm9.C b/gcc/testsuite/g++.old-deja/g++.law/arm9.C index b8128c6f686a8b9bb53c40dc6bcfdd66ee8c691c..979ef808820eaafc00d319ef273b59c02ed99131 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/arm9.C +++ b/gcc/testsuite/g++.old-deja/g++.law/arm9.C @@ -19,11 +19,12 @@ class B : public A { public: void set (f2 f); }; -void B::set (f2 f) { std::cout << "called B\n";} // { dg-message "candidate is" } +void B::set (f2 f) { std::cout << "called B\n|no known conversion";} // { dg-message "B::set|no known conversion" } int main() { B b; b.set(F1); // ARM page 309: should call A.set(f1) and that what g++ does,// { dg-error "match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 26 } // but 13.1 of ARM clearly states that it should call B::set() // or generate an error because overloading works only for // functions within the same scope (first page of chapter 13) diff --git a/gcc/testsuite/g++.old-deja/g++.law/ctors11.C b/gcc/testsuite/g++.old-deja/g++.law/ctors11.C index 39ee76b0ae7818dafb3b1a9102c00164ddf2a16c..c8b59b6792664b670783cc2a57366c90d66037f2 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/ctors11.C +++ b/gcc/testsuite/g++.old-deja/g++.law/ctors11.C @@ -18,4 +18,5 @@ public: int main() { B(10);// { dg-error "match" } B doesn't have a constructor taking int + // { dg-message "candidate" "candidate note" { target *-*-* } 20 } } diff --git a/gcc/testsuite/g++.old-deja/g++.law/ctors17.C b/gcc/testsuite/g++.old-deja/g++.law/ctors17.C index 0d61c49abd79128266210297ade72921766d3144..071a36008f81b2dc6be0814605bb209a281cdb55 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/ctors17.C +++ b/gcc/testsuite/g++.old-deja/g++.law/ctors17.C @@ -20,4 +20,5 @@ int main() X *y = new X(10, "123"); // the compiler must reject this constructor call: X *x = new X("abc");// { dg-error "match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 22 } } diff --git a/gcc/testsuite/g++.old-deja/g++.law/ctors5.C b/gcc/testsuite/g++.old-deja/g++.law/ctors5.C index 7b2c782b30b7c1e66fff471f2faf8a6c2b76e91d..1776be949bb37e4a65467bb0ea9a05d2f5005872 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/ctors5.C +++ b/gcc/testsuite/g++.old-deja/g++.law/ctors5.C @@ -5,7 +5,7 @@ // Subject: bug in handling static const object of the enclosing class // Date: Tue, 1 Sep 92 10:38:44 EDT -class X // { dg-message "7:X::X" } implicit constructor +class X // { dg-message "7:X::X|candidate expects" } implicit constructor { private: int x; @@ -23,7 +23,7 @@ class Y // { dg-error "1:new types may not be defined in a return type" "err" } Y(); } X::X( int xi ) // { dg-error "14:return type specification for constructor invalid" "err" } -// { dg-message "1:candidates are: X::X\\(int\\)" "note" { target *-*-* } 25 } +// { dg-message "1:X::X|candidate expects" "match candidate text" { target *-*-* } 25 } { x = xi; } @@ -31,6 +31,7 @@ X::X( int xi ) // { dg-error "14:return type specification for constructor inval const X X::x0( 0 ); Y::Y() // { dg-error "6:no matching function for call to 'X::X\\(\\)'" } +// { dg-message "candidate" "candidate note" { target *-*-* } 33 } { xx = X::x0; } diff --git a/gcc/testsuite/g++.old-deja/g++.law/ctors9.C b/gcc/testsuite/g++.old-deja/g++.law/ctors9.C index 43ba1262c95b2884513cc98ec1796a732129f047..d94495a253e81846fe0a59a88edd58b0550b7c5e 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/ctors9.C +++ b/gcc/testsuite/g++.old-deja/g++.law/ctors9.C @@ -33,6 +33,7 @@ int blort(Foo& f) int main() { var_Foo b(2);// { dg-error "match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 35 } b->a = 0; int x = blort(b); return x; diff --git a/gcc/testsuite/g++.old-deja/g++.law/enum4.C b/gcc/testsuite/g++.old-deja/g++.law/enum4.C index 37836595b2f12e4a8a9d0b362df78d6600983539..6695061210d132fdb44ad64fb87928ef323b4c02 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/enum4.C +++ b/gcc/testsuite/g++.old-deja/g++.law/enum4.C @@ -11,7 +11,7 @@ enum Enum {enumerator1, enumerator2}; struct Struct { int i; - int getI(Enum) {return i;} // { dg-message "candidate is" } + int getI(Enum) {return i;} // { dg-message "Struct::getI|no known conversion" } }; int funct (Enum) @@ -25,5 +25,6 @@ int main() Struct s; int x = funct(e+1);// { dg-error "invalid" } int y = s.getI(e+1);// { dg-error "match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 27 } return x+y; } diff --git a/gcc/testsuite/g++.old-deja/g++.law/missed-error2.C b/gcc/testsuite/g++.old-deja/g++.law/missed-error2.C index 5f1187a592b31e1d9acb14b72ae8d2efb0f7b27e..7d058fd896ea83827461227a60c4e58fbfe76440 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/missed-error2.C +++ b/gcc/testsuite/g++.old-deja/g++.law/missed-error2.C @@ -14,7 +14,7 @@ #undef max #endif -inline int max(int a, int b) {return a > b ? a : b;}; // { dg-message "candidate" } +inline int max(int a, int b) {return a > b ? a : b;}; // { dg-message "note" } // { dg-error "extra ';'" "extra ;" { target *-*-* } 17 } inline double max(double a, double b) {return a > b ? a : b;}; // { dg-message "note" } candidate // { dg-error "extra ';'" "extra ;" { target *-*-* } 19 } @@ -32,5 +32,6 @@ static void foo(int i, int j, double x, double y) { std::cout << "Max(int): " << max(i,j) << " Max(double): " << max(x,y) << '\n'; std::cout << "Max(int, double): " << max(i, y) << '\n';// { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 34 } } diff --git a/gcc/testsuite/g++.old-deja/g++.law/operators32.C b/gcc/testsuite/g++.old-deja/g++.law/operators32.C index 8d5372c6c3027238e799e468dc009983b7081257..20d148dd544988bd3bb5562ea9d734537cbbbd92 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/operators32.C +++ b/gcc/testsuite/g++.old-deja/g++.law/operators32.C @@ -7,7 +7,7 @@ // template <class T> -void ffree(long rows, T** array) // { dg-message "candidate" } +void ffree(long rows, T** array) // { dg-message "note" } { for( long i = 0; i < rows; i++ ) delete [] array[i]; // delete row @@ -50,6 +50,8 @@ foo() {std::cout << "foo created" << std::endl; } foo **f2; allocate2d(d1, d2, f2);// { dg-error "" } type.*// ERROR - trying to.* +// { dg-message "candidate" "candidate note" { target *-*-* } 52 } ffree(d1, f2);// { dg-error "" } type.*// ERROR - trying to.* +// { dg-message "candidate" "candidate note" { target *-*-* } 54 } } diff --git a/gcc/testsuite/g++.old-deja/g++.law/operators9.C b/gcc/testsuite/g++.old-deja/g++.law/operators9.C index d00c707c9152fd5c821b3325f024d774fede9336..3c50cbdd0e7e2979f1e3c4b709dbebe5ab19daf0 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/operators9.C +++ b/gcc/testsuite/g++.old-deja/g++.law/operators9.C @@ -10,11 +10,12 @@ class B { public: operator=(B &); // { dg-error "no type" } - // { dg-message "candidate is" "note" { target *-*-* } 12 } + // { dg-message "B::operator=|no known conversion" "note" { target *-*-* } 12 } }; void test(B &b1, const B &b2) { b1 = b2;// { dg-error "match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 19 } } diff --git a/gcc/testsuite/g++.old-deja/g++.mike/net2.C b/gcc/testsuite/g++.old-deja/g++.mike/net2.C index f2240ddfc18c6094272f1e24412c1de63f8967d6..dfc57e149aa32c41a3abf98b3dd67b10f39ed836 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/net2.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/net2.C @@ -11,3 +11,4 @@ class A { // { dg-message "note" } copy ctor candidate }; A a(0); // { dg-error "ambiguous" } +// { dg-message "candidate" "candidate note" { target *-*-* } 13 } diff --git a/gcc/testsuite/g++.old-deja/g++.mike/net22.C b/gcc/testsuite/g++.old-deja/g++.mike/net22.C index e5e1cb1081d331942da73fa64e58dedb94620c04..604aef9bcc0b8362a869494faf227344f1c28881 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/net22.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/net22.C @@ -10,5 +10,6 @@ class Child : public Parent { // { dg-message "note" } called int main() { Child c( "String initializer" ); // { dg-error "match" } bad + // { dg-message "candidate" "candidate note" { target *-*-* } 12 } return 0; } diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p11110.C b/gcc/testsuite/g++.old-deja/g++.mike/p11110.C index e234d57c323a0dd9efe499f80d99be55e26ce824..7e3a1ffa33535cbd544b051773cab1bba4ef0176 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/p11110.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/p11110.C @@ -6,7 +6,7 @@ class data; class conatiner { public: virtual void* first (); - virtual data* contents (void* i); // { dg-message "candidate is" } + virtual data* contents (void* i); // { dg-message "conatiner::contents|no known conversion" } }; class user { @@ -18,4 +18,5 @@ private: data* user::data1() const { return (_c.contents (_c.first)); // { dg-error "match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 20 } } diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p1989.C b/gcc/testsuite/g++.old-deja/g++.mike/p1989.C index c8664390b4ad36beabe01c9c5e1210fb0f927508..487f609a1451a8f4195a8c49edca4d299892bf3d 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/p1989.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/p1989.C @@ -197,6 +197,7 @@ List_DLS<T>::search(const T& item) const { for (Pix x=this->first(); 0 != x; this->next(x)) { if (item == this->operator()(x)) // { dg-error "match" } const subversion + // { dg-message "candidate" "candidate note" { target *-*-* } 199 } return x; } return 0; @@ -485,7 +486,7 @@ class STRLIdentifier { char buf[10]; }; -extern int operator==(vertex<STRLIdentifier*>&, vertex<STRLIdentifier*>&); // { dg-message "candidates" } const subversion +extern int operator==(vertex<STRLIdentifier*>&, vertex<STRLIdentifier*>&); // { dg-message "note" } const subversion extern int operator==(STRLIdentifier&, STRLIdentifier&); // { dg-message "note" } fn ref in err msg extern int x(List_DLSp<STRLIdentifier *>); diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p2431.C b/gcc/testsuite/g++.old-deja/g++.mike/p2431.C index 0bb2648215a17130379f8fdb023968351bf04f87..4e74899a1d8c0af00bb1db78e20f2a6c015bce45 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/p2431.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/p2431.C @@ -3,7 +3,7 @@ class A { public: - A(A &); // { dg-message "candidate is" } + A(A &); // { dg-message "note" } }; class B @@ -19,5 +19,6 @@ class C { B b; A a = b;// { dg-error "match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 21 } } }; diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p438.C b/gcc/testsuite/g++.old-deja/g++.mike/p438.C index 16dc628b6135026fedcddf3980f84f70bb09864c..6e78af16515fba166fd7420a0619cd3d42897a54 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/p438.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/p438.C @@ -12,7 +12,7 @@ class C class D { public: - void a(C& b); // { dg-message "candidate is" } + void a(C& b); // { dg-message "D::a|no known conversion" } }; void C::test() const @@ -20,4 +20,5 @@ void C::test() const D d; d.a(*this); // { dg-error "match" } *this is const, so should get error + // { dg-message "candidate" "candidate note" { target *-*-* } 22 } } diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p807a.C b/gcc/testsuite/g++.old-deja/g++.mike/p807a.C index 83879bd7390b989fbc4369f5f0751bc4eeb56b72..04c9c4867e984a3d0347f69b560b391290d9c82a 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/p807a.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/p807a.C @@ -15,8 +15,8 @@ public: class B { public: - operator A(); // { dg-message "candidates" } fn ref in err msg + operator A(); // { dg-message "note" } fn ref in err msg }; -B b; +B b; // { dg-message "candidate" } A a = b; // { dg-error "ambiguous" } should fail as it is ambigious. diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p9068.C b/gcc/testsuite/g++.old-deja/g++.mike/p9068.C index ff5454b2289680d532ec54e55db67d6ca2fe9733..2c62f5c79ab0d0483c6134e83fa80e454a0d33c2 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/p9068.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/p9068.C @@ -2,7 +2,7 @@ // prms-id: 9068 struct ostream { - void operator<< (int); // { dg-message "candidate is" } fn ref in err msg + void operator<< (int); // { dg-message "operator|no known conversion" } fn ref in err msg }; class C { @@ -14,6 +14,7 @@ public: void foo (ostream& lhs, const C& rhs) { lhs << rhs.i; // { dg-error "match" } no such i for any opr << () + // { dg-message "candidate" "candidate note" { target *-*-* } 16 } } int& C::i () { diff --git a/gcc/testsuite/g++.old-deja/g++.niklas/t120.C b/gcc/testsuite/g++.old-deja/g++.niklas/t120.C index bef0665522033d56421006425e4cf96ff3feb67a..7a54e051b1e59c6717b6850e775668bcc159d444 100644 --- a/gcc/testsuite/g++.old-deja/g++.niklas/t120.C +++ b/gcc/testsuite/g++.old-deja/g++.niklas/t120.C @@ -3,4 +3,4 @@ typedef void (*T) (...); void f (); struct S { void g (T); void h() { g(f); } };// { dg-error "match" "match" } -// { dg-message "candidate is" "note" { target *-*-* } 5 } +// { dg-message "candidate|S::g|no known conversion" "match candidate text" { target *-*-* } 5 } diff --git a/gcc/testsuite/g++.old-deja/g++.niklas/t121.C b/gcc/testsuite/g++.old-deja/g++.niklas/t121.C index 4510a280312da4254620c491f490513988f2a4bc..b0c9253da8431a5fac04c94d955dc1049b625c4c 100644 --- a/gcc/testsuite/g++.old-deja/g++.niklas/t121.C +++ b/gcc/testsuite/g++.old-deja/g++.niklas/t121.C @@ -3,4 +3,4 @@ void f (); void g1 (void (*) (...)); void h1 () { g1 (f); }// { dg-error "invalid conversion" } struct S { void g2 (void (*) (...)); void h2 () { g2 (f); } };// { dg-error "match" "match" } -// { dg-message "candidate is" "note" { target *-*-* } 5 } +// { dg-message "candidate|S::g2|no known conversion" "match candidate text" { target *-*-* } 5 } diff --git a/gcc/testsuite/g++.old-deja/g++.niklas/t128.C b/gcc/testsuite/g++.old-deja/g++.niklas/t128.C index 19e3ca1dab0b2d085ddfdc380b05bab95e039b3c..cf0a4f71b8e9af79f39e1d1981d36e77dc56fbac 100644 --- a/gcc/testsuite/g++.old-deja/g++.niklas/t128.C +++ b/gcc/testsuite/g++.old-deja/g++.niklas/t128.C @@ -3,3 +3,4 @@ struct A { A (int); }; struct B : A {}; // { dg-message "note" } without ctor // ERROR - candidates void f () { B (0); }// { dg-error "match" } .* +// { dg-message "candidate" "candidate note" { target *-*-* } 5 } diff --git a/gcc/testsuite/g++.old-deja/g++.ns/overload2.C b/gcc/testsuite/g++.old-deja/g++.ns/overload2.C index 85df6bd694b4a898e92be8e119a60a997e7ee0e7..facfa3f56984b980d88ccddd40dbf21dc2fb5d5a 100644 --- a/gcc/testsuite/g++.old-deja/g++.ns/overload2.C +++ b/gcc/testsuite/g++.old-deja/g++.ns/overload2.C @@ -10,4 +10,5 @@ void f(); // { dg-message "note" } void g() { f(); // { dg-error "ambiguous" } ambiguous, ::f or A::f ? + // { dg-message "candidate" "candidate note" { target *-*-* } 12 } } diff --git a/gcc/testsuite/g++.old-deja/g++.ns/using12.C b/gcc/testsuite/g++.old-deja/g++.ns/using12.C index c3425c7f290629105242387bb52f414369664a68..343cfefc459630d8da2143a7c0e0c255ed1cded4 100644 --- a/gcc/testsuite/g++.old-deja/g++.ns/using12.C +++ b/gcc/testsuite/g++.old-deja/g++.ns/using12.C @@ -3,7 +3,7 @@ namespace foo { - void x (bool); // { dg-message "candidates" } + void x (bool); // { dg-message "note" } void x (char); // { dg-message "note" } candidates void x (int); // { dg-message "note" } candidates void x (double); // { dg-message "note" } candidates @@ -16,4 +16,5 @@ void fn (int i) using foo::x; using baz::x; x(i); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 18 } } diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash24.C b/gcc/testsuite/g++.old-deja/g++.other/crash24.C index a49ce56b1aa3ee52b1e2f5bb1b17c65fd192433d..b1fa01c9b49e9b814de812057b231eb74bf99a05 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/crash24.C +++ b/gcc/testsuite/g++.old-deja/g++.other/crash24.C @@ -7,11 +7,12 @@ class foo { friend class __iterator; typedef __iterator const_iterator; virtual ~foo() { } - __iterator begin(); // { dg-message "candidate is" } + __iterator begin(); // { dg-message "foo::begin|no known conversion for implicit" } }; static void iteratorTest(const foo &x) { foo::const_iterator i = x.begin(); // { dg-error "incomplete type" "incomplete type" } + // { dg-message "candidate" "candidate note" { target *-*-* } 14 } // { dg-error "no matching" "no matching" { target *-*-* } 14 } for (; i; ++i) *i; diff --git a/gcc/testsuite/g++.old-deja/g++.other/expr1.C b/gcc/testsuite/g++.old-deja/g++.other/expr1.C index 485594dfbe31fd871356e3bf152dfdf09df51406..87166f0ae2de1dd28789b698ef85806c60fbc832 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/expr1.C +++ b/gcc/testsuite/g++.old-deja/g++.other/expr1.C @@ -2,8 +2,8 @@ // Simplified from bug report by Trevor Taylor <ttaylor@powerup.com.au> -struct T { - int operator()(int) { } // { dg-message "candidate is" } +struct T { // { dg-message "candidate" } + int operator()(int) { } // { dg-message "operator|candidate expects" } }; int main() { diff --git a/gcc/testsuite/g++.old-deja/g++.other/overload11.C b/gcc/testsuite/g++.old-deja/g++.other/overload11.C index e8c88fd58ec852157c13036000b7cd0b0f4ac168..b994b80701a2250fc25e9498ad431700e31619b3 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/overload11.C +++ b/gcc/testsuite/g++.old-deja/g++.other/overload11.C @@ -21,10 +21,8 @@ // sure that doesn't happen again. -void ovl (int); // { dg-error "" } candidate -// { dg-message "int" "int" { target *-*-* } 24 } -void ovl (float); // { dg-error "" } candidate -// { dg-message "float" "float" { target *-*-* } 26 } +void ovl (int); // { dg-message "ovl|candidate expects" } candidate +void ovl (float); // { dg-message "ovl|candidate expects" } candidate void fn (int); void fna (int); @@ -36,6 +34,7 @@ int main (int argc, char **argv) (ovl) (1); // ok (&ovl) (1); // { dg-error "" } not suitable for overload resolution (ovl) (); // { dg-error "" } no matching candidates + // { dg-message "candidate" "candidate note" { target *-*-* } 36 } (&ovl) (); // { dg-error "" } not suitable for overload resolution // 13.3.1.1 indicates that the following are errors -- the primary expression diff --git a/gcc/testsuite/g++.old-deja/g++.other/pmf3.C b/gcc/testsuite/g++.old-deja/g++.other/pmf3.C index f43ed65ef2a14a6119244fd1dbc3672c7b429911..11e648ed86eaaf20d22e201f67cf2e158e1a1870 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/pmf3.C +++ b/gcc/testsuite/g++.old-deja/g++.other/pmf3.C @@ -3,7 +3,7 @@ // Bug: g++ was crashing after giving errors. template<class T> - void connect_to_method( // { dg-message "candidate is" } + void connect_to_method( // { dg-message "connect_to_method|no known conversion" } T *receiver, void (T::*method)()) {} @@ -21,5 +21,6 @@ public: Gtk_Base::Gtk_Base() { connect_to_method(this,&show); // { dg-error "no match" } invalid pmf expression + // { dg-message "candidate" "candidate note" { target *-*-* } 23 } connect_to_method(this,&expose); // { dg-error "pointer to member" } invalid pmf expression } diff --git a/gcc/testsuite/g++.old-deja/g++.other/volatile1.C b/gcc/testsuite/g++.old-deja/g++.other/volatile1.C index 5c5872870360f15cef236faa81008c56c83134d2..ca28ec8e4435db1b1a630fb928d8fd96d5ed3b32 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/volatile1.C +++ b/gcc/testsuite/g++.old-deja/g++.other/volatile1.C @@ -16,5 +16,6 @@ int main(void) { volatile f_class vf; 0 ? ret_v_f_class() : vf; // { dg-error "match" } can't copy volatile lvalue + // { dg-message "candidate" "candidate note" { target *-*-* } 18 } return 0; } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/auto_ptr.C b/gcc/testsuite/g++.old-deja/g++.pt/auto_ptr.C index 3a587d8738ea9c4587db6dec1f3c1e47f94c4d13..ecfa4de18f9fdfe58c1d54b506b2dc6ad3df8a12 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/auto_ptr.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/auto_ptr.C @@ -30,7 +30,7 @@ template<typename X> struct auto_ptr { X* release() throw() { X* p=px; px=0; return p; } void reset(X* p=0) throw() { if (px != p) delete px, px = p; } - auto_ptr(auto_ptr_ref<X> r) throw() : px(r.py) {} // { dg-message "candidate" } + auto_ptr(auto_ptr_ref<X> r) throw() : px(r.py) {} // { dg-message "note" } template<typename Y> operator auto_ptr_ref<Y>() throw() { return auto_ptr_ref<Y>(release()); } @@ -52,4 +52,5 @@ int main() { x = y; g(f()); h(f()); // { dg-error "match" "match" } no usable copy ctor + // { dg-message "candidate" "candidate note" { target *-*-* } 54 } } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash28.C b/gcc/testsuite/g++.old-deja/g++.pt/crash28.C index 23d0d2c76bd7bf1090f08fae2cfdc23e43344809..2cfed93084de9e60390bb6570674f38712a0e3b4 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/crash28.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/crash28.C @@ -2,7 +2,7 @@ // { dg-options "" } template <class ARRY> -inline unsigned int asize(ARRY &a) // { dg-message "candidate" } +inline unsigned int asize(ARRY &a) // { dg-message "note" } { return sizeof(a) / sizeof(a[0]); } @@ -11,4 +11,5 @@ void f(unsigned int n) { int x[n]; asize(x); // { dg-error "" } no matching function + // { dg-message "candidate" "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 fb9ca3cf121e4e3651d76e0c67a60beba3c77a0f..1aad62132e1facef9bad158cc4160069d7066170 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 "candidate" } + ( typename SID::T ) ); // { dg-message "note" } struct E { }; struct S { void f( int ); }; @@ -15,4 +15,5 @@ struct S { void f( int ); }; void f() { k( E(), (S*)0, &S::f ); // { dg-error "" } no match + // { dg-message "candidate" "candidate note" { target *-*-* } 17 } } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit38.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit38.C index 35540240b93e1245d6d4d162286a0f13c290daf1..1831e45a3553518565a5a4abf44afea6ccaff8ff 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/explicit38.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit38.C @@ -1,8 +1,9 @@ // { dg-do assemble } template <int I> -void f(int j); // { dg-message "candidate" } +void f(int j); // { dg-message "note" } void g() { f<7, 12>(3); // { dg-error "" } no matching function. + // { dg-message "candidate" "candidate note" { target *-*-* } 7 } } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit39.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit39.C index 70c72d003ed82540bb380a84aee914b7aa0e5978..995d8c0750b97fea3df9555d66b162272ee6c2fd 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/explicit39.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit39.C @@ -1,8 +1,9 @@ // { dg-do assemble } template <class T> -void f(int i); // { dg-message "candidate" } +void f(int i); // { dg-message "note" } void g() { f<7>(3); // { dg-error "" } no matching function. + // { dg-message "candidate" "candidate note" { target *-*-* } 7 } } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit41.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit41.C index e04e814dcaad75b61d83b460091cc0479650af32..560370a8b48797e6090b1ba5c28d2d03aadefb78 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/explicit41.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit41.C @@ -1,9 +1,10 @@ // { dg-do assemble } template <int I> -void f(int i); // { dg-message "candidate" } +void f(int i); // { dg-message "note" } void g() { int i; f<i>(7); // { dg-error "" } template argument 1 is invalid. + // { dg-message "candidate" "candidate note" { target *-*-* } 8 } } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit67.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit67.C index 534309f0c986f5480160a97efe5959b9f3ab062c..c0863a072a110825ae678fe4d9f508ac977689e8 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/explicit67.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit67.C @@ -16,6 +16,8 @@ void foo(); // { dg-message "note" } void bar() { foo<S::f>(); // { dg-error "" } no matching function + // { dg-message "candidate" "candidate note" { target *-*-* } 18 } foo<g>(); // { dg-error "" } no matching function + // { dg-message "candidate" "candidate note" { target *-*-* } 20 } } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit77.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit77.C index 0df1f46dbdcac5ab798052267a01f222a674ca35..1213a1511d3df1f477d03880b4543554775abad3 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/explicit77.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit77.C @@ -7,7 +7,7 @@ template <int I, int J> struct S<I, J, 2> : public S<I, I, I>, S<J, J, J> {}; template <int I, int J, int K> -void f(S<I, J, K>, S<I, I, I>); // { dg-message "candidate" } +void f(S<I, J, K>, S<I, I, I>); // { dg-message "note" } void g() { S<0, 0, 0> s0; @@ -15,4 +15,5 @@ void g() { f<0>(s0, s2); f(s0, s2); // { dg-error "" } no matching function + // { dg-message "candidate" "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 881b906704b182c4c12e82b69ca000ea3570636c..0dcc65f6fac960d6710f8a4b0dbfa15f5921654d 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/expr2.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/expr2.C @@ -4,9 +4,10 @@ template <int I> struct S {}; template <int J> -void foo(S<J + 2>); // { dg-message "candidate" } +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 } } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ptrmem10.C b/gcc/testsuite/g++.old-deja/g++.pt/ptrmem10.C index 015566f96a4a5ad83c0b59add2967dc73798741d..6d61079b4c231d6837e64a50dea642a4df58d9c7 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/ptrmem10.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/ptrmem10.C @@ -15,13 +15,14 @@ struct A void baz (); }; -template <typename T> void foo (int (*)(T)); // { dg-message "candidate" } +template <typename T> void foo (int (*)(T)); // { dg-message "note" } template <typename T> void foo (int (A::*)(T)); // { dg-message "note" } candidate void A::baz () { foo (&A::f); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 24 } foo (A::f); foo (&(A::f)); foo (f); diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C b/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C index 51c5536c7d104f47f767e766d77208a89204e61c..85d3e7378cadd06155cf9183251159586f371c99 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C @@ -13,22 +13,30 @@ public: }; template <void (A::*)() > -void g() {} // { dg-message "candidate" } +void g() {} // { dg-message "note" } template <int A::*> -void h() {} // { dg-message "candidate" } +void h() {} // { dg-message "note" } int main() { g<&A::f>(); h<&A::i>(); g<&B::f>(); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 24 } h<&B::j>(); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 26 } g<(void (A::*)()) &A::f>(); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 28 } h<(int A::*) &A::i>(); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 30 } g<(void (A::*)()) &B::f>(); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 32 } h<(int A::*) &B::j>(); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 34 } g<(void (A::*)()) 0>(); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 36 } h<(int A::*) 0>(); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 38 } return 0; } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/spec35.C b/gcc/testsuite/g++.old-deja/g++.pt/spec35.C index a7e5ea252a95a66dd9bd7f8ba655c2bd4b138efb..fc5d5262b552d6e08fb5ecd4c7509e8db940d5c2 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/spec35.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/spec35.C @@ -8,24 +8,28 @@ extern "C" int puts (char const *); -template <typename T> int Foo (T); // { dg-message "candidate" } +template <typename T> int Foo (T); // { dg-message "note" } template <typename T> int Foo (T &); // { dg-message "note" } candidate -template <typename T> int Qux (T); // { dg-message "candidate" } +template <typename T> int Qux (T); // { dg-message "note" } template <typename T> int Qux (T const &); // { dg-message "note" } candidate -template <typename T> int Bar (T const *const &); // { dg-message "candidate" } +template <typename T> int Bar (T const *const &); // { dg-message "note" } template <typename T> int Bar (T *const &); // { dg-message "note" } candidate template <typename T> int Bar (T *); // { dg-message "note" } candidate -template <typename T> int Baz (T *const &); // { dg-message "candidate" } +template <typename T> int Baz (T *const &); // { dg-message "note" } template <typename T> int Baz (T *); // { dg-message "note" } candidate int Baz (int const *ptr, int *ptr2) { Baz (ptr2); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 26 } Bar (ptr2); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 28 } Foo (ptr2); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 30 } Qux (ptr2); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 32 } return 0; } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/spec5.C b/gcc/testsuite/g++.old-deja/g++.pt/spec5.C index 9aee75fdb21a9f3710988b162d78d1460c14f482..df7112ad0d0ecf8ac937f2f28c94214a89bae635 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/spec5.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/spec5.C @@ -1,20 +1,22 @@ // { dg-do assemble } template <class T> -void f(T t1, T t2); // { dg-message "candidate" } +void f(T t1, T t2); // { dg-message "note" } template <> void f(int i, int j); template <class T> -void g(T t1, T t2) {} // { dg-message "candidate" } +void g(T t1, T t2) {} // { dg-message "note" } template void g(int i, int j); void h() { f(3, 'c'); // { dg-error "" } no matching function + // { dg-message "candidate" "candidate note" { target *-*-* } 16 } g(3, 'c'); // { dg-error "" } no matching function + // { dg-message "candidate" "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 765dd8e7583bc6910b5215c3ca6f70633036f355..fc19c3cf53595242ea04e52958fe789c2b3f6ec6 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/spec6.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/spec6.C @@ -3,7 +3,7 @@ struct S1 { template <class T> - void f(T t1, T t2); // { dg-message "candidate" } + void f(T t1, T t2); // { dg-message "note" } }; @@ -14,7 +14,7 @@ template <class U> struct S2 { template <class T> - void f(T t1, T t2); // { dg-message "candidate" } + void f(T t1, T t2); // { dg-message "note" } }; template <> @@ -25,7 +25,9 @@ void h() { S1 s1; s1.f(3, 'c'); // { dg-error "" } no matching function + // { dg-message "candidate" "candidate note" { target *-*-* } 27 } S2<char> s2; s2.f(3, 'c'); // { dg-error "" } no matching function + // { dg-message "candidate" "candidate note" { target *-*-* } 31 } } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/t05.C b/gcc/testsuite/g++.old-deja/g++.pt/t05.C index 38488d2c0ac9d733d81c8fbd50862c005158cf12..bf4f1ea8d25ad9d1290d413086c1051d99235b44 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/t05.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/t05.C @@ -3,7 +3,8 @@ template <class A> class B { // { dg-message "note" } A a; public: - B(A&aa); // { dg-message "candidates" } + B(A&aa); // { dg-message "note" } ~B(); }; static B<int> b_int (3); // { dg-error "no matching function" } +// { dg-message "candidate" "candidate note" { target *-*-* } 9 } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/t24.C b/gcc/testsuite/g++.old-deja/g++.pt/t24.C index fe6281b9ca2b4cc3f295041889087ef8522c417c..77d1c990950eb8f6325ed40a71faa654b103ab3c 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/t24.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/t24.C @@ -1,8 +1,9 @@ // { dg-do assemble } // { dg-options "" } -template <class X> int f (X x, X y) { return 23; } // { dg-message "candidate" } +template <class X> int f (X x, X y) { return 23; } // { dg-message "note" } int foo () { return f (7); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 7 } } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/unify4.C b/gcc/testsuite/g++.old-deja/g++.pt/unify4.C index 51bfaf48775628c498bd00dc159befce7ee3447b..6dd9961088d17c25515f005d4f8bc9a1c031630a 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/unify4.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/unify4.C @@ -1,5 +1,5 @@ // { dg-do assemble } -template <class T> void f (T); // { dg-message "candidate" } +template <class T> void f (T); // { dg-message "note" } void g (); void g (int); @@ -8,5 +8,6 @@ int main () { f (g); // { dg-error "" } ambiguous unification + // { dg-message "candidate" "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 18a0553133dc0f671b9acfad59e7682970bcbc90..0e5c0349544d426159c683c8d1903a826c543231 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/unify6.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/unify6.C @@ -19,12 +19,14 @@ 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 "candidate" } +template<class T> void foo(T const *){} // { dg-message "note" } void f() { foo<int &>(); // { dg-error "" } attempt to build int & const * + // { dg-message "candidate" "candidate note" { target *-*-* } 26 } foo<void ()>(); // { dg-error "" } attempt to build void (const *)() + // { dg-message "candidate" "candidate note" { target *-*-* } 28 } } typedef void (*Fptr)(); diff --git a/gcc/testsuite/g++.old-deja/g++.pt/unify8.C b/gcc/testsuite/g++.old-deja/g++.pt/unify8.C index a0cb738956d5a66e7f17aced002efb24ca08eb29..320926092f087e0c28c0f2a9059952ca58264ab7 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/unify8.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/unify8.C @@ -8,7 +8,7 @@ // overload resolution. -template <typename T> void Foo (T const **); // { dg-message "candidate" } +template <typename T> void Foo (T const **); // { dg-message "note" } template <typename T> void Bar (T const * const *); void Foo (int); // { dg-message "note" } void Foo (float); // { dg-message "note" } candidate @@ -16,5 +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 } Bar (p1); // OK } diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C index dae13b67bd574745b735642c9d33b4402f04c21b..f3490762621565d278c47b461bec3241ebf944fb 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C @@ -66,6 +66,7 @@ int main() { // no edge weighting, therefore type Empty: Graph<std::string, Empty> V(true); // { dg-error "no match" } no bool constructor + // { dg-message "candidate" "candidate note" { target *-*-* } 68 } // ReadGraph(V, "gra1.dat"); // display of vertices with successors diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb119.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb119.C index bb8892c7f610eb830e95b1a11dcd557dbaa15f5f..329393aeadf8b6cf732e01e5bebe7bb870f445a7 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb119.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb119.C @@ -1,11 +1,12 @@ // { dg-do assemble } template<bool B> -void f() // { dg-message "candidate" } +void f() // { dg-message "note" } { } int main() { f<bool>(); // { dg-error "" } .* + // { dg-message "candidate" "candidate note" { target *-*-* } 9 } } diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb131.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb131.C index 75341d4148a35f1c2e4747b4aedcc6e0616d8cb6..67445308c1a7626c30c1d8b054d91d76df652993 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb131.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb131.C @@ -10,11 +10,13 @@ struct a { void bar( double ); void bar( float ); - void foo( void (a::*member)(float) ); // { dg-message "candidate" } + void foo( void (a::*member)(float) ); // { dg-message "void a::foo|no known conversion" } }; a::a() { foo( &junk ); // { dg-error "match" } junk is an unqualified-id. + // { dg-message "candidate" "candidate note" { target *-*-* } 18 } foo( &bar ); // { dg-error "match" } bar is an unqualified-id. + // { dg-message "candidate" "candidate note" { target *-*-* } 20 } } diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb22.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb22.C index 28953b05b4ec7fae6df08ec14d4685fd7ef3b2a1..a78ea41085a241911e5ae357fe78b7c99ba50655 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb22.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb22.C @@ -11,12 +11,12 @@ public: operator int() const {return 2;} }; -bool operator==(const MyInt& a, const int& b) // { dg-message "note" } candidate +bool operator==(const MyInt& a, const int& b) // { dg-message "operator==" } candidate { return (int)a == b; } -bool operator==(const MyInt& a, const MyInt& b) // { dg-message "note" } candidate +bool operator==(const MyInt& a, const MyInt& b) // { dg-message "operator==" } candidate { return (int)a == (int)b; } @@ -24,5 +24,6 @@ bool operator==(const MyInt& a, const MyInt& b) // { dg-message "note" } candida bool f() { return 3 == MyInt(); // { dg-error "ambiguous" "err" } + // { dg-message "operator==" "match candidate text" { target *-*-* } 26 } // { dg-message "candidates" "note" { target *-*-* } 26 } } diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb69.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb69.C index 74051a148ade66325a56706a622526d9e0ba4242..1ada91234294fbf615f205c219b98e16e9362665 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb69.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb69.C @@ -6,12 +6,13 @@ int r = 0; struct foo { // { dg-message "note" } candidate - foo(int x) { r = 1; } // { dg-message "candidate" } + foo(int x) { r = 1; } // { dg-message "note" } }; struct bar : foo { typedef int an_int; bar() : bar::an_int(3) {} // { dg-error "match" "match" } not a base + // { dg-message "candidate" "candidate note" { target *-*-* } 14 } // { dg-message "expected" "exp" { target *-*-* } 14 } }; diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb98.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb98.C index 5fb4861a3a4851009b59c9727f0e30fa814a8609..c5620316e9ca860c907c0653903a03582bda1e5f 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb98.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb98.C @@ -5,7 +5,7 @@ template<class T, unsigned int Length> inline unsigned int - extent(T (&x)[Length]) // { dg-message "candidate" } + extent(T (&x)[Length]) // { dg-message "note" } { return Length; } @@ -15,4 +15,5 @@ void f() { extent(b); // { dg-error "" } no matching function + // { dg-message "candidate" "candidate note" { target *-*-* } 17 } }