[PATCH] initialize var in var-tracking.c to eliminate warning

Janis Johnson janis187@us.ibm.com
Fri Oct 21 19:58:00 GMT 2005


Bootstrap of powerpc64-linux with BOOT_CFLAGS="-g -O3" fails with a
warning about a variable that might be used uninitialized.  It seems
to be a legitimate warning.  This patch was bootstrapped on
powerpc64-linux, but I didn't run regression tests.

OK for mainline when it's open for non-regression fixes?  Or now, since
at some time in the past it probably worked to bootstrap with -O3?

2005-10-21  Janis Johnson  <janis187@us.ibm.com>

	* var-tracking.c (vt_initialize): Initialize post.

Index: gcc/var-tracking.c
===================================================================
RCS file: /opt/gcc-cvs/gcc/gcc/var-tracking.c,v
retrieving revision 2.32
diff -u -p -r2.32 var-tracking.c
--- gcc/var-tracking.c	7 Sep 2005 07:47:15 -0000	2.32
+++ gcc/var-tracking.c	21 Oct 2005 19:55:58 -0000
@@ -2516,7 +2516,7 @@ vt_initialize (void)
   FOR_EACH_BB (bb)
     {
       rtx insn;
-      HOST_WIDE_INT pre, post;
+      HOST_WIDE_INT pre, post = 0;
 
       /* Count the number of micro operations.  */
       VTI (bb)->n_mos = 0;



More information about the Gcc-patches mailing list