aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Sema/Float16.c
blob: b104cf907b3e95aa179b46a221601729aa45c4ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// RUN: %clang_cc1 -fsyntax-only -verify -triple i686-linux-pc %s
// RUN: %clang_cc1 -fsyntax-only -verify -triple i686-linux-pc -target-feature +sse2 %s -DHAVE
// RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-linux-pc %s -DHAVE
// RUN: %clang_cc1 -fsyntax-only -verify -triple spir-unknown-unknown %s -DHAVE
// RUN: %clang_cc1 -fsyntax-only -verify -triple armv7a-linux-gnu %s -DHAVE
// RUN: %clang_cc1 -fsyntax-only -verify -triple aarch64-linux-gnu %s -DHAVE
// RUN: %clang_cc1 -fsyntax-only -verify -triple riscv32 %s -DHAVE
// RUN: %clang_cc1 -fsyntax-only -verify -triple riscv64 %s -DHAVE
// RUN: %clang_cc1 -fsyntax-only -verify -triple s390x-ibm-zos %s

#ifndef HAVE
// expected-error@+2{{_Float16 is not supported on this target}}
#endif // HAVE
_Float16 f;

#ifdef HAVE
// expected-no-diagnostics
_Complex _Float16 a;
void builtin_complex(void) {
  _Float16 a = 0;
  (void)__builtin_complex(a, a);
}
#endif