diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2015-10-30 00:13:22 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2015-10-30 00:13:22 +0000 |
commit | a0e701d8a2d31d3fcbaad4de67639aadca7a1681 (patch) | |
tree | dd2241361205d8674dc6b7d973e1d78df3ddc6d4 /gcc | |
parent | e7c6980e55d974035a4d85b3551eca47181d1bfc (diff) | |
download | gcc-a0e701d8a2d31d3fcbaad4de67639aadca7a1681.zip gcc-a0e701d8a2d31d3fcbaad4de67639aadca7a1681.tar.gz gcc-a0e701d8a2d31d3fcbaad4de67639aadca7a1681.tar.bz2 |
openacc.h (enum acc_device_t): Reformat.
gcc/
* openacc.h (enum acc_device_t): Reformat. Ensure layout
compatibility.
(enum acc_async_t): Reformat.
(acc_on_device): Declare compatible with builtin and provide C++
wrapper.
* testsuite/libgomp.oacc-c-c++-common/acc-on-device.c: New.
gcc/testsuite/
* c-c++-common/goacc/acc_on_device-2-off.c: Delete.
* c-c++-common/goacc/acc_on_device-2.c: Delete.
From-SVN: r229562
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/c-c++-common/goacc/acc_on_device-2-off.c | 24 | ||||
-rw-r--r-- | gcc/testsuite/c-c++-common/goacc/acc_on_device-2.c | 28 |
3 files changed, 5 insertions, 52 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 71f3148..ffefb43c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-10-29 Nathan Sidwell <nathan@codesourcery.com> + + * c-c++-common/goacc/acc_on_device-2-off.c: Delete. + * c-c++-common/goacc/acc_on_device-2.c: Delete. + 2015-10-29 Richard Sandiford <richard.sandiford@arm.com> * gcc.dg/torture/builtin-convert-1.c: Require c99_runtime. diff --git a/gcc/testsuite/c-c++-common/goacc/acc_on_device-2-off.c b/gcc/testsuite/c-c++-common/goacc/acc_on_device-2-off.c deleted file mode 100644 index 59c72f7..0000000 --- a/gcc/testsuite/c-c++-common/goacc/acc_on_device-2-off.c +++ /dev/null @@ -1,24 +0,0 @@ -/* Have to enable optimizations, as otherwise builtins won't be expanded. */ -/* { dg-additional-options "-O -fdump-rtl-expand -fno-openacc" } */ - -#if __cplusplus -extern "C" { -#endif - -typedef enum acc_device_t { acc_device_X = 123 } acc_device_t; -extern int acc_on_device (acc_device_t); - -#if __cplusplus -} -#endif - -int -f (void) -{ - const acc_device_t dev = acc_device_X; - return acc_on_device (dev); -} - -/* Without -fopenacc, we're expecting one call. - { dg-final { scan-rtl-dump-times "\\\(call \[^\\n\]* acc_on_device" 1 "expand" } } */ - 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 deleted file mode 100644 index ef622a8..0000000 --- a/gcc/testsuite/c-c++-common/goacc/acc_on_device-2.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Have to enable optimizations, as otherwise builtins won't be expanded. */ -/* { dg-additional-options "-O -fdump-rtl-expand" } */ - -#if __cplusplus -extern "C" { -#endif - -typedef enum acc_device_t { acc_device_X = 123 } acc_device_t; -extern int acc_on_device (acc_device_t); - -#if __cplusplus -} -#endif - -int -f (void) -{ - const acc_device_t dev = acc_device_X; - return acc_on_device (dev); -} - -/* 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++ } } } */ |