repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
sched1: debug/model: dump predecessor list and BB num [NFC]
[gcc.git]
/
libgomp
/
testsuite
/
libgomp.c++
/
pr49043.C
blob
604cfc30dadd8452eb6ce061414b4787cef3f72a
1
// PR c++/49043
2
// { dg-options "-std=c++0x" }
3
// { dg-do run }
4
5
extern "C" void abort ();
6
7
int
8
main ()
9
{
10
int r = 0;
11
#pragma omp parallel for reduction (+:r)
12
for (int a = 0; a < 10; ++a)
13
{
14
auto func = [=] () { return a; };
15
r += func ();
16
}
17
if (r != 45)
18
abort ();
19
}