PR c++/84125
* typeck.c (build_address): Relax the assert when
processing_template_decl.
* g++.dg/cpp1y/lambda-generic-84125.C:New test.
From-SVN: r257311
+2018-02-01 Marek Polacek <polacek@redhat.com>
+
+ PR c++/84125
+ * typeck.c (build_address): Relax the assert when
+ processing_template_decl.
+
2018-02-01 Jason Merrill <jason@redhat.com>
PR c++/84126 - ICE with variadic generic lambda
{
if (error_operand_p (t) || !cxx_mark_addressable (t))
return error_mark_node;
- gcc_checking_assert (TREE_CODE (t) != CONSTRUCTOR);
+ gcc_checking_assert (TREE_CODE (t) != CONSTRUCTOR
+ || processing_template_decl);
t = build_fold_addr_expr_loc (EXPR_LOCATION (t), t);
if (TREE_CODE (t) != ADDR_EXPR)
t = rvalue (t);
+2018-02-01 Marek Polacek <polacek@redhat.com>
+
+ PR c++/84125
+ * g++.dg/cpp1y/lambda-generic-84125.C:New test.
+
2018-01-30 Jeff Law <law@redhat.com>
PR target/84128
--- /dev/null
+// PR c++/84125
+// { dg-do compile { target c++14 } }
+
+struct X { constexpr operator bool() const { return true; } };
+
+int main(){
+ [](auto) {
+ static_assert(X{}, "");
+ };
+}