aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-03-21 17:21:24 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2006-03-21 17:21:24 +0100
commitfae2b46b091f4feb984ac9c51dd543f257d9dc94 (patch)
treed017f51f43b8ed4de93b45a1a613096f63eb1d5e /libgomp
parentaa09f986bc1d3934932225d64ebca03a7eed65b3 (diff)
downloadgcc-fae2b46b091f4feb984ac9c51dd543f257d9dc94.zip
gcc-fae2b46b091f4feb984ac9c51dd543f257d9dc94.tar.gz
gcc-fae2b46b091f4feb984ac9c51dd543f257d9dc94.tar.bz2
re PR c++/26691 (Wrong code for constructor with default value)
PR c++/26691 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle default arguments. * testsuite/libgomp.c++/pr26691.C: New test. From-SVN: r112251
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog5
-rw-r--r--libgomp/testsuite/libgomp.c++/pr26691.C20
2 files changed, 25 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index f93bfa5..33d1e78 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,8 @@
+2006-03-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/26691
+ * testsuite/libgomp.c++/pr26691.C: New test.
+
2006-03-13 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.fortran/retval2.f90: New test.
diff --git a/libgomp/testsuite/libgomp.c++/pr26691.C b/libgomp/testsuite/libgomp.c++/pr26691.C
new file mode 100644
index 0000000..776b31e
--- /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;
+ }
+