Commit cac78d37 by James A. Morrison

var_defs.tree: Remove duplicate variable.

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
parent 0219cf3d
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> 2005-03-22 James A. Morrison <phython@gcc.gnu.org>
* compile/memory.tree: New test. * compile/memory.tree: New test.
......
// { 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;
}
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
// { dg-options "-Wuninitialized -O" } // { dg-options "-Wuninitialized -O" }
external_definition void boring (int arg0); external_definition void boring (int arg0);
external_definition char condition (char arg1, char arg2); external_definition char condition (char arg1, char arg2);
external_definition int first_nonzero (int arg5, int arg6);
boring boring
{ {
...@@ -23,21 +22,5 @@ condition ...@@ -23,21 +22,5 @@ condition
return j; // { dg-warning "uninitialized" } 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;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment