re PR middle-end/70100 (ICE: in execute, at cfgexpand.c:6066)
authorJakub Jelinek <jakub@redhat.com>
Tue, 10 Oct 2017 20:09:01 +0000 (22:09 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 10 Oct 2017 20:09:01 +0000 (22:09 +0200)
PR middle-end/70100
* g++.dg/opt/pr70100.C: New test.

From-SVN: r253611

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/opt/pr70100.C [new file with mode: 0644]

index db8482ce80785f0d411e279b78e5b69e385e75c7..3d7a5348493c10c48a2c6c0692e06441a6591725 100644 (file)
@@ -1,5 +1,8 @@
 2017-10-10  Jakub Jelinek  <jakub@redhat.com>
 
+       PR middle-end/70100
+       * g++.dg/opt/pr70100.C: New test.
+
        PR c++/68252
        * g++.dg/other/pr68252.C: New test.
 
diff --git a/gcc/testsuite/g++.dg/opt/pr70100.C b/gcc/testsuite/g++.dg/opt/pr70100.C
new file mode 100644 (file)
index 0000000..3f612cb
--- /dev/null
@@ -0,0 +1,21 @@
+// PR middle-end/70100
+// { dg-do compile { target c++11 } }
+// { dg-options "-O0" }
+
+void
+bar (int)
+{
+}
+
+template <typename ... Args>
+void
+foo (Args && ... args)
+{
+  [&] { [&] { bar(args...); }; };
+}
+
+int
+main ()
+{
+  foo (2);
+}