view clang/test/SemaCUDA/call-kernel-from-kernel.cu @ 222:81f6424ef0e3 llvm-original

LLVM original branch
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:10:01 +0900
parents 79ff65ed7e25
children
line wrap: on
line source

// RUN: %clang_cc1 %s --std=c++11 -triple nvptx -emit-llvm -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}}
}