aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/pt.cc')
-rw-r--r--gcc/cp/pt.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc
index 8498730..ce30b52 100644
--- a/gcc/cp/pt.cc
+++ b/gcc/cp/pt.cc
@@ -22562,6 +22562,11 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl)
in response to the saved STMT_IS_FULL_EXPR_P setting. */
gcc_unreachable ();
+ case TARGET_EXPR:
+ /* TARGET_EXPR represents temporary objects and should not appear in
+ templated trees. */
+ gcc_unreachable ();
+
case OFFSET_REF:
{
/* We should only get here for an OFFSET_REF like A::m; a .* in a
@@ -24816,8 +24821,6 @@ resolve_nondeduced_context (tree orig_expr, tsubst_flags_t complain)
}
if (good == 1)
{
- if (!mark_used (goodfn, complain) && !(complain & tf_error))
- return error_mark_node;
expr = goodfn;
if (baselink)
expr = build_baselink (BASELINK_BINFO (baselink),