]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/Sema/_Float128.c
Vendor import of clang trunk r321530:
[FreeBSD/FreeBSD.git] / test / Sema / _Float128.c
1 // RUN: %clang_cc1 -verify %s
2 // RUN: %clang_cc1 -triple powerpc64-linux -verify %s
3 // RUN: %clang_cc1 -triple i686-windows-gnu -verify %s
4 // RUN: %clang_cc1 -triple x86_64-windows-gnu -verify %s
5 // RUN: %clang_cc1 -triple x86_64-windows-msvc -verify %s
6
7 #if defined(__FLOAT128__) || defined(__SIZEOF_FLOAT128__)
8 _Float128 f;
9 _Float128 tiny = __FLT128_EPSILON__;
10 int g(int x, _Float128 *y) {
11   return x + *y;
12 }
13
14 // expected-no-diagnostics
15 #else
16 _Float128 f;  // expected-error {{__float128 is not supported on this target}}
17 float tiny = __FLT128_EPSILON__; // expected-error{{use of undeclared identifier}}
18 int g(int x, _Float128 *y) {  // expected-error {{__float128 is not supported on this target}}
19   return x + *y;
20 }
21
22 #endif  // defined(__FLOAT128__) || defined(__SIZEOF_FLOAT128__)