26 lines · plain
1// RUN: not %clang_cc1 -std=c++11 -triple x86_64-unknown-linux-gnu \2// RUN: -emit-llvm -o - %s 2>&1 | FileCheck %s3// RUN: not %clang_cc1 -std=c++11 -triple x86_64-unknown-linux-gnu \4// RUN: -fcuda-is-device -emit-llvm -o - %s 2>&1 \5// RUN: | FileCheck %s6 7// Check no crash due to deferred diagnostics.8 9#include "Inputs/cuda.h"10 11// CHECK: error: invalid output constraint '=h' in asm12// CHECK-NOT: core dump13inline __host__ __device__ int foo() {14 short h;15 __asm__("dont care" : "=h"(h) : "f"(0.0), "d"(0.0), "h"(0), "r"(0), "l"(0));16 return 0;17}18 19void host_fun() {20 foo();21}22 23__global__ void kernel() {24 foo();25}26