2005-02-26 James A. Morrison <phython@gcc.gnu.org>
* compile/var_defs: Add uninitialized variables.
From-SVN: r95585
2005-02-26 James A. Morrison <phython@gcc.gnu.org>
+ * compile/var_defs: Add uninitialized variables.
+
+2005-02-26 James A. Morrison <phython@gcc.gnu.org>
+
* compile/extrafunc.tree, compile/extravar.tree: New tests.
2005-02-26 James A. Morrison <phython@gcc.gnu.org>
// { dg-do compile }
+// { 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);
if (arg1)
{
automatic int i;
- return arg1;
+ return i + 1; // { dg-warning "uninitialized" }
}
else
{
- return 0;
+ automatic int j;
+ return j; // { dg-warning "uninitialized" }
}
}