From debc8f4a0c23f9cacd6391319432357fbc9049eb Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Thu, 16 Nov 2017 10:36:51 +0000 Subject: [PATCH] re PR c++/70383 (Bogus error when attempting to capture a reference to function by copy) 2017-11-16 Paolo Carlini PR c++/70383 * g++.dg/cpp0x/lambda/lambda-70383.C: New. From-SVN: r254808 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/lambda/lambda-70383.C | 8 ++++++++ 2 files changed, 13 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/lambda/lambda-70383.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 29ddf92dc86..455b2411a1c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-11-16 Paolo Carlini + + PR c++/70383 + * g++.dg/cpp0x/lambda/lambda-70383.C: New. + 2017-11-16 Julia Koval * gcc.target/i386/avx512f-gf2p8mulb-2.c: New runtime tests. diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-70383.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-70383.C new file mode 100644 index 00000000000..075ff66a4bf --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-70383.C @@ -0,0 +1,8 @@ +// PR c++/70383 +// { dg-do compile { target c++11 } } + +void meow() { + void purr(); + void (&f)() = purr; + [f]{}; +} -- 2.30.2