[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Sema / Float16.c
blob26c604fed27aa319a3e600b76a3cf806160f0a3c
1 // RUN: %clang_cc1 -fsyntax-only -verify -triple i686-linux-pc %s
2 // RUN: %clang_cc1 -fsyntax-only -verify -triple i686-linux-pc -target-feature +sse2 %s -DHAVE
3 // RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-linux-pc %s -DHAVE
4 // RUN: %clang_cc1 -fsyntax-only -verify -triple spir-unknown-unknown %s -DHAVE
5 // RUN: %clang_cc1 -fsyntax-only -verify -triple armv7a-linux-gnu %s -DHAVE
6 // RUN: %clang_cc1 -fsyntax-only -verify -triple aarch64-linux-gnu %s -DHAVE
8 #ifndef HAVE
9 // expected-error@+2{{_Float16 is not supported on this target}}
10 #endif // HAVE
11 _Float16 f;
13 #ifdef HAVE
14 _Complex _Float16 a;
15 void builtin_complex(void) {
16 _Float16 a = 0;
17 (void)__builtin_complex(a, a); // expected-error {{'_Complex _Float16' is invalid}}
19 #endif