1 // RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-linux-pc %s
2 // RUN: %clang_cc1 -fsyntax-only -verify -triple spir-unknown-unknown %s -DHAVE
3 // RUN: %clang_cc1 -fsyntax-only -verify -triple armv7a-linux-gnu %s -DHAVE
4 // RUN: %clang_cc1 -fsyntax-only -verify -triple aarch64-linux-gnu %s -DHAVE
5
6 #ifndef HAVE
7 // expected-error@+2{{_Float16 is not supported on this target}}
8 #endif // HAVE
9 _Float16 f;
10
11 #ifdef HAVE
12 // FIXME: Should this be valid?
13 _Complex _Float16 a; // expected-error {{'_Complex _Float16' is invalid}}
builtin_complex()14 void builtin_complex() {
15 _Float16 a = 0;
16 (void)__builtin_complex(a, a); // expected-error {{'_Complex _Float16' is invalid}}
17 }
18 #endif
19