13 lines · plain
1// RUN: %clang_cc1 %s --std=c++11 -triple nvptx -o - \2// RUN: -verify -fcuda-is-device -fsyntax-only -verify-ignore-unexpected=note3// RUN: %clang_cc1 %s --std=c++11 -fgpu-rdc -triple nvptx -o - \4// RUN: -verify=rdc -fcuda-is-device -fsyntax-only -verify-ignore-unexpected=note5// rdc-no-diagnostics6 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}13