public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, tree-ssa] Avoid -Wuninitialized warning in try_unroll_loop_completely()
@ 2013-04-14 12:52 Chung-Ju Wu
  2013-04-15 15:19 ` Jeff Law
  0 siblings, 1 reply; 5+ messages in thread
From: Chung-Ju Wu @ 2013-04-14 12:52 UTC (permalink / raw)
  To: gcc patches; +Cc: dnovillo, amacleod

[-- Attachment #1: Type: text/plain, Size: 404 bytes --]

Hi,

I noticed there is an uninitialized variable warning
when compiling tree-ssa-loop-ivcanon.c file.

Attached patch is a slight modification to avoid the warning
and a plaintext ChangeLog is as below.

Is it OK for trunk?


2013-04-14  Chung-Ju Wu  <jasonwucj@gmail.com>

        * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Avoid
        -Wuninitialized warning.


Best regards,
jasonwucj

[-- Attachment #2: gcc490-tree-ssa-loop-ivcanon.svn.patch --]
[-- Type: application/octet-stream, Size: 518 bytes --]

Index: gcc/tree-ssa-loop-ivcanon.c
===================================================================
--- gcc/tree-ssa-loop-ivcanon.c	(revision 197948)
+++ gcc/tree-ssa-loop-ivcanon.c	(working copy)
@@ -652,7 +652,8 @@
 			    HOST_WIDE_INT maxiter,
 			    location_t locus)
 {
-  unsigned HOST_WIDE_INT n_unroll, ninsns, max_unroll, unr_insns;
+  unsigned HOST_WIDE_INT n_unroll = 0;
+  unsigned HOST_WIDE_INT ninsns, max_unroll, unr_insns;
   gimple cond;
   struct loop_size size;
   bool n_unroll_found = false;

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-04-18 10:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-14 12:52 [PATCH, tree-ssa] Avoid -Wuninitialized warning in try_unroll_loop_completely() Chung-Ju Wu
2013-04-15 15:19 ` Jeff Law
2013-04-16  9:39   ` Chung-Ju Wu
2013-04-18  8:03     ` Jeff Law
2013-04-18 13:49       ` Chung-Ju Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).