diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2009-01-16 20:44:25 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2009-01-16 20:44:25 +0000 |
commit | 5be1c58c4de4f21561b39fd72e9861ec087a1374 (patch) | |
tree | a2c68bc9813da0e337eba95b9171246386e99d6f /gcc | |
parent | 786ce82d44352369486d69add3cf3695b08998a2 (diff) | |
download | gcc-5be1c58c4de4f21561b39fd72e9861ec087a1374.zip gcc-5be1c58c4de4f21561b39fd72e9861ec087a1374.tar.gz gcc-5be1c58c4de4f21561b39fd72e9861ec087a1374.tar.bz2 |
ebitmap.h (ebitmap_iter_init): Initialize all fields.
* ebitmap.h (ebitmap_iter_init): Initialize all fields.
* ipa-struct-reorg.c (gen_struct_type): Replace known-true
test with assertion.
From-SVN: r143443
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ebitmap.h | 10 | ||||
-rw-r--r-- | gcc/ipa-struct-reorg.c | 3 |
3 files changed, 16 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f3c186e..77cf99c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-01-16 Alexandre Oliva <aoliva@redhat.com> + + * ebitmap.h (ebitmap_iter_init): Initialize all fields. + * ipa-struct-reorg.c (gen_struct_type): Replace known-true + test with assertion. + 2009-01-16 Richard Guenther <rguenther@suse.de> PR tree-optimization/38835 diff --git a/gcc/ebitmap.h b/gcc/ebitmap.h index 2916e44..f2f2b70 100644 --- a/gcc/ebitmap.h +++ b/gcc/ebitmap.h @@ -1,5 +1,5 @@ /* Sparse array based bitmaps. - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007, 2008 Free Software Foundation, Inc. This file is part of GCC. @@ -95,7 +95,13 @@ ebitmap_iter_init (ebitmap_iterator *i, ebitmap bmp, unsigned int min) min / EBITMAP_ELT_BITS); i->size = bmp->numwords; if (i->size == 0) - return; + { + i->ptr = NULL; + i->eltnum = 0; + i->bit_num = 0; + i->word = 0; + return; + } i->ptr = bmp->elts; i->bit_num = min; i->eltnum = 0; diff --git a/gcc/ipa-struct-reorg.c b/gcc/ipa-struct-reorg.c index d1d7b1c..cde905e 100644 --- a/gcc/ipa-struct-reorg.c +++ b/gcc/ipa-struct-reorg.c @@ -1865,8 +1865,9 @@ gen_struct_type (tree decl, tree new_str_type) wr.wrap = 0; wr.domain = NULL_TREE; } - else if (TREE_CODE (type_orig) == ARRAY_TYPE) + else { + gcc_assert (TREE_CODE (type_orig) == ARRAY_TYPE); wr.wrap = 1; wr.domain = TYPE_DOMAIN (type_orig); } |