blob: 89f57b427c65a9ffc3861f3d99bb96beb892db2a [file] [log] [blame]
Egor Pasko167ac2b2010-05-18 12:26:511/* Test for -Wredundant-decls warnings */
2/* { dg-do compile } */
3/* { dg-options "-Wredundant-decls" } */
4
5int j = 5; /* { dg-message "note: previous" } */
6int j; /* { dg-warning "redundant" } */
7
8static int k;
9static int k = 5; /* { dg-message "note: previous" } */
10static int k; /* { dg-warning "redundant" } */
11
12static int l = 5; /* { dg-message "note: previous" } */
13static int l; /* { dg-warning "redundant" } */
14
15static int m; /* { dg-message "note: previous" } */
16static int m; /* { dg-warning "redundant" } */
17static int m = 5;
18
19int n; /* { dg-message "note: previous" } */
20int n; /* { dg-warning "redundant" } */
21int n = 5;
22
23static int o;
24static int o = 5;
25
26int p;
27int p = 5;