This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix -Os bootstrap


The compiler doesn't bootstrap at -Os because of 3 warnings triggered by 
-Wuninitialized.  They are legitimate but the code looks OK in all cases.

Bootstrapped/regtested on i586-suse-linux, applied on the mainline as obvious.


2007-11-01  Eric Botcazou  <ebotcazou@libertysurf.fr>

	* optabs.c (prepare_cmp_insn): Merge a couple of conditional blocks.
	* sched-rgn.c (compute_trg_info): Zero 'el' local variable.
	* tree-if-conv.c (process_phi_nodes): Zero 'cond' local variable.


-- 
Eric Botcazou
Index: optabs.c
===================================================================
--- optabs.c	(revision 129762)
+++ optabs.c	(working copy)
@@ -4275,16 +4275,15 @@ prepare_cmp_insn (rtx *px, rtx *py, enum
   if (libfunc && !SCALAR_FLOAT_MODE_P (mode))
     {
       rtx result;
-      rtx ulibfunc;
 
       /* If we want unsigned, and this mode has a distinct unsigned
 	 comparison routine, use that.  */
       if (unsignedp)
 	{
-	  ulibfunc = optab_libfunc (ucmp_optab, mode);
+	  rtx ulibfunc = optab_libfunc (ucmp_optab, mode);
+	  if (ulibfunc)
+	    libfunc = ulibfunc;
 	}
-      if (unsignedp && ulibfunc)
-	libfunc = ulibfunc;
 
       result = emit_library_call_value (libfunc, NULL_RTX, LCT_CONST_MAKE_BLOCK,
 					targetm.libgcc_cmp_return_mode (),
Index: sched-rgn.c
===================================================================
--- sched-rgn.c	(revision 129762)
+++ sched-rgn.c	(working copy)
@@ -1341,7 +1341,7 @@ static void
 compute_trg_info (int trg)
 {
   candidate *sp;
-  edgelst el;
+  edgelst el = { NULL, 0 };
   int i, j, k, update_idx;
   basic_block block;
   sbitmap visited;
Index: tree-if-conv.c
===================================================================
--- tree-if-conv.c	(revision 129762)
+++ tree-if-conv.c	(working copy)
@@ -873,7 +873,7 @@ process_phi_nodes (struct loop *loop)
   /* Replace phi nodes with cond. modify expr.  */
   for (i = 1; i < orig_loop_num_nodes; i++)
     {
-      tree phi, cond;
+      tree phi, cond = NULL_TREE;
       block_stmt_iterator bsi;
       basic_block true_bb = NULL;
       bb = ifc_bbs[i];

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]