diff options
author | phython <phython@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-26 16:09:33 +0000 |
---|---|---|
committer | phython <phython@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-26 16:09:33 +0000 |
commit | e5bed5eeb7954a9aa49d40d57a9da5718f9eb886 (patch) | |
tree | a21940724ee334bc65405033440d99aae8f0dc59 /gcc/testsuite/treelang | |
parent | 13c161fc639fe1387eb1d3ad9c98a5354adb1dfb (diff) | |
download | gcc-e5bed5eeb7954a9aa49d40d57a9da5718f9eb886.tar.gz |
2005-02-26 James A. Morrison <phython@gcc.gnu.org>
* compile/var_defs: Add uninitialized variables.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95585 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/treelang')
-rw-r--r-- | gcc/testsuite/treelang/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/treelang/compile/var_defs.tree | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/testsuite/treelang/ChangeLog b/gcc/testsuite/treelang/ChangeLog index db4d022deb6..4f7fd02b5e9 100644 --- a/gcc/testsuite/treelang/ChangeLog +++ b/gcc/testsuite/treelang/ChangeLog @@ -1,5 +1,9 @@ 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> diff --git a/gcc/testsuite/treelang/compile/var_defs.tree b/gcc/testsuite/treelang/compile/var_defs.tree index aaab0d9099e..49f9cd0385b 100644 --- a/gcc/testsuite/treelang/compile/var_defs.tree +++ b/gcc/testsuite/treelang/compile/var_defs.tree @@ -1,4 +1,5 @@ // { 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); @@ -14,11 +15,12 @@ condition if (arg1) { automatic int i; - return arg1; + return i + 1; // { dg-warning "uninitialized" } } else { - return 0; + automatic int j; + return j; // { dg-warning "uninitialized" } } } |