xref: /minix3/external/bsd/llvm/dist/clang/test/Sema/array-size-64.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -triple x86_64-apple-darwin -verify %s
2*f4a2713aSLionel Sambuc 
f()3*f4a2713aSLionel Sambuc void f() {
4*f4a2713aSLionel Sambuc   int a[2147483647U][2147483647U]; // expected-error{{array is too large}}
5*f4a2713aSLionel Sambuc   int b[1073741825U - 1U][2147483647U]; // expected-error{{array is too large}}
6*f4a2713aSLionel Sambuc }
7*f4a2713aSLionel Sambuc 
pr8256()8*f4a2713aSLionel Sambuc void pr8256 () {
9*f4a2713aSLionel Sambuc   typedef char a[1LL<<61];  // expected-error {{array is too large}}
10*f4a2713aSLionel Sambuc   typedef char b[(long long)sizeof(a)-1];
11*f4a2713aSLionel Sambuc }
12*f4a2713aSLionel Sambuc 
13