blob: c6085fb0a965d074bbd0ba5f85f57b1d78c6aa2e [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Eli Friedman153c33e2009-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 Smithbb351512012-07-07 23:00:31 +000010
11int d[1][]; // expected-error {{array has incomplete element type 'int []'}}
Eli Friedman6febf122012-12-13 01:43:21 +000012
13extern const int e[2]; // expected-note {{previous definition is here}}
14int e[] = { 1 }; // expected-error {{redefinition of 'e' with a different type: 'int []' vs 'const int [2]'}}