summaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.c++
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2006-03-21 16:21:24 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2006-03-21 16:21:24 +0000
commit2f2c591f241c00a0d962363cdd5671fe99e21ec6 (patch)
treed017f51f43b8ed4de93b45a1a613096f63eb1d5e /libgomp/testsuite/libgomp.c++
parent30e9871167ca729023eb527698fb483394252e00 (diff)
downloadgcc-2f2c591f241c00a0d962363cdd5671fe99e21ec6.tar.gz
PR c++/26691
* cp-gimplify.c (cxx_omp_clause_apply_fn): Handle default arguments. * testsuite/libgomp.c++/pr26691.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112251 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp/testsuite/libgomp.c++')
-rw-r--r--libgomp/testsuite/libgomp.c++/pr26691.C20
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 00000000000..776b31e24fb
--- /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;
+ }
+