18 lines · plain
1// CPU-side compilation on x86 (no errors expected).2// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -aux-triple nvptx64 -x cuda -fsyntax-only -verify=cpu %s3 4// GPU-side compilation on x86 (no errors expected)5// RUN: %clang_cc1 -triple nvptx64 -aux-triple x86_64-unknown-linux-gnu -fcuda-is-device -x cuda -fsyntax-only -verify=gpu %s6 7// cpu-no-diagnostics8typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__)));9typedef __float128 _Float128;10 11// gpu-note@+1 {{'a' defined here}}12__attribute__((device)) __float128 f(__float128 a, float b) {13 // gpu-note@+1 {{'c' defined here}}14 __float128 c = b + 1.0;15 // gpu-error@+2 {{'a' requires 128 bit size '__float128' type support, but target 'nvptx64' does not support it}}16 // gpu-error@+1 {{'c' requires 128 bit size '__float128' type support, but target 'nvptx64' does not support it}}17 return a + c;18}