[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / Sema / 128bitint.c
blobe5fb4ab77200fa0ddca68484f89db1ed446c2b93
1 // RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-apple-darwin9 %s -DHAVE
2 // RUN: %clang_cc1 -fsyntax-only -verify -triple i686-linux-gnu %s -DHAVE_NOT
3 // RUN: %clang_cc1 -fsyntax-only -verify -triple powerpc64-ibm-aix-xcoff %s -DHAVE
4 // RUN: %clang_cc1 -fsyntax-only -verify -triple powerpc-ibm-aix-xcoff %s -DHAVE_NOT
6 #ifdef HAVE
7 typedef int i128 __attribute__((__mode__(TI)));
8 typedef unsigned u128 __attribute__((__mode__(TI)));
10 int a[((i128)-1 ^ (i128)-2) == 1 ? 1 : -1];
11 int a[(u128)-1 > 1LL ? 1 : -1];
12 int a[__SIZEOF_INT128__ == 16 ? 1 : -1];
14 // PR5435
15 __uint128_t b = (__uint128_t)-1;
17 // PR11916: Support for libstdc++ 4.7
18 __int128 i = (__int128)0;
19 unsigned __int128 u = (unsigned __int128)-1;
21 long long SignedTooBig = 123456789012345678901234567890; // expected-error {{integer literal is too large to be represented in any integer type}}
22 unsigned long long UnsignedTooBig = 123456789012345678901234567890; // expected-error {{integer literal is too large to be represented in any integer type}}
24 void MPI_Send(void *buf, int datatype) __attribute__(( pointer_with_type_tag(mpi,1,2) ));
26 static const int mpi_int __attribute__(( type_tag_for_datatype(mpi,int) )) = 10;
28 void test(int *buf)
31 #else
33 __int128 n; // expected-error {{__int128 is not supported on this target}}
35 #if defined(__SIZEOF_INT128__)
36 #error __SIZEOF_INT128__ should not be defined
37 #endif
39 #endif