break;
}
- if (VAR_P (t) && DECL_ANON_UNION_VAR_P (t))
- {
- /* Just use name lookup to find a member alias for an anonymous
- union, but then add it to the hash table. */
- r = lookup_name (DECL_NAME (t));
- gcc_assert (DECL_ANON_UNION_VAR_P (r));
- register_local_specialization (r, t);
- break;
- }
-
/* Create a new node for the specialization we need. */
r = copy_decl (t);
if (type == NULL_TREE)
SET_DECL_IMPLICIT_INSTANTIATION (r);
}
else if (cp_unevaluated_operand)
- {
- /* We're substituting this var in a decltype outside of its
- scope, such as for a lambda return type. Don't add it to
- local_specializations, do perform auto deduction. */
- tree auto_node = type_uses_auto (type);
- if (auto_node)
- {
- tree init
- = tsubst_expr (DECL_INITIAL (t), args, complain, in_decl,
- /*constant_expression_p=*/false);
- init = resolve_nondeduced_context (init);
- TREE_TYPE (r) = type
- = do_auto_deduction (type, init, auto_node);
- }
- }
+ gcc_unreachable ();
else
register_local_specialization (r, t);
case VAR_DECL:
case FUNCTION_DECL:
- if ((DECL_LANG_SPECIFIC (t) && DECL_TEMPLATE_INFO (t))
- || local_variable_p (t))
- t = tsubst (t, args, complain, in_decl);
- mark_used (t);
- return t;
+ if (DECL_LANG_SPECIFIC (t) && DECL_TEMPLATE_INFO (t))
+ r = tsubst (t, args, complain, in_decl);
+ else if (local_variable_p (t))
+ {
+ r = retrieve_local_specialization (t);
+ if (r == NULL_TREE)
+ {
+ if (DECL_ANON_UNION_VAR_P (t))
+ {
+ /* Just use name lookup to find a member alias for an
+ anonymous union, but then add it to the hash table. */
+ r = lookup_name (DECL_NAME (t));
+ gcc_assert (DECL_ANON_UNION_VAR_P (r));
+ register_local_specialization (r, t);
+ }
+ else
+ {
+ gcc_assert (errorcount || sorrycount);
+ return error_mark_node;
+ }
+ }
+ }
+ else
+ r = t;
+ mark_used (r);
+ return r;
case NAMESPACE_DECL:
return t;
stmt = begin_omp_structured_block ();
+ pre_body = push_stmt_list ();
+ RECUR (OMP_FOR_PRE_BODY (t));
+ pre_body = pop_stmt_list (pre_body);
+
for (i = 0; i < TREE_VEC_LENGTH (OMP_FOR_INIT (t)); i++)
tsubst_omp_for_iterator (t, i, declv, initv, condv, incrv,
&clauses, args, complain, in_decl,
integral_constant_expression_p);
- pre_body = push_stmt_list ();
- RECUR (OMP_FOR_PRE_BODY (t));
- pre_body = pop_stmt_list (pre_body);
-
body = push_stmt_list ();
RECUR (OMP_FOR_BODY (t));
body = pop_stmt_list (body);