Fix bootstrap failure due to uninitialized variable in optabs.c

Zack Weinberg zack@codesourcery.com
Mon Sep 3 19:53:00 GMT 2007


I have checked this patch in to fix the bootstrap failure caused by my 
earlier patch.  What I get for testing only with cross compilers, I 
suppose.  The warning is, for the record, one of the classic 
used-and-set-only-under-the-same-conditional false positives.

zw

	* optabs.c (expand_ffs): Initialize val and defined_at_zero
	to avoid warnings.

==================================================================
--- optabs.c    (revision 128112)
+++ optabs.c    (local)
@@ -2702,8 +2702,8 @@ expand_ctz (enum machine_mode mode, rtx
  static rtx
  expand_ffs (enum machine_mode mode, rtx op0, rtx target)
  {
-  HOST_WIDE_INT val;
-  bool defined_at_zero;
+  HOST_WIDE_INT val = 0;
+  bool defined_at_zero = false;
    rtx temp, seq;

    if (optab_handler (ctz_optab, mode)->insn_code != CODE_FOR_nothing)



More information about the Gcc-patches mailing list