From a0e701d8a2d31d3fcbaad4de67639aadca7a1681 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Fri, 30 Oct 2015 00:13:22 +0000 Subject: 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 --- gcc/testsuite/ChangeLog | 5 ++++ .../c-c++-common/goacc/acc_on_device-2-off.c | 24 ------------------- gcc/testsuite/c-c++-common/goacc/acc_on_device-2.c | 28 ---------------------- 3 files changed, 5 insertions(+), 52 deletions(-) delete mode 100644 gcc/testsuite/c-c++-common/goacc/acc_on_device-2-off.c delete mode 100644 gcc/testsuite/c-c++-common/goacc/acc_on_device-2.c (limited to 'gcc') 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 + + * 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 * 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 - . - - { dg-final { scan-rtl-dump-times "\\\(call \[^\\n\]* acc_on_device" 0 "expand" { xfail c++ } } } */ -- cgit v1.1