var_defs.tree: Remove duplicate variable.
authorJames A. Morrison <phython@gcc.gnu.org>
Tue, 19 Jul 2005 14:39:20 +0000 (14:39 +0000)
committerJames A. Morrison <phython@gcc.gnu.org>
Tue, 19 Jul 2005 14:39:20 +0000 (14:39 +0000)
2005-07-19  James A. Morrrison  <phython@gcc.gnu.org>

* compile/var_defs.tree: Remove duplicate variable.
* compile/var_defs-2.tree: Add duplicate variable test.

From-SVN: r102159

gcc/testsuite/treelang/ChangeLog
gcc/testsuite/treelang/compile/var_defs-2.tree [new file with mode: 0644]
gcc/testsuite/treelang/compile/var_defs.tree

index 410cb9480abd9f334d178d67b07d77463e3cf87d..8e62b4c4f74689e85328fd97790fb07a0bdfd116 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-19  James A. Morrrison  <phython@gcc.gnu.org>
+
+       * compile/var_defs.tree: Remove duplicate variable.
+       * compile/var_defs-2.tree: Add duplicate variable test.
+
 2005-03-22  James A. Morrison  <phython@gcc.gnu.org>
 
        * compile/memory.tree: New test.
diff --git a/gcc/testsuite/treelang/compile/var_defs-2.tree b/gcc/testsuite/treelang/compile/var_defs-2.tree
new file mode 100644 (file)
index 0000000..cfcd312
--- /dev/null
@@ -0,0 +1,20 @@
+// { dg-do compile }
+external_definition int first_nonzero (int arg5, int arg6);
+
+first_nonzero
+{
+  automatic int y;
+  automatic int y;  // { dg-error "Duplicate" }
+  if (arg5)
+    {
+      return arg5;
+    }
+  else
+    {
+      automatic int j;
+      j = arg6;
+      return j;
+    }
+  return arg6;
+}
+
index 49f9cd0385bc69f1e8127040ac5d54c6a597b58d..24ced5a9c794e92368386617b3359534414b5d3b 100644 (file)
@@ -2,7 +2,6 @@
 // { dg-options "-Wuninitialized -O" }
 external_definition void boring (int arg0);
 external_definition char condition (char arg1, char arg2);
-external_definition int first_nonzero (int arg5, int arg6);
 
 boring
 {
@@ -23,21 +22,5 @@ condition
       return j; // { dg-warning "uninitialized" }
     }
 }
-
-first_nonzero
-{
-  automatic int y;
-  automatic int y;  // { dg-error "Duplicate" }
-  if (arg5)
-    {
-      return arg5;
-    }
-  else
-    {
-      automatic int j;
-      j = arg6;
-      return j;
-    }
-  return arg6;
 }