This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran, committed] Add LANG=C to libgfortran/mk-kinds-h.sh
- From: Tobias Burnus <burnus at net-b dot de>
- To: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, "'fortran at gcc dot gnu dot org'" <fortran at gcc dot gnu dot org>
- Date: Fri, 26 Oct 2007 22:12:24 +0200
- Subject: Re: [Patch, Fortran, committed] Add LANG=C to libgfortran/mk-kinds-h.sh
- References: <472239EC.3070309@net-b.de> <47223CBA.8080609@physik.uni-muenchen.de>
Tobias Schlüter wrote:
> Tobias Burnus wrote:
>> After getting failures when building GCC with a non-English locale, I
>> found out that
>>
>> huge=`$compile -c -fdump-parse-tree tmq$$.f90 | grep TRANSFER \
>> | sed 's/ *TRANSFER *// ; s/_.*//'`
>
> Since I couldn't find this expression, and since I can't think of an
> occasion where one would both want to match TRANSFER and where it's a
> good idea to translate it, I'm curious: could you say where or how
> this happens?
Did you do an "svn up"? The line was checked in this morning by FX.
Thus you really should have this line or SVN has serious troubles.
The problem was that GFC_REAL_16_HUGE etc. were sometimes different in
the library than huge(0.0_16) of the compiler.
Namely, on PowerPC and MIPS huge(0.0_16) is not LDBL_MAX.
See:
http://gcc.gnu.org/ml/fortran/2007-09/msg00466.html
and
http://gcc.gnu.org/ml/gcc-patches/2007-10/msg00515.html
Now the following is used in libgfortran/mk-kinds-h.sh:
# Check for the value of HUGE
echo "print *, huge(0._$k) ; end" > tmq$$.f90
huge=`$compile -c -fdump-parse-tree tmq$$.f90 | grep TRANSFER \
| sed 's/ *TRANSFER *// ; s/_.*//'`
And "gfortran -fdump-parse-tree c.f90" shows than:
[...]
WRITE UNIT=6 FMT=-1
TRANSFER 3.40282347e38
DT_END
which is, e.g., with a German locale translated to the barely readable
SCHREIBEN EINHEIT=6 FMT=-1
ÜBERTRAGUNG 3.40282347e38
DT_END
and thus the grep fails.
Tobias