aboutsummaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.c++/target-flex-70.C
diff options
context:
space:
mode:
Diffstat (limited to 'libgomp/testsuite/libgomp.c++/target-flex-70.C')
-rw-r--r--libgomp/testsuite/libgomp.c++/target-flex-70.C26
1 files changed, 26 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.c++/target-flex-70.C b/libgomp/testsuite/libgomp.c++/target-flex-70.C
new file mode 100644
index 0000000..9e9383d
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c++/target-flex-70.C
@@ -0,0 +1,26 @@
+/* CTAD in target regions. */
+
+template<typename T>
+struct S
+{
+ T _v;
+};
+
+template<typename T>
+S(T) -> S<T>;
+
+bool f()
+{
+ bool ok;
+ #pragma omp target map(from: ok)
+ {
+ S s{42};
+ ok = s._v == 42;
+ }
+ return ok;
+}
+
+int main()
+{
+ return f() ? 0 : 1;
+}