* pt.c (tsubst_copy_and_build): Use a dedicated variable for the last
element in the vector.
* g++.dg/cpp1y/lambda-generic-90265.C: New test.
From-SVN: r270919
+2019-05-06 Marek Polacek <polacek@redhat.com>
+
+ PR c++/90265 - ICE with generic lambda.
+ * pt.c (tsubst_copy_and_build): Use a dedicated variable for the last
+ element in the vector.
+
2019-05-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/90173
if (thisarg)
{
/* Shift the other args over to make room. */
- vec_safe_push (call_args, (*call_args)[nargs-1]);
+ tree last = (*call_args)[nargs - 1];
+ vec_safe_push (call_args, last);
for (int i = nargs-1; i > 0; --i)
(*call_args)[i] = (*call_args)[i-1];
(*call_args)[0] = thisarg;
+2019-05-06 Marek Polacek <polacek@redhat.com>
+
+ PR c++/90265 - ICE with generic lambda.
+ * g++.dg/cpp1y/lambda-generic-90265.C: New test.
+
2019-05-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/90173
--- /dev/null
+// PR c++/90265
+// { dg-do compile { target c++14 } }
+
+void (*a)(int, int, int, void *) = [](auto, auto, auto, auto) {};