diff options
author | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-20 23:01:12 +0000 |
---|---|---|
committer | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-20 23:01:12 +0000 |
commit | e1dfbe3090ccf6cfbc7275cfdfa38f71647de3ed (patch) | |
tree | 8c98991ecdce73acfe22e53e466031d83b2524c1 /gcc/testsuite/g++.dg/uninit-pred-4.C | |
parent | 6f44b17da48973c9fe4f7b690879dd90bf8a8c90 (diff) | |
parent | 1b2bf75690af8115739ebba710a44d05388c7a1a (diff) | |
download | gcc-e1dfbe3090ccf6cfbc7275cfdfa38f71647de3ed.tar.gz |
Merge in trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@202802 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg/uninit-pred-4.C')
-rw-r--r-- | gcc/testsuite/g++.dg/uninit-pred-4.C | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/uninit-pred-4.C b/gcc/testsuite/g++.dg/uninit-pred-4.C new file mode 100644 index 00000000000..94ab13c50d6 --- /dev/null +++ b/gcc/testsuite/g++.dg/uninit-pred-4.C @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-options "-Wuninitialized -Og" } */ + +int pop (); +int pop_first_bucket; + +int my_pop () +{ + int out; // { dg-bogus "uninitialized" "uninitialized variable warning" } + + while (pop_first_bucket) + if (pop_first_bucket && (out = pop())) + return out; + + return 0; +} |