aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2015-06-02 13:48:56 +0200
committerThomas Schwinge <tschwinge@gcc.gnu.org>2015-06-02 13:48:56 +0200
commit1817fe58f258d6de8b7716927bad077d811fe39a (patch)
tree5209e39206d04066fe2027cef522edd1b4743503
parent6a3222f3c7551e3d3cc956df227537946d1817b8 (diff)
downloadgcc-1817fe58f258d6de8b7716927bad077d811fe39a.zip
gcc-1817fe58f258d6de8b7716927bad077d811fe39a.tar.gz
gcc-1817fe58f258d6de8b7716927bad077d811fe39a.tar.bz2
[PR libgomp/65742, PR middle-end/66332] XFAIL acc_on_device compile-time evaluation
The OpenACC 2.0a specification mandates differently, but we currently do get a library call in the host code. PR libgomp/65742 PR middle-end/66332 gcc/testsuite/ * c-c++-common/goacc/acc_on_device-2.c: XFAIL for C, too. From-SVN: r224028
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/c-c++-common/goacc/acc_on_device-2.c10
2 files changed, 15 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index d91cf7c..3f51b10 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2015-06-02 Thomas Schwinge <thomas@codesourcery.com>
+
+ PR libgomp/65742
+ PR middle-end/66332
+ * c-c++-common/goacc/acc_on_device-2.c: XFAIL for C, too.
+
2015-06-02 Uros Bizjak <ubizjak@gmail.com>
* g++.dg/abi/mangle-regparm.C (dg-do): Fix x86_32 target selector.
diff --git a/gcc/testsuite/c-c++-common/goacc/acc_on_device-2.c b/gcc/testsuite/c-c++-common/goacc/acc_on_device-2.c
index 8db0a66..6e3d292 100644
--- a/gcc/testsuite/c-c++-common/goacc/acc_on_device-2.c
+++ b/gcc/testsuite/c-c++-common/goacc/acc_on_device-2.c
@@ -20,9 +20,17 @@ f (void)
}
/* With -fopenacc, we're expecting the builtin to be expanded, so no calls.
+
TODO: in C++, even under extern "C", the use of enum for acc_device_t
perturbs expansion as a builtin, which expects an int parameter. It's fine
when changing acc_device_t to plain int, but that's not what we're doing in
<openacc.h>.
- { dg-final { scan-rtl-dump-times "\\\(call \[^\\n\]* acc_on_device" 0 "expand" { xfail c++ } } } */
+
+ TODO: given that we can't expand acc_on_device in
+ gcc/builtins.c:expand_builtin_acc_on_device for in the !ACCEL_COMPILER case
+ (because at that point we don't know whether we're acc_device_host or
+ acc_device_host_nonshm), we'll (erroneously) get a library call in the host
+ code.
+
+ { dg-final { scan-rtl-dump-times "\\\(call \[^\\n\]* acc_on_device" 0 "expand" { xfail { c || c++ } } } } */