mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 11:36:06 +00:00

Consider case where `__int128` type is supported by the host target but not by a device target (e.g. spirv*). Clang emits an error message for unsupported type even if the device code does not use it. This patch fixes this issue by emitting the error message when the device code attempts to use the unsupported type. Reviewed By: tra Differential Revision: https://reviews.llvm.org/D111047
17 lines
475 B
Plaintext
17 lines
475 B
Plaintext
// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa \
|
|
// RUN: -aux-triple x86_64-unknown-linux-gnu \
|
|
// RUN: -fcuda-is-device -verify -fsyntax-only %s
|
|
// RUN: %clang_cc1 -triple nvptx \
|
|
// RUN: -aux-triple x86_64-unknown-linux-gnu \
|
|
// RUN: -fcuda-is-device -verify -fsyntax-only %s
|
|
|
|
// expected-no-diagnostics
|
|
#define __device__ __attribute__((device))
|
|
|
|
__int128 h_glb;
|
|
__device__ __int128 d_unused;
|
|
__device__ __int128 d_glb;
|
|
__device__ __int128 bar() {
|
|
return d_glb;
|
|
}
|