Files
clang-p2996/clang/test/SemaCUDA/float16.cu
Yaxun Liu d442500f5d [CUDA][HIP] Do not diagnose use of _Float16
r352221 caused regressions in CUDA/HIP since device function may use _Float16 whereas host does not support it.
In this case host compilation should not diagnose usage of _Float16 in device functions or variables.

For now just do not diagnose _Float16 for CUDA/HIP. In the future we should have more precise check.

Differential Revision: https://reviews.llvm.org/D57369

llvm-svn: 352488
2019-01-29 13:20:23 +00:00

8 lines
195 B
Plaintext

// RUN: %clang_cc1 -fsyntax-only -triple x86_64 -aux-triple amdgcn -verify %s
// expected-no-diagnostics
#include "Inputs/cuda.h"
__device__ void f(_Float16 x);
__device__ _Float16 x = 1.0f16;