http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56526



             Bug #: 56526

           Summary: [4.8 regression] false positive for

                    maybe-uninitialized

    Classification: Unclassified

           Product: gcc

           Version: 4.8.0

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: middle-end

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: m...@use.net





I haven't tracked down when this started happening, but it's a regression from

fsf/4.7 and google/4.7, as well as trunk from some months ago.



/work/mhargett/gcc-trunk-lto-O3/./prev-gcc/xg++

-B/work/mhargett/gcc-trunk-lto-O3/./prev-gcc/

-B/u/mhargett/x86_64-unknown-linux-gnu/bin/ -nostdinc++

-B/work/mhargett/gcc-trunk-lto-O3/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs

-B/work/mhargett/gcc-trunk-lto-O3/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs

-I/work/mhargett/gcc-trunk-lto-O3/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu

-I/work/mhargett/gcc-trunk-lto-O3/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include

-I/work/mhargett/gcc-trunk/libstdc++-v3/libsupc++

-L/work/mhargett/gcc-trunk-lto-O3/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs

-L/work/mhargett/gcc-trunk-lto-O3/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs

  -O3 -g -flto=jobserver -frandom-seed=1 -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 -static-libstdc++ -static-libgcc  gcc-nm.o -o gcc-nm \

                file-find.o libcommon.a ../libcpp/libcpp.a  

../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a

../libdecnumber/libdecnumber.a

../../gcc-trunk/libiberty/simple-object-mach-o.c: In function

'simple_object_mach_o_find_sections':

../../gcc-trunk/libiberty/simple-object-mach-o.c:653:37: error:

'wrapper_sect_offset' may be used uninitialized in this function

[-Werror=maybe-uninitialized]

     secoffset = wrapper_sect_offset + subsect_offset;

                                     ^

lto1: all warnings being treated as errors

make[4]: *** [/tmp/ccGVpjK3.ltrans21.ltrans.o] Error 1

../../gcc-trunk/libiberty/simple-object-mach-o.c: In function

'simple_object_mach_o_find_sections':

../../gcc-trunk/libiberty/simple-object-mach-o.c:653:37: error:

'wrapper_sect_offset' may be used uninitialized in this function

[-Werror=maybe-uninitialized]

     secoffset = wrapper_sect_offset + subsect_offset;

                                     ^

lto1: all warnings being treated as errors

make[4]: *** [/tmp/ccGVpjK3.ltrans21.ltrans.o] Error 1

lto-wrapper: make returned 2 exit status

/u/mhargett/x86_64-unknown-linux-gnu/bin/ld: lto-wrapper failed

collect2: error: ld returned 1 exit status

make[3]: *** [lto-wrapper] Error 1

make[3]: *** Waiting for unfinished jobs....

mv -f Tcollect2 collect2

make[3]: Leaving directory `/work/mhargett/gcc-trunk-lto-O3/gcc'

make[2]: *** [all-stage2-gcc] Error 2



wrapper_sect_offset is initialized in the block predicated by

((gnu_sections_found & SOMO_WRAPPING) != 0), and is only accessed in a block

with the same (outer) predicate.



reproduced with bootstrap-lto on current trunk with -O3. save-temp outputs are

attached.

Reply via email to