mirror of git://gcc.gnu.org/git/gcc.git
re PR c++/65340 ([C++14]ICE in mark_used, at decl2.c:5040)
2015-03-18 Paolo Carlini <paolo.carlini@oracle.com> PR c++/65340 * call.c (build_over_call): Pass the tsubst_flags_t argument to mark_used. * decl2.c (mark_used): Inline the require_deduced_type call and guard the error call. 2015-03-18 Paolo Carlini <paolo.carlini@oracle.com> PR c++/65340 * g++.dg/cpp1y/pr65340.C: New. From-SVN: r221483
This commit is contained in:
parent
4d1de54341
commit
41cee85a34
|
|
@ -1,3 +1,11 @@
|
||||||
|
2015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
|
PR c++/65340
|
||||||
|
* call.c (build_over_call): Pass the tsubst_flags_t argument to
|
||||||
|
mark_used.
|
||||||
|
* decl2.c (mark_used): Inline the require_deduced_type call and
|
||||||
|
guard the error call.
|
||||||
|
|
||||||
2015-03-16 Jason Merrill <jason@redhat.com>
|
2015-03-16 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
PR c++/65061
|
PR c++/65061
|
||||||
|
|
|
||||||
|
|
@ -7486,7 +7486,7 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!already_used
|
if (!already_used
|
||||||
&& !mark_used (fn))
|
&& !mark_used (fn, complain))
|
||||||
return error_mark_node;
|
return error_mark_node;
|
||||||
|
|
||||||
if (DECL_VINDEX (fn) && (flags & LOOKUP_NONVIRTUAL) == 0
|
if (DECL_VINDEX (fn) && (flags & LOOKUP_NONVIRTUAL) == 0
|
||||||
|
|
|
||||||
|
|
@ -5037,7 +5037,12 @@ mark_used (tree decl, tsubst_flags_t complain)
|
||||||
&& uses_template_parms (DECL_TI_ARGS (decl)))
|
&& uses_template_parms (DECL_TI_ARGS (decl)))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
require_deduced_type (decl);
|
if (undeduced_auto_decl (decl))
|
||||||
|
{
|
||||||
|
if (complain & tf_error)
|
||||||
|
error ("use of %qD before deduction of %<auto%>", decl);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/* If we don't need a value, then we don't need to synthesize DECL. */
|
/* If we don't need a value, then we don't need to synthesize DECL. */
|
||||||
if (cp_unevaluated_operand != 0)
|
if (cp_unevaluated_operand != 0)
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
2015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
|
PR c++/65340
|
||||||
|
* g++.dg/cpp1y/pr65340.C: New.
|
||||||
|
|
||||||
2015-03-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
2015-03-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||||
|
|
||||||
PR fortran/64432
|
PR fortran/64432
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
// PR c++/65340
|
||||||
|
// { dg-do compile { target c++14 } }
|
||||||
|
|
||||||
|
template <typename Type> Type constant;
|
||||||
|
namespace reflect {
|
||||||
|
namespace functors {
|
||||||
|
struct recurse { auto operator()(, ); }; // { dg-error "expected" }
|
||||||
|
}
|
||||||
|
auto &recurse = constant < functors :: recurse > ;
|
||||||
|
}
|
||||||
|
namespace functors {
|
||||||
|
struct traverse {
|
||||||
|
template <typename Algo, typename Value>
|
||||||
|
auto operator()(Algo, Value) -> decltype(reflect
|
||||||
|
:: recurse(0, 0)); // { dg-error "use of" }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
auto &traverse = constant < functors :: traverse > ;
|
||||||
|
operator()()->decltype(traverse(0, 0)) // { dg-error "no match|expected" }
|
||||||
Loading…
Reference in New Issue