aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2020-11-25 13:03:52 +0100
committerThomas Schwinge <thomas@codesourcery.com>2020-11-25 19:57:39 +0100
commit0cab70604cfda30bc64351b39493ef884ff7ba10 (patch)
treec80b71b219a7be10a77e93166f87271ad0a1e1d0 /libgomp
parent4919ed711c1d02845f2843f6b0a70c27f9e6d434 (diff)
downloadgcc-0cab70604cfda30bc64351b39493ef884ff7ba10.zip
gcc-0cab70604cfda30bc64351b39493ef884ff7ba10.tar.gz
gcc-0cab70604cfda30bc64351b39493ef884ff7ba10.tar.bz2
Fix templatized C++ OpenACC 'cache' directive ICEs
This has been broken forever, whoops... gcc/cp/ * pt.c (tsubst_omp_clauses): Handle 'OMP_CLAUSE__CACHE_'. (tsubst_expr): Handle 'OACC_CACHE'. gcc/testsuite/ * c-c++-common/goacc/cache-1.c: Update. * c-c++-common/goacc/cache-2.c: Likewise. * g++.dg/goacc/cache-1.C: New. * g++.dg/goacc/cache-2.C: Likewise. libgomp/ * testsuite/libgomp.oacc-c++/cache-1.C: New. * testsuite/libgomp.oacc-c-c++-common/cache-1.c: Update.
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/testsuite/libgomp.oacc-c++/cache-1.C13
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/cache-1.c12
2 files changed, 24 insertions, 1 deletions
diff --git a/libgomp/testsuite/libgomp.oacc-c++/cache-1.C b/libgomp/testsuite/libgomp.oacc-c++/cache-1.C
new file mode 100644
index 0000000..fcb1f84
--- /dev/null
+++ b/libgomp/testsuite/libgomp.oacc-c++/cache-1.C
@@ -0,0 +1,13 @@
+/* OpenACC 'cache' directive. */
+
+/* See also corresponding C/C++ variant '../libgomp.oacc-c-c++-common/cache-1.c'. */
+
+#include "../../../gcc/testsuite/g++.dg/goacc/cache-1.C"
+
+int
+main (int argc, char *argv[])
+{
+ test<0> ();
+
+ return 0;
+}
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/cache-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/cache-1.c
index 16aaed5..c0dddb3 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/cache-1.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/cache-1.c
@@ -1,3 +1,13 @@
-/* OpenACC cache directive. */
+/* OpenACC 'cache' directive. */
+
+/* See also corresponding C++ variant '../libgomp.oacc-c++/cache-1.C'. */
#include "../../../gcc/testsuite/c-c++-common/goacc/cache-1.c"
+
+int
+main (int argc, char *argv[])
+{
+ test ();
+
+ return 0;
+}