|
@@ -193,12 +193,22 @@ __host__ __device__ void hostdevicef() {
|
|
CurrentFnPtr fp_cdh = cdh;
|
|
CurrentFnPtr fp_cdh = cdh;
|
|
CurrentReturnTy ret_cdh = cdh();
|
|
CurrentReturnTy ret_cdh = cdh();
|
|
|
|
|
|
|
|
+ GlobalFnPtr fp_g = g;
|
|
|
|
+#if defined(__CUDA_ARCH__)
|
|
|
|
+ // expected-error@-2 {{reference to __global__ function 'g' in __host__ __device__ function}}
|
|
|
|
+#endif
|
|
|
|
+
|
|
g();
|
|
g();
|
|
#if defined (__CUDA_ARCH__)
|
|
#if defined (__CUDA_ARCH__)
|
|
// expected-error@-2 {{reference to __global__ function 'g' in __host__ __device__ function}}
|
|
// expected-error@-2 {{reference to __global__ function 'g' in __host__ __device__ function}}
|
|
#else
|
|
#else
|
|
// expected-error@-4 {{call to global function g not configured}}
|
|
// expected-error@-4 {{call to global function g not configured}}
|
|
#endif
|
|
#endif
|
|
|
|
+
|
|
|
|
+ g<<<0,0>>>();
|
|
|
|
+#if defined(__CUDA_ARCH__)
|
|
|
|
+ // expected-error@-2 {{reference to __global__ function 'g' in __host__ __device__ function}}
|
|
|
|
+#endif
|
|
}
|
|
}
|
|
|
|
|
|
// Test for address of overloaded function resolution in the global context.
|
|
// Test for address of overloaded function resolution in the global context.
|