Debian Codegraph @

clang/test/SemaCUDA/call-kernel-from-kernel.cu

raw
1 // RUN: %clang_cc1 %s --std=c++11 -triple nvptx -o - \
2 // RUN: -verify -fcuda-is-device -fsyntax-only -verify-ignore-unexpected=note
3 // RUN: %clang_cc1 %s --std=c++11 -fgpu-rdc -triple nvptx -o - \
4 // RUN: -verify=rdc -fcuda-is-device -fsyntax-only -verify-ignore-unexpected=note
5 // rdc-no-diagnostics
6
7 #include "Inputs/cuda.h"
8
9 __global__ void kernel1();
10 __global__ void kernel2() {
11 kernel1<<<1,1>>>(); // expected-error {{kernel launch from __device__ or __global__ function requires relocatable device code (i.e. requires -fgpu-rdc)}}
12 }