This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/51418] Fortran format sp,f0.0 output wrong with NaN and 0.0
- From: "John.Harper at msor dot vuw.ac.nz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 05 Dec 2011 21:01:09 +0000
- Subject: [Bug fortran/51418] Fortran format sp,f0.0 output wrong with NaN and 0.0
- Auto-submitted: auto-generated
- References: <bug-51418-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51418
--- Comment #2 from John.Harper at msor dot vuw.ac.nz 2011-12-05 21:01:09 UTC ---
Thank you. I have had absolutely no luck trying to build GCC (I got as
far as configure appearing to complete OK but make ended with
checking whether ln -s works... yes
checking for i386-redhat-linux-gnu-gcc... /tmp/gccobj/./gcc/xgcc
-B/tmp/gccobj/./gcc/ -B/tmp/i386-redhat-linux-gnu/bin/
-B/tmp/i386-redhat-linux-gnu/lib/ -isystem
/tmp/i386-redhat-linux-gnu/include -isystem
/tmp/i386-redhat-linux-gnu/sys-include
checking for suffix of object files... configure: error: in
`/tmp/gccobj/i386-redhat-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[1]: *** [configure-target-libgcc] Error 1
make[1]: Leaving directory `/tmp/gccobj'
make: *** [all] Error 2
Unfortunately neither that nor config.log told me what I must change.
I had to build gcc in /tmp because my own disk space can't hold the whole
of gcc, which is several hundred Mb. G95 is much smaller. However I built
GMP, MPFR and MPC in my own root directory. Another problem: my system is
i386 and the build I found is i686. I don't know if the difference is
important. Also, the gfortran installation instructions say
Install using the following command:
tar -xzvf gfortran-4.5-linux-i686.tar.gz -C /
This will install gfortran in /usr/local/gfortran
but they do not say what to do if one is not a superuser so can't put
things in /usr/local .
Assuming that what I had to do was
tar -xzvf /tmp/gcc_2011-11-26.tgz -C /tmp
I then tried that and found an executable file
/tmp/gcc_2011-11-26/run/bin/gfortran
but the command /tmp/gcc_2011-11-26/run/bin/gfortran -v gave
/tmp/gcc_2011-11-26/run/bin/gfortran: /lib/libc.so.6: version `GLIBC_2.11'
not found (required by /tmp/gcc_2011-11-26/run/bin/gfortran)
What must I do now to finish installing gfortran? (I made a workaround
for my original problem by writing a Fortran 95 module to simulate F0.n
output. That revealed an error in the Intel compiler which I reported,
but g95 and gfortran 4.4 worked properly with it!)
On Mon, 5 Dec 2011, burnus at gcc dot gnu.org wrote:
> Date: Mon, 5 Dec 2011 08:40:49 +0000
> From: burnus at gcc dot gnu.org <gcc-bugzilla@gcc.gnu.org>
> To: john.harper@vuw.ac.nz
> Subject: [Bug fortran/51418] Fortran format sp,
> f0.0 output wrong with NaN and 0.0
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51418
>
> Tobias Burnus <burnus at gcc dot gnu.org> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> CC| |burnus at gcc dot gnu.org
>
> --- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-12-05 08:40:49 UTC ---
> (In reply to comment #0)
>> This 6-line program prints " NaN" when IMHO it should print "NaN" and "+."
>> when IMHO it should print "+0."
>> gcc version 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC)
>> gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
>
> With GCC 4.7 and 4.6.2, I get:
> "NaN"
> "+0."
>
> However, with GCC 4.5.3 20110428, I get:
> " NaN"
> "**"
>
> Thus, it must have been fixed in 4.6 - either 4.6.0 or later. I saw some
> I/O-format-related changes around 2011-04-29 and some others around 2011-02-28.
>
>
> As it is no regression, an (inconvenient but) minor issue, and as I/O format
> fixes tend to have unexpected side effects, I do not think that the patches
> will be back ported to 4.5 or even 4.4.
>
>
> Thus, if the bug is a show stopper, you could try to install (possibly parallel
> to 4.4) a newer GCC/gfortran. For instance, Fedora 16 ships with GCC 4.6 and
> Ubuntu offers it as personal builds (cf.
> http://gcc.gnu.org/wiki/GFortranDistros). There is also a gfortran developer
> build for i386-linux at http://gcc.gnu.org/wiki/GFortranBinaries, which you
> could use - or you build GCC yourself.
>
> If it is no show stopper, you could also simply wait for the next Ubuntu
> version or - for RHEL - for a 6.x version with a newer GCC as technical
> preview.
>
> Thanks for reporting the bug!
>
> --
> Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You reported the bug.
>
-- John Harper, School of Mathematics Statistics and Operations Research
Victoria University, PO Box 600, Wellington 6140, New Zealand
e-mail john.harper@vuw.ac.nz phone (+64)(4)463 5276 fax (+64)(4)463 5045