This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/16865] New: False alarm about use of uninitialized variable breaks bootstrap at -O3
- From: "v dot haisman at sh dot cvut dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Aug 2004 20:31:23 -0000
- Subject: [Bug bootstrap/16865] New: False alarm about use of uninitialized variable breaks bootstrap at -O3
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Bootstrap with -O3 dies with error bellow. It is false alarm about use of
uninitialized variable. With -O2 the warning doesn't trigger.
make[2]: Entering directory `/home/4/wilx/tmp/gcc-head/objdir/gcc'
stage1/xgcc -Bstage1/ -B/home/4/wilx/i386-unknown-freebsd4.10/bin/ -c -O3 -g
-DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition -Werror
-fno-common -DHAVE_CONFIG_H -I. -I. -I../../srcdir/gcc -I../../srcdir/gcc/.
-I../../srcdir/gcc/../include -I../../srcdir/gcc/../libcpp/include
-I../../srcdir/gcc/../libbanshee/libcompat -I../../srcdir/gcc/../libbanshee
-I../../srcdir/gcc/../libbanshee/points-to ../../srcdir/gcc/loop-iv.c -o loop-iv.o
../../srcdir/gcc/loop-iv.c: In function `simplify_using_initial_values':
../../srcdir/gcc/loop-iv.c:1360: warning: 'lhs' may be used uninitialized in
this function
make[2]: *** [loop-iv.o] Error 1
make[2]: Leaving directory `/home/4/wilx/tmp/gcc-head/objdir/gcc'
make[1]: *** [stage2_build] Error 2
make[1]: Leaving directory `/home/4/wilx/tmp/gcc-head/objdir/gcc'
make: *** [bootstrap] Error 2
I've used this to unbreak the bootstrap:
Index: gcc/loop-iv.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/loop-iv.c,v
retrieving revision 2.13
diff -c -p -r2.13 loop-iv.c
*** gcc/loop-iv.c 27 Jul 2004 07:27:12 -0000 2.13
--- gcc/loop-iv.c 3 Aug 2004 20:22:07 -0000
*************** static void
*** 1357,1363 ****
simplify_using_assignment (rtx insn, rtx *expr, regset altered)
{
rtx set = single_set (insn);
! rtx lhs, rhs;
bool ret = false;
if (set)
--- 1357,1363 ----
simplify_using_assignment (rtx insn, rtx *expr, regset altered)
{
rtx set = single_set (insn);
! rtx lhs = 0, rhs;
bool ret = false;
if (set)
--
Summary: False alarm about use of uninitialized variable breaks
bootstrap at -O3
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: v dot haisman at sh dot cvut dot cz
CC: gcc-bugs at gcc dot gnu dot org,v dot haisman at sh dot
cvut dot cz
GCC build triplet: i386-unknown-freebsd4.10
GCC host triplet: i386-unknown-freebsd4.10
GCC target triplet: i386-unknown-freebsd4.10
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16865