* genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
to OP parmeter of generated function.
-2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
+2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
PR tree-optimization/87009
* match.pd: Add boolean optimizations.
+2018-08-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/87122
+ * pt.c (tsubst_expr) <case RANGE_FOR_STMT>: If
+ processing_template_decl and decl is structured binding decl, call
+ cp_finish_decomp.
+
2018-08-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/86546
RANGE_FOR_IVDEP (stmt) = RANGE_FOR_IVDEP (t);
RANGE_FOR_UNROLL (stmt) = RANGE_FOR_UNROLL (t);
finish_range_for_decl (stmt, decl, expr);
+ if (decomp_first && decl != error_mark_node)
+ cp_finish_decomp (decl, decomp_first, decomp_cnt);
}
else
{
+2018-08-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/87122
+ * g++.dg/cpp1z/decomp47.C: New test.
+
2018-08-29 Matthew Malcomson <matthew.malcomson@arm.com>
* gcc.target/aarch64/simd/vect_su_add_sub.c: Use 32 and 64-bit types
PR tree-optimization/87126
* gcc.dg/tree-ssa/pr87126.c: New testcase.
-2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
+2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
PR tree-optimization/87009
* gcc.dg/pr87009.c: New test.
--- /dev/null
+// PR c++/87122
+// { dg-do run { target c++14 } }
+// { dg-options "" }
+
+extern "C" void abort ();
+struct S { int a, b; };
+int c;
+
+template <int N>
+void
+foo ()
+{
+ S x[4] = { { N, 2 }, { 3, 4 }, { 5, 6 }, { 7, 8 } };
+ auto f = [](auto & y) {
+ for (auto & [ u, v ] : y) // { dg-warning "structured bindings only available with" "" { target c++14_down } }
+ {
+ if ((u & 1) != 1 || v != u + 1 || u < N || u > 7 || (c & (1 << u))
+ || &u != &y[v / 2 - 1].a || &v != &y[v / 2 - 1].b)
+ abort ();
+ c |= 1 << u;
+ }
+ };
+ f (x);
+}
+
+int
+main ()
+{
+ foo<1> ();
+ if (c != 0xaa)
+ abort ();
+}