diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2017-10-02 21:44:55 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2017-10-02 21:44:55 +0000 |
commit | 603841eb29cac36e672890f63c0ee8a80d4829c2 (patch) | |
tree | 5a38e7f9bbb2566600a18c0b518d2442de1fbebf /gcc | |
parent | de87f2d04aef67c6a323213885e0f7a3e1750244 (diff) | |
download | gcc-603841eb29cac36e672890f63c0ee8a80d4829c2.zip gcc-603841eb29cac36e672890f63c0ee8a80d4829c2.tar.gz gcc-603841eb29cac36e672890f63c0ee8a80d4829c2.tar.bz2 |
re PR c++/79005 (Use of a captured variable within nested generic lambdas provokes internal compiler error.)
2017-10-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/79005
* g++.dg/cpp1y/lambda-generic-79005.C: New.
From-SVN: r253368
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp1y/lambda-generic-79005.C | 21 |
2 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8c51394..e678265 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-10-02 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/79005 + * g++.dg/cpp1y/lambda-generic-79005.C: New. + 2017-10-02 Paul Thomas <pault@gcc.gnu.org> PR fortran/82312 diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-79005.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-79005.C new file mode 100644 index 0000000..79b89ca --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-79005.C @@ -0,0 +1,21 @@ +// PR c++/79005 +// { dg-do compile { target c++14 } } + +int main() +{ + auto glambda = [] (auto a) + { + const int c = a; + auto cglambda = [&] ( auto b ) + { + double result; + result = b * a; + result = b * c; + return result; + }; + cglambda ( 1 ); + a = c; + }; + + glambda( 1 ); +} |