aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@gcc.gnu.org>2005-09-02 20:45:43 +0000
committerAndreas Schwab <schwab@gcc.gnu.org>2005-09-02 20:45:43 +0000
commit810d4c7ba0581cc1a62f54d808b2ce7a633c5c29 (patch)
treea12d038d51996472b11fce824fc4d14dd9d70e78
parent8845001b6c4505809a171c3f37790efd1335e7f7 (diff)
downloadgcc-810d4c7ba0581cc1a62f54d808b2ce7a633c5c29.zip
gcc-810d4c7ba0581cc1a62f54d808b2ce7a633c5c29.tar.gz
gcc-810d4c7ba0581cc1a62f54d808b2ce7a633c5c29.tar.bz2
Move from root of repository to intented place.
From-SVN: r103796
-rw-r--r--gcc/testsuite/gcc.dg/Wredundant-decls-2.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/Wredundant-decls-2.c b/gcc/testsuite/gcc.dg/Wredundant-decls-2.c
new file mode 100644
index 0000000..b10840f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wredundant-decls-2.c
@@ -0,0 +1,27 @@
+/* Test for -Wredundant-decls warnings */
+/* { dg-do compile } */
+/* { dg-options "-Wredundant-decls" } */
+
+int j = 5; /* { dg-warning "previous" } */
+int j; /* { dg-warning "redundant" } */
+
+static int k;
+static int k = 5; /* { dg-warning "previous" } */
+static int k; /* { dg-warning "redundant" } */
+
+static int l = 5; /* { dg-warning "previous" } */
+static int l; /* { dg-warning "redundant" } */
+
+static int m; /* { dg-warning "previous" } */
+static int m; /* { dg-warning "redundant" } */
+static int m = 5;
+
+int n; /* { dg-warning "previous" } */
+int n; /* { dg-warning "redundant" } */
+int n = 5;
+
+static int o;
+static int o = 5;
+
+int p;
+int p = 5;