From patchwork Mon May 30 09:46:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: initialized out.clauses in read_predicate Date: Sun, 29 May 2011 23:46:26 -0000 From: Alexandre Oliva X-Patchwork-Id: 97897 Message-Id: To: gcc-patches@gcc.gnu.org In an -O3 bootstrap, out.clauses are reported as uninitialized. GCC is not smart enough to realize accesses to the uninitialized members will never happen. It shouldn't be too expensive to initialize them all, so this is what this patch does. Regstrapped on x86_64-linux-gnu and i686-linux-gnu. Ok to install? for gcc/ChangeLog from Alexandre Oliva * ipa-inline-analysis.c (read_predicate): Initialize all clauses. Index: gcc/ipa-inline-analysis.c =================================================================== --- gcc/ipa-inline-analysis.c.orig 2011-05-18 03:29:08.295328903 -0300 +++ gcc/ipa-inline-analysis.c 2011-05-18 03:29:38.187242177 -0300 @@ -2289,6 +2289,11 @@ read_predicate (struct lto_input_block * clause = out.clause[k++] = lto_input_uleb128 (ib); } while (clause); + + /* Zero-initialize the remaining clauses in OUT. */ + while (k <= MAX_CLAUSES) + out.clause[k++] = 0; + return out; }