summaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.c++/task-7.C
diff options
context:
space:
mode:
Diffstat (limited to 'libgomp/testsuite/libgomp.c++/task-7.C')
-rw-r--r--libgomp/testsuite/libgomp.c++/task-7.C18
1 files changed, 18 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.c++/task-7.C b/libgomp/testsuite/libgomp.c++/task-7.C
new file mode 100644
index 000000000..e9828cd2c
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c++/task-7.C
@@ -0,0 +1,18 @@
+// PR c++/36523
+// { dg-do run }
+
+template<typename T>
+struct A
+{
+ A() { }
+ A(const A&) { }
+ void foo() { }
+};
+
+int main()
+{
+ A<int> a;
+ #pragma omp task firstprivate (a)
+ a.foo();
+ return 0;
+}