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]

[committed] Fix PR bootstrap/16865: uninitialized variable


This fixes a small bootstrap problem when compiling with -O3 with -Werror turned on.
The reason why it does not trigger at -O2 is because altered_reg_used does not get
inlined so the variable is consided to take the address of so we cannot warn about that.


Committed as obvious.

Thanks,
Andrew Pinski

ChangeLog:

* loop-iv.c (simplify_using_assignment): Initialize lhs.

Index: loop-iv.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/loop-iv.c,v
retrieving revision 2.13
diff -u -p -r2.13 loop-iv.c
--- loop-iv.c   27 Jul 2004 07:27:12 -0000      2.13
+++ loop-iv.c   3 Aug 2004 21:08:19 -0000
@@ -1357,7 +1357,7 @@ static void
 simplify_using_assignment (rtx insn, rtx *expr, regset altered)
 {
   rtx set = single_set (insn);
-  rtx lhs, rhs;
+  rtx lhs = NULL_RTX, rhs;
   bool ret = false;

if (set)


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