diff options
author | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
commit | c72c57c9e9b69944e3e009cd5e209634839581d3 (patch) | |
tree | 4fc2f184c499d106f29a386c452b49e5197bf63d /test/Sema/128bitint.c | |
parent | 5b20025c30d23d521e12c1f33ec8fa6b821952cd (diff) | |
download | FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.zip FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.tar.gz |
Vendor import of clang trunk r178860:
http://llvm.org/svn/llvm-project/cfe/trunk@178860
Diffstat (limited to 'test/Sema/128bitint.c')
-rw-r--r-- | test/Sema/128bitint.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/Sema/128bitint.c b/test/Sema/128bitint.c index 600c25a..bb8e3d1 100644 --- a/test/Sema/128bitint.c +++ b/test/Sema/128bitint.c @@ -1,9 +1,13 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-apple-darwin9 -fms-extensions %s +// RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-apple-darwin9 -fms-extensions %s -DHAVE +// RUN: %clang_cc1 -fsyntax-only -verify -triple i686-linux-gnu -fms-extensions %s -DHAVE_NOT + +#ifdef HAVE typedef int i128 __attribute__((__mode__(TI))); typedef unsigned u128 __attribute__((__mode__(TI))); int a[((i128)-1 ^ (i128)-2) == 1 ? 1 : -1]; int a[(u128)-1 > 1LL ? 1 : -1]; +int a[__SIZEOF_INT128__ == 16 ? 1 : -1]; // PR5435 __uint128_t b = (__uint128_t)-1; @@ -36,4 +40,12 @@ void test(int *buf) { MPI_Send(buf, 0x10000000000000001i128); // expected-warning {{implicit conversion from '__int128' to 'int' changes value}} } +#else + +__int128 n; // expected-error {{__int128 is not supported on this target}} + +#if defined(__SIZEOF_INT128__) +#error __SIZEOF_INT128__ should not be defined +#endif +#endif |