1 /* Test for multiple declarations of an identifier at same block
2 scope: only valid case is all extern. */
3 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
4 /* { dg-do compile } */
5 /* { dg-options "" } */
10 int a0
; /* { dg-message "note: previous declaration" } */
11 int a0
; /* { dg-error "redeclaration" } */
17 int a1
; /* { dg-message "note: previous declaration" } */
18 static int a1
; /* { dg-error "redeclaration" } */
24 int a2
; /* { dg-message "note: previous declaration" } */
25 extern int a2
; /* { dg-error "follows declaration with no linkage" } */
31 static int a3
; /* { dg-message "note: previous declaration" } */
32 int a3
; /* { dg-error "redeclaration" } */
38 static int a4
; /* { dg-message "note: previous declaration" } */
39 static int a4
; /* { dg-error "redeclaration" } */
45 static int a5
; /* { dg-message "note: previous declaration" } */
46 extern int a5
; /* { dg-error "follows declaration with no linkage" } */
52 extern int a6
; /* { dg-message "note: previous declaration" } */
53 int a6
; /* { dg-error "follows extern declaration" } */
59 extern int a7
; /* { dg-message "note: previous declaration" } */
60 static int a7
; /* { dg-error "follows extern declaration" } */