2019-01-17 Alexandre Oliva <aoliva@redhat.com>
+ PR c++/87768
+ * cp-tree.h (saved_scope): Add suppress_location_wrappers.
+ * name-lookup.c (do_push_to_top_level): Save and reset it.
+ (do_pop_from_top_level): Restore it.
+
PR c++/86648
* pt.c (make_template_placeholder): Use auto_identifier.
(is_auto): Drop CLASS_PLACEHOLDER_TEMPLATE test.
int x_processing_template_decl;
int x_processing_specialization;
+ int suppress_location_wrappers;
BOOL_BITFIELD x_processing_explicit_instantiation : 1;
BOOL_BITFIELD need_pop_function_context : 1;
s->function_decl = current_function_decl;
s->unevaluated_operand = cp_unevaluated_operand;
s->inhibit_evaluation_warnings = c_inhibit_evaluation_warnings;
+ s->suppress_location_wrappers = suppress_location_wrappers;
s->x_stmt_tree.stmts_are_full_exprs_p = true;
scope_chain = s;
push_class_stack ();
cp_unevaluated_operand = 0;
c_inhibit_evaluation_warnings = 0;
+ suppress_location_wrappers = 0;
}
static void
current_function_decl = s->function_decl;
cp_unevaluated_operand = s->unevaluated_operand;
c_inhibit_evaluation_warnings = s->inhibit_evaluation_warnings;
+ suppress_location_wrappers = s->suppress_location_wrappers;
/* Make this saved_scope structure available for reuse by
push_to_top_level. */
2019-01-17 Alexandre Oliva <aoliva@redhat.com>
+ PR c++/87768
+ * g++.dg/concepts/pr87768.C: New.
+
PR c++/86648
* gcc.dg/cpp1z/pr86648.C: New.
--- /dev/null
+// { dg-do compile { target c++17 } }
+// { dg-options "-fconcepts" }
+
+struct a {};
+template <bool> using b = a;
+
+template <typename> struct c;
+template <typename d>
+ requires requires(d e) { e[0]; }
+struct c<d> {
+ static constexpr bool f = [] { return false; }();
+};
+
+struct g : b<c<unsigned[]>::f> {};