diff options
author | Jakub Jelinek <jakub@redhat.com> | 2011-05-19 15:11:56 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2011-05-19 15:11:56 +0200 |
commit | ea93a47bc825a409079665551203aa194e71fc18 (patch) | |
tree | 8a93ed0f8e4aefee902ff63a0c36dfb80398207e /libgomp | |
parent | 5ee093edf0ff049ece01649376c1b2975e0371f2 (diff) | |
download | gcc-ea93a47bc825a409079665551203aa194e71fc18.zip gcc-ea93a47bc825a409079665551203aa194e71fc18.tar.gz gcc-ea93a47bc825a409079665551203aa194e71fc18.tar.bz2 |
re PR c++/49043 ([OpenMP & C++0x]: Compiler error when lambda-function within OpenMP loop)
PR c++/49043
* decl.c (check_omp_return): Stop searching on sk_function_parms.
* testsuite/libgomp.c++/pr49043.C: New test.
From-SVN: r173907
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/ChangeLog | 3 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c++/pr49043.C | 19 |
2 files changed, 22 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 9738289..7d3fe22 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,5 +1,8 @@ 2011-05-19 Jakub Jelinek <jakub@redhat.com> + PR c++/49043 + * testsuite/libgomp.c++/pr49043.C: New test. + PR c++/48869 * testsuite/libgomp.c++/pr48869.C: New test. diff --git a/libgomp/testsuite/libgomp.c++/pr49043.C b/libgomp/testsuite/libgomp.c++/pr49043.C new file mode 100644 index 0000000..604cfc3 --- /dev/null +++ b/libgomp/testsuite/libgomp.c++/pr49043.C @@ -0,0 +1,19 @@ +// PR c++/49043 +// { dg-options "-std=c++0x" } +// { dg-do run } + +extern "C" void abort (); + +int +main () +{ + int r = 0; + #pragma omp parallel for reduction (+:r) + for (int a = 0; a < 10; ++a) + { + auto func = [=] () { return a; }; + r += func (); + } + if (r != 45) + abort (); +} |