| 1 |
// RUN: %clang_cc1 -fcuda-is-device -verify=nordc %s |
| 2 |
// RUN: %clang_cc1 -fcuda-is-device -fgpu-rdc -verify=rdc %s |
| 3 |
// RUN: %clang_cc1 -x hip -fcuda-is-device -verify=hip %s |
| 4 |
|
| 5 |
// rdc-no-diagnostics |
| 6 |
|
| 7 |
#include "Inputs/cuda.h" |
| 8 |
|
| 9 |
__global__ void g2(int x) {} |
| 10 |
|
| 11 |
__global__ void g1(void) { |
| 12 |
g2<<<1, 1>>>(42); |
| 13 |
// nordc-error@-1 {{kernel launch from __device__ or __global__ function requires relocatable device code (i.e. requires -fgpu-rdc)}} |
| 14 |
// hip-error@-2 {{device-side kernel call/launch is not supported}} |
| 15 |
} |