This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Internal compiler error


Daniel Carrera wrote:
I tried to compile your patch; however, it fails with:

On my systems those unused variables only give "warnings", so I didn't notice them until after I set the patch. How do you compile GCC? You must have some extra flag that tells is to stop compiling when it encounters unused variables. This is how I compile GCC:


../configure --enable-languages=c,fortran --disable-bootstrap

The special compile flag is -Werror, i.e. warning are treated as errors. I think -Werror is the default (for parts of the compiler) when bootstapping - but seemingly not with --disable-bootstrap.


Thus, one seemingly needs to check manually whether there are warning, if one does not bootstrap. - Otherwise, one might break bootstrapping.

(If one breaks bootstrapping, one blocks others. Thus, no patch should break bootstrapping. It still happens occasionally and a unused-variable warning can also easily be fixed (by others), but, nevertheless, one should try hard to avoid it.)

Note: Not all files of the compiler are compiled with -Werror, e.g. libgfortran is not. (Otherwise, it fails to build on some systems). Thus, one should - from time to time - manually check whether there is a warning - as warnings usually point to a real problem.

Tobias

PS: For completeness, I usually configure with:

--enable-gold --with-plugin-ld=/usr/bin/gold --enable-languages=c,fortran,c++

That uses /usr/bin/ld by default, but with LTO (LD plugin) one uses GOLD, which allows for some additional link-time optimizations by including symbols from .a (static libraries) in the LTO optimization. (I forgot whether the normal GNU binutils's "ld" can now also be used for this; I think it at least supports linker plugins by now.)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]