blob: a360d007c3b7baebb2f1da1770545b56d1a304f0 [file] [log] [blame]
Daniel Dunbar8fbe78f2009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Eli Friedmane919e382009-12-10 08:54:47 +00002// PR5515
3
4extern int a[];
5int a[10];
6extern int b[10];
7int b[];
8extern int c[1];
9int c[] = {1,2}; // expected-error {{excess elements in array initializer}}
Richard Smithcd3d5d92012-07-07 23:00:31 +000010
11int d[1][]; // expected-error {{array has incomplete element type 'int []'}}
Eli Friedman07bab732012-12-13 01:43:21 +000012
David Majnemer38a50c02015-07-14 20:08:49 +000013extern const int e[2]; // expected-note {{previous declaration is here}}
Eli Friedman07bab732012-12-13 01:43:21 +000014int e[] = { 1 }; // expected-error {{redefinition of 'e' with a different type: 'int []' vs 'const int [2]'}}