User account creation filtered due to spam.

Bug 55496 - False positive -Werror=uninitialized breaks profiledbootstrap and bootstrap-lto
Summary: False positive -Werror=uninitialized breaks profiledbootstrap and bootstrap-lto
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: build, diagnostic
Depends on:
Blocks:
 
Reported: 2012-11-27 21:27 UTC by H.J. Lu
Modified: 2016-10-22 07:50 UTC (History)
2 users (show)

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 H.J. Lu 2012-11-27 21:27:39 UTC
On Linux/x86-64, revision 193864 configured with

--prefix=/usr/4.8.0 --enable-clocale=gnu --with-system-zlib --enable-shared --with-demangler-in-ld --with-build-config=bootstrap-lto --with-fpmath=sse --enable-languages=c,c++,fortran,java,lto,objc

and built with

make bld profiledbootstrap -j 8

on a 8-core machine gave

/export/gnu/import/git/gcc-test-profile/bld/./prev-gcc/g++ -B/export/gnu/import/git/gcc-test-profile/bld/./prev-gcc/ -B/usr/4.8.0/x86_64-unknown-linux-gnu/bin/ -nostdinc++ -B/export/gnu/import/git/gcc-test-profile/bld/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -B/export/gnu/import/git/gcc-test-profile/bld/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -I/export/gnu/import/git/gcc-test-profile/bld/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu -I/export/gnu/import/git/gcc-test-profile/bld/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include -I/export/gnu/import/git/gcc-test-profile/src-trunk/libstdc++-v3/libsupc++ -L/export/gnu/import/git/gcc-test-profile/bld/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/export/gnu/import/git/gcc-test-profile/bld/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -c   -g -O2 -flto=jobserver -frandom-seed=1 -fprofile-use -DIN_GCC   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H -I. -I. -I../../src-trunk/gcc -I../../src-trunk/gcc/. -I../../src-trunk/gcc/../include -I../../src-trunk/gcc/../libcpp/include  -I../../src-trunk/gcc/../libdecnumber -I../../src-trunk/gcc/../libdecnumber/bid -I../libdecnumber -I../../src-trunk/gcc/../libbacktrace    ../../src-trunk/gcc/cfg.c -o cfg.o
../../src-trunk/gcc/cfg.c: In function 'scale_bbs_frequencies_gcov_type(basic_block_def**, int, long, long)':
../../src-trunk/gcc/cfg.c:945:8: error: 'e' may be used uninitialized in this function [-Werror=uninitialized]
   edge e;
cc1plus: all warnings being treated as errors
make[6]: *** [cfg.o] Error 1
make[6]: *** Waiting for unfinished jobs....
rm gcj-dbtool.pod jcf-dump.pod jv-convert.pod grmic.pod gcov.pod gcj.pod gc-analyze.pod gfdl.pod cpp.pod gij.pod gfortran.pod gcc.pod fsf-funding.pod
make[6]: Leaving directory `/export/gnu/import/git/gcc-test-profile/bld/gcc'
make[5]: *** [all-stagefeedback-gcc] Error 2
make[5]: Leaving directory `/export/gnu/import/git/gcc-test-profile/bld'
make[4]: *** [stagefeedback-bubble] Error 2
make[4]: Leaving directory `/export/gnu/import/git/gcc-test-profile/bld'
make[3]: *** [profiledbootstrap] Error 2
make[3]: Leaving directory `/export/gnu/import/git/gcc-test-profile/bld'
11063.14user 498.20system 41:50.07elapsed 460%CPU (0avgtext+0avgdata 521396maxresident)k
55104inputs+14523280outputs (2major+111666564minor)pagefaults 0swaps
make[2]: *** [profiledbootstrap] Error 2
Comment 1 Matt Hargett 2013-02-13 02:08:02 UTC
Confirmed on current trunk, verified that it's not an issue in google/4_7 branch. Only happens with profiledbootstrap and bootstrap-lto. 

/var/lib/jenkins/jobs/gcc-trunk-lto-profiledbootstrap/workspace/obj/./prev-gcc/xg++ -B/var/lib/jenkins/jobs/gcc-trunk-lto-profiledbootstrap/workspace/obj/./prev-gcc/ -B/var/lib/jenkins/jobs/gcc-trunk-lto-profiledbootstrap/workspace/gcc-trunk-r195990/x86_64-unknown-linux-gnu/bin/ -nostdinc++ -B/var/lib/jenkins/jobs/gcc-trunk-lto-profiledbootstrap/workspace/obj/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -B/var/lib/jenkins/jobs/gcc-trunk-lto-profiledbootstrap/workspace/obj/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -I/var/lib/jenkins/jobs/gcc-trunk-lto-profiledbootstrap/workspace/obj/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu -I/var/lib/jenkins/jobs/gcc-trunk-lto-profiledbootstrap/workspace/obj/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include -I/var/lib/jenkins/jobs/gcc-trunk-lto-profiledbootstrap/workspace/libstdc++-v3/libsupc++ -L/var/lib/jenkins/jobs/gcc-trunk-lto-profiledbootstrap/workspace/obj/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/var/lib/jenkins/jobs/gcc-trunk-lto-profiledbootstrap/workspace/obj/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -c   -g -O2 -flto=jobserver -frandom-seed=1 -fprofile-use -DIN_GCC   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include  -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/bid -I../libdecnumber -I../../gcc/../libbacktrace    ../../gcc/cfg.c -o cfg.o
../../gcc/cfg.c: In function 'scale_bbs_frequencies_gcov_type(basic_block_def**, int, long, long)':
../../gcc/cfg.c:943:8: error: 'e' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   edge e;
        ^
cc1plus: all warnings being treated as errors
make[3]: *** [cfg.o] Error 1
Comment 2 Manuel López-Ibáñez 2016-08-23 16:15:27 UTC
Without a reduced testcase, it is impossible to know what the problem is.
Comment 3 Andrew Pinski 2016-10-22 07:50:18 UTC
Does this still happen?