brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · 6f9a877 Raw
51 lines · plain
1// Test clang driver bails out after one error during CUDA compilation.2 3#ifdef FORCE_ERROR4#error compilation failed5#endif6 7// RUN: not %clang -target powerpc64le-ibm-linux-gnu -fsyntax-only -nocudalib \8// RUN:   -nocudainc -DFORCE_ERROR %s 2>&1 | FileCheck %s9// RUN: not %clang -target powerpc64le-ibm-linux-gnu -fsyntax-only -nocudalib \10// RUN:   -nocudainc -DFORCE_ERROR --cuda-gpu-arch=sm_35 --cuda-gpu-arch=sm_60 \11// RUN:   %s 2>&1 | FileCheck %s12// RUN: not %clang -target powerpc64le-ibm-linux-gnu -fsyntax-only -nocudalib \13// RUN:   -nocudainc -DFORCE_ERROR --cuda-gpu-arch=sm_35 --cuda-gpu-arch=sm_60 \14// RUN:   --cuda-device-only %s 2>&1 | FileCheck %s15 16#if defined(ERROR_HOST) && !defined(__CUDA_ARCH__)17#error compilation failed18#endif19 20#if defined(ERROR_SM35) && (__CUDA_ARCH__ == 350)21#error compilation failed22#endif23 24#if defined(ERROR_SM60) && (__CUDA_ARCH__ == 600)25#error compilation failed26#endif27 28// RUN: not %clang -target powerpc64le-ibm-linux-gnu -fsyntax-only -nocudalib \29// RUN:   -nocudainc -DERROR_HOST --cuda-gpu-arch=sm_35 --cuda-gpu-arch=sm_60 \30// RUN:   %s 2>&1 | FileCheck %s31// RUN: not %clang -target powerpc64le-ibm-linux-gnu -fsyntax-only -nocudalib \32// RUN:   -nocudainc -DERROR_SM35 --cuda-gpu-arch=sm_35 --cuda-gpu-arch=sm_60 \33// RUN:   --cuda-device-only %s 2>&1 | FileCheck %s34// RUN: not %clang -target powerpc64le-ibm-linux-gnu -fsyntax-only -nocudalib \35// RUN:   -nocudainc -DERROR_SM60 --cuda-gpu-arch=sm_35 --cuda-gpu-arch=sm_60 \36// RUN:   --cuda-device-only %s 2>&1 | FileCheck %s37 38// RUN: not %clang -target powerpc64le-ibm-linux-gnu -fsyntax-only -nocudalib \39// RUN:   -nocudainc -DERROR_HOST -DERROR_SM35 --cuda-gpu-arch=sm_35 \40// RUN:   --cuda-gpu-arch=sm_60 %s 2>&1 | FileCheck %s41// RUN: not %clang -target powerpc64le-ibm-linux-gnu -fsyntax-only -nocudalib \42// RUN:   -nocudainc -DERROR_HOST -DERROR_SM60 --cuda-gpu-arch=sm_35 \43// RUN:   --cuda-gpu-arch=sm_60 %s 2>&1 | FileCheck %s44// RUN: not %clang -target powerpc64le-ibm-linux-gnu -fsyntax-only -nocudalib \45// RUN:   -nocudainc -DERROR_SM35 -DERROR_SM60 --cuda-gpu-arch=sm_35 \46// RUN:   --cuda-gpu-arch=sm_60 %s 2>&1 | FileCheck %s47 48 49// CHECK: error: compilation failed50// CHECK-NOT: error: compilation failed51