Bug 55054 - -Wuninitialized warning in tree-ssa-loop-ivcanon.c
Summary: -Wuninitialized warning in tree-ssa-loop-ivcanon.c
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Marek Polacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-24 13:25 UTC by Marek Polacek
Modified: 2012-10-25 07:39 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Polacek 2012-10-24 13:25:28 UTC
Building gcc on x86_64 with gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2) says:

/home/marek/src/gcc/gcc/tree-ssa-loop-ivcanon.c: In function ‘bool canonicalize_loop_induction_variables(loop*, bool, unroll_level, bool, bool*, bitmap)’:
/home/marek/src/gcc/gcc/tree-ssa-loop-ivcanon.c:518:46: warning: ‘n_unroll’ may be used uninitialized in this function [-Wuninitialized]
/home/marek/src/gcc/gcc/tree-ssa-loop-ivcanon.c:404:26: note: ‘n_unroll’ was declared here

Just setting n_unroll to 0 is enough.
Comment 1 Marek Polacek 2012-10-24 13:26:38 UTC
I have a patch that passed bootstrapping/testing.
Comment 2 Richard Biener 2012-10-24 14:14:35 UTC
Building with the host compiler?  We generally don't fix warnings if they
are not really bugs for the host compiler ...
Comment 3 Marek Polacek 2012-10-24 14:52:04 UTC
Ok, sorry.  Then we should probably close this one as INVALID...
Comment 4 Marek Polacek 2012-10-25 07:39:19 UTC
Closing.