llvm-project/clang/test/SemaCUDA/call-kernel-from-kernel.cu
Fangrui Song 7e59223ac4 [test] %clang_cc1: remove redundant actions
ParseFrontendArgs takes the last OPT_Action_Group option. The other
actions are overridden.
2024-05-05 10:46:06 -07:00

10 lines
329 B
Plaintext

// RUN: %clang_cc1 %s --std=c++11 -triple nvptx -o - \
// RUN: -verify -fcuda-is-device -fsyntax-only -verify-ignore-unexpected=note
#include "Inputs/cuda.h"
__global__ void kernel1();
__global__ void kernel2() {
kernel1<<<1,1>>>(); // expected-error {{reference to __global__ function 'kernel1' in __global__ function}}
}