diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-19 13:11:56 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-19 13:11:56 +0000 |
commit | 14a77a22b0764384fd2fc2af8b169d909207675f (patch) | |
tree | 8a93ed0f8e4aefee902ff63a0c36dfb80398207e /libgomp | |
parent | 820edc7c70cee92a891d8842dbb0a32779105cd6 (diff) | |
download | gcc-14a77a22b0764384fd2fc2af8b169d909207675f.tar.gz |
PR c++/49043
* decl.c (check_omp_return): Stop searching on sk_function_parms.
* testsuite/libgomp.c++/pr49043.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173907 138bc75d-0d04-0410-961f-82ee72b054a4
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 (); +} |