diff options
Diffstat (limited to 'libgomp/testsuite/libgomp.c++/pr26691.C')
-rw-r--r-- | libgomp/testsuite/libgomp.c++/pr26691.C | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.c++/pr26691.C b/libgomp/testsuite/libgomp.c++/pr26691.C new file mode 100644 index 000000000..776b31e24 --- /dev/null +++ b/libgomp/testsuite/libgomp.c++/pr26691.C @@ -0,0 +1,20 @@ +// PR c++/26691 + +struct A +{ + int n; + A (int i = 3) : n (i) {} +}; + +int +main () +{ + A a; + int err = 0; +#pragma omp parallel private (a) reduction (+:err) + if (a.n != 3) + err++; + + return err; + } + |