Bug 53449 - [4.8 regression] fortran fails to build with LTO bootstrap
Summary: [4.8 regression] fortran fails to build with LTO bootstrap
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: 4.8.0
Assignee: Uroš Bizjak
URL: http://gcc.gnu.org/ml/gcc-patches/201...
Keywords: build, diagnostic
Depends on:
Blocks:
 
Reported: 2012-05-22 10:07 UTC by vincenzo Innocente
Modified: 2012-07-05 07:27 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2012-07-04 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vincenzo Innocente 2012-05-22 10:07:21 UTC
with revision 187761
I now get an error while building fortran 

In file included from ../../gcc-trunk/gcc/fortran/trans-common.c:1310:0,
                 from ./gt-fortran-trans-io.h:88,
                 from :4794:
../../gcc-trunk/gcc/fortran/parse.c: In function 'gfc_parse_file':
../../gcc-trunk/gcc/fortran/parse.c:4603:60: error: 'errors_before' may be used uninitialized in this function [-Werror=maybe-uninitialized]
       gfc_dump_module (s.sym->name, errors_before == errors);
                                                            ^
In file included from ../../gcc-trunk/gcc/fortran/trans-common.c:1310:0,
                 from ./gt-fortran-trans-io.h:88,
                 from :4794:
../../gcc-trunk/gcc/fortran/parse.c:4487:21: note: 'errors_before' was declared here
   int seen_program, errors_before, errors;
                     ^
lto1: all warnings being treated as errors
make[4]: *** [/tmp/innocent/ccixchHw.ltrans30.ltrans.o] Error 1

configuration that fails
../gcc-trunk/configure --prefix=/afs/cern.ch/user/i/innocent/w2 --enable-languages=c,c++,fortran -enable-gold=yes --enable-lto --with-build-config=bootstrap-lto --with-gmp-lib=/usr/local/lib64 --with-mpfr-lib=/usr/local/lib64 -with-mpc-lib=/usr/local/lib64 --enable-cloog-backend=isl --with-cloog=/usr/local --with-ppl-lib=/usr/local/lib64 CFLAGS='-O2 -ftree-vectorize -fPIC' CXXFLAGS='-O2 -fPIC -ftree-vectorize -fvisibility-inlines-hidden -march=native' -enable-libitm -disable-multilib

configuration that succeeds
../gcc-trunk/configure --enable-languages=c,c++,fortran --disable-multilib --enable-gold=yes --disable-nls --enable-lto --with-mpc=/afs/cern.ch/cms/slc5_amd64_gcc470/external/gcc/4.7.0 --with-gmp=/afs/cern.ch/cms/slc5_amd64_gcc470/external/gcc/4.7.0 --with-mpfr=/afs/cern.ch/cms/slc5_amd64_gcc470/external/gcc/4.7.0 --prefix=/afs/cern.ch/user/i/innocent/w3/gcc47slc5
Comment 1 Richard Biener 2012-05-22 10:25:13 UTC
LTO bootstrap I suppose.
Comment 2 Richard Biener 2012-07-04 13:59:15 UTC
Frontend issue (if it still prevails).
Comment 3 Uroš Bizjak 2012-07-04 14:12:31 UTC
(In reply to comment #2)
> Frontend issue (if it still prevails).

Patch at [1].

[1] http://gcc.gnu.org/ml/gcc-patches/2012-07/msg00145.html
Comment 4 uros 2012-07-05 07:22:25 UTC
Author: uros
Date: Thu Jul  5 07:22:17 2012
New Revision: 189281

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189281
Log:
	* expmed.c (expand_mult): Initialize coeff and is_neg.

java/ChangeLog:

	* jcf-io.c (read_zip_member): Initialize d_stream.

fortran/ChangLog:

	PR fortran/53449
	* parse.c (gfc_parse_file): Initialize errors_before.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/expmed.c
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/parse.c
    trunk/gcc/java/ChangeLog
    trunk/gcc/java/jcf-io.c
Comment 5 Uroš Bizjak 2012-07-05 07:27:54 UTC
Fixed.