@@ -1,5 +1,9 @@
2015-08-03 Thomas Schwinge <thomas@codesourcery.com>
+ * c-c++-common/goacc/acc_on_device-2-off.c (acc_on_device): Change
+ formal parameter to int.
+ * c-c++-common/goacc/acc_on_device-2.c (acc_on_device): Likewise.
+
* c-c++-common/restrict-2.c: Update for new pass_lim.
* c-c++-common/restrict-4.c: Same.
* g++.dg/tree-ssa/pr33615.C: Same.
@@ -1,12 +1,14 @@
/* Have to enable optimizations, as otherwise builtins won't be expanded. */
/* { dg-additional-options "-O -fdump-rtl-expand -fno-openacc" } */
+/* Duplicate parts of libgomp/openacc.h, because we can't include it here. */
+
#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);
+extern int acc_on_device (int);
#if __cplusplus
}
@@ -1,12 +1,14 @@
/* Have to enable optimizations, as otherwise builtins won't be expanded. */
/* { dg-additional-options "-O -fdump-rtl-expand" } */
+/* Duplicate parts of libgomp/openacc.h, because we can't include it here. */
+
#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);
+extern int acc_on_device (int);
#if __cplusplus
}
@@ -20,9 +22,9 @@ 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
+ TODO: in C++, the use of enum acc_device_t for acc_on_device's parameter
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>.
+ when changing acc_device_t to plain int, but that's not necessarily what a
+ user will be doing.
{ dg-final { scan-rtl-dump-times "\\\(call \[^\\n\]* acc_on_device" 0 "expand" { xfail c++ } } } */