Bug 53866 - [4.8 Regression] lto-bootstrap failed at -O3
Summary: [4.8 Regression] lto-bootstrap failed at -O3
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: 4.8.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-05 13:40 UTC by H.J. Lu
Modified: 2012-12-21 10:35 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 H.J. Lu 2012-07-05 13:40:31 UTC
On Linux/ia32, revision 189288 gave

/export/build/gnu/gcc-lto-32bit/build-i686-linux/./prev-gcc/g++ -B/export/build/gnu/gcc-lto-32bit/build-i686-linux/./prev-gcc/ -B/usr/gcc-4.8.0/i686-linux/bin/ -nostdinc++ -B/export/build/gnu/gcc-lto-32bit/build-i686-linux/prev-i686-linux/libstdc++-v3/src/.libs -B/export/build/gnu/gcc-lto-32bit/build-i686-linux/prev-i686-linux/libstdc++-v3/libsupc++/.libs -I/export/build/gnu/gcc-lto-32bit/build-i686-linux/prev-i686-linux/libstdc++-v3/include/i686-linux -I/export/build/gnu/gcc-lto-32bit/build-i686-linux/prev-i686-linux/libstdc++-v3/include -I/export/gnu/import/git/gcc/libstdc++-v3/libsupc++ -L/export/build/gnu/gcc-lto-32bit/build-i686-linux/prev-i686-linux/libstdc++-v3/src/.libs -L/export/build/gnu/gcc-lto-32bit/build-i686-linux/prev-i686-linux/libstdc++-v3/libsupc++/.libs -c  -DIN_GCC_FRONTEND -O3 -mfpmath=sse -msse2 -funroll-loops -ffast-math -flto=jobserver -frandom-seed=1 -DIN_GCC   -fno-exceptions -fno-rtti -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. -Ic -I/export/gnu/import/git/gcc/gcc -I/export/gnu/import/git/gcc/gcc/c -I/export/gnu/import/git/gcc/gcc/../include -I/export/gnu/import/git/gcc/gcc/../libcpp/include  -I/export/gnu/import/git/gcc/gcc/../libdecnumber -I/export/gnu/import/git/gcc/gcc/../libdecnumber/bid -I../libdecnumber    /export/gnu/import/git/gcc/gcc/c/c-parser.c -o c/c-parser.o
/export/gnu/import/git/gcc/gcc/c/c-parser.c: In function \u2018c_parser_postfix_expression_after_primary(c_parser*, unsigned int, c_expr)\u2019:
/export/gnu/import/git/gcc/gcc/c/c-parser.c:6891:16: error: \u2018origtypes\u2019 may be used uninitialized in this function [-Werror=maybe-uninitialized]
Comment 1 H.J. Lu 2012-07-05 13:53:42 UTC
GCC was configured with

BOOT_CFLAGS="-O3 -mfpmath=sse -msse2 -funroll-loops -ffast-math" RUNTESTFLAGS="--target_board='unix'" /export/gnu/import/git/gcc/configure --enable-clocale=gnu --with-system-zlib --with-demangler-in-ld --enable-languages=c,c++,fortran i686-linux --prefix=/usr/gcc-4.8.0 --with-local-prefix=/usr/local --enable-gnu-indirect-function --with-build-config=bootstrap-lto --with-fpmath=sse

I also got

/export/gnu/import/git/gcc/libiberty/simple-object-mach-o.c: In function \u2018simple_object_mach_o_find_sections\u2019:
/export/gnu/import/git/gcc/libiberty/simple-object-mach-o.c:653:37: error: \u2018wrapper_sect_offset\u2019 may be used uninitialized in this function [-Werror=maybe-uninitialized]
     secoffset = wrapper_sect_offset + subsect_offset;
Comment 2 H.J. Lu 2012-07-05 14:10:28 UTC
Also

/export/gnu/import/git/gcc/gcc/bitmap.c:576:8: error: \u2018in_ready.indx\u2019 may be used uninitialized in this function [-Werror=maybe-uninitialized]
   else if (head->indx / 2 < indx)
        ^
In file included from /export/gnu/import/git/gcc/gcc/emit-rtl.c:6649:0,
                 from /export/gnu/import/git/gcc/gcc/config/i386/i386.md:3788,
                 from :6102:
/export/gnu/import/git/gcc/gcc/haifa-sched.c:7586:15: note: \u2018in_ready.indx\u2019 was declared here
   bitmap_head in_ready;
               ^
lto1: all warnings being treated as errors
make[5]: *** [/tmp/ccS5gs1T.ltrans9.ltrans.o] Error 1
Comment 3 H.J. Lu 2012-07-05 14:43:48 UTC
The problem seems LTO + O3, which leads many
-Werror=maybe-uninitialized error.
Comment 4 H.J. Lu 2012-07-05 18:04:08 UTC
This is triggered by -O3 when GCC is configured with

BOOT_CFLAGS="-O3" /export/gnu/import/git/gcc/configure --enable-clocale=gnu --with-system-zlib --with-demangler-in-ld --enable-languages=c,c++,fortran  --prefix=/usr/gcc-4.8.0 --with-local-prefix=/usr/local --enable-gnu-indirect-function --with-build-config=bootstrap-lto --with-fpmath=sse
Comment 5 Richard Biener 2012-09-19 13:42:32 UTC
I don't think we necessarily want to fix this ...
Comment 6 Andrew Pinski 2012-11-15 03:20:16 UTC
Does this still happen?
Comment 7 H.J. Lu 2012-11-15 20:31:18 UTC
Revision gave 193535:

/export/gnu/import/git/gcc/gcc/c/c-parser.c: In function \u2018c_parser_postfix_expression_after_primary(c_parser*, unsigned int, c_expr)\u2019: 
/export/gnu/import/git/gcc/gcc/c/c-parser.c:6917:16: error: \u2018origtypes\u2019 may be used uninitialized in this function [-Werror=maybe-uninitialized]
       origtypes);
Comment 8 Richard Biener 2012-12-21 10:35:49 UTC
Please use --disable-werror for non-standard flags / build configs.  We can't
possibly fix all warnings that may appear when you enable random flags.