diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2015-03-18 10:31:24 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2015-03-18 10:31:24 +0000 |
commit | 41cee85a347099bbd151f46cc55f8974970624ba (patch) | |
tree | 819d3cb9a40bb8851300051de452f6e65fefc204 /gcc/cp | |
parent | 4d1de54341f3d58260b7b11fabb95a0c5cd0e0b7 (diff) | |
download | gcc-41cee85a347099bbd151f46cc55f8974970624ba.zip gcc-41cee85a347099bbd151f46cc55f8974970624ba.tar.gz gcc-41cee85a347099bbd151f46cc55f8974970624ba.tar.bz2 |
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
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/cp/call.c | 2 | ||||
-rw-r--r-- | gcc/cp/decl2.c | 7 |
3 files changed, 15 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 01484bf..c8135ff 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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> PR c++/65061 diff --git a/gcc/cp/call.c b/gcc/cp/call.c index fdd8436..31d2b9c 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -7486,7 +7486,7 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain) } if (!already_used - && !mark_used (fn)) + && !mark_used (fn, complain)) return error_mark_node; if (DECL_VINDEX (fn) && (flags & LOOKUP_NONVIRTUAL) == 0 diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index a4a5ebf..a2d1eae 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -5037,7 +5037,12 @@ mark_used (tree decl, tsubst_flags_t complain) && uses_template_parms (DECL_TI_ARGS (decl))) 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 (cp_unevaluated_operand != 0) |