40 lines · c
1// RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-apple-darwin9 %s -DHAVE2// RUN: %clang_cc1 -fsyntax-only -verify -triple i686-linux-gnu %s -DHAVE_NOT3// RUN: %clang_cc1 -fsyntax-only -verify -triple powerpc64-ibm-aix-xcoff %s -DHAVE4// RUN: %clang_cc1 -fsyntax-only -verify -triple powerpc-ibm-aix-xcoff %s -DHAVE_NOT5 6#ifdef HAVE7typedef int i128 __attribute__((__mode__(TI)));8typedef unsigned u128 __attribute__((__mode__(TI)));9 10int a[((i128)-1 ^ (i128)-2) == 1 ? 1 : -1];11int a[(u128)-1 > 1LL ? 1 : -1];12int a[__SIZEOF_INT128__ == 16 ? 1 : -1];13 14// PR543515__uint128_t b = (__uint128_t)-1;16 17// PR11916: Support for libstdc++ 4.718__int128 i = (__int128)0;19unsigned __int128 u = (unsigned __int128)-1;20 21long long SignedTooBig = 123456789012345678901234567890; // expected-error {{integer literal is too large to be represented in any integer type}}22unsigned long long UnsignedTooBig = 123456789012345678901234567890; // expected-error {{integer literal is too large to be represented in any integer type}}23 24void MPI_Send(void *buf, int datatype) __attribute__(( pointer_with_type_tag(mpi,1,2) ));25 26static const int mpi_int __attribute__(( type_tag_for_datatype(mpi,int) )) = 10;27 28void test(int *buf)29{30}31#else32 33__int128 n; // expected-error {{__int128 is not supported on this target}}34 35#if defined(__SIZEOF_INT128__)36#error __SIZEOF_INT128__ should not be defined37#endif38 39#endif40