diff options
author | jakub <> | 2011-05-19 13:11:56 +0000 |
---|---|---|
committer | jakub <> | 2011-05-19 13:11:56 +0000 |
commit | 5f1eddefbb7154837a61deb78c3e13100fd9719a (patch) | |
tree | 8a93ed0f8e4aefee902ff63a0c36dfb80398207e /libgomp | |
parent | 01b0ac313e4a7fe95826f58d1a3663b52c852536 (diff) |
PR c++/49043
* decl.c (check_omp_return): Stop searching on sk_function_parms.
* testsuite/libgomp.c++/pr49043.C: New test.
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 97382893917..7d3fe227c5e 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 00000000000..604cfc30dad --- /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 (); +} |