xref: /minix3/external/bsd/llvm/dist/clang/test/Sema/array-size.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -triple i686-apple-darwin -verify %s
2*f4a2713aSLionel Sambuc 
f()3*f4a2713aSLionel Sambuc void f() {
4*f4a2713aSLionel Sambuc   int x0[1073741824]; // expected-error{{array is too large}}
5*f4a2713aSLionel Sambuc   int x1[1073741824 + 1]; // expected-error{{array is too large}}
6*f4a2713aSLionel Sambuc   int x2[(unsigned)1073741824]; // expected-error{{array is too large}}
7*f4a2713aSLionel Sambuc   int x3[(unsigned)1073741824 + 1]; // expected-error{{array is too large}}
8*f4a2713aSLionel Sambuc   int x4[1073741824 - 1];
9*f4a2713aSLionel Sambuc }
10*f4a2713aSLionel Sambuc 
11