[Discuss] Test for positive gives wacko results for underflowed
values for the gcc compiler suite (including the gcc compiler,
and g77 and gfortran compilers)
Alan W. Irwin
irwin at beluga.phys.uvic.ca
Mon Jun 25 14:36:45 PDT 2007
On 2007-06-25 14:12-0700 pw wrote:
> Alan W. Irwin wrote:
>> Is this a gcc (and g77 and gfortran) issue? I would appreciate it if
>> somebody would run the above C test codes with different C
>> compilers/platforms.
>>
>> Alan
>
>
> I get the same thing.
>
> Intel core duo:
>
> gfortran -v
> Using built-in specs.
> Target: i386-pc-mingw32
> Configured with: ../trunk/configure --prefix=/mingw
> --enable-languages=c,fortran --with-gmp=/home/coudert/local --disable-nls
> --with-ld=/mingw/bin/ld --with-as=/mingw/bin/as --disable-werror
> --enable-bootstrap --enable-threads --build=i386-pc-mingw32 --disable-shared
> --enable-libgomp
> Thread model: win32
> gcc version 4.3.0 20070522 (experimental)
Thanks, Peter, for confirming the problem still exists for modern (version
4.3.0) gfortran.
I should have said that on my Ubuntu system my gfortran version is "GNU
Fortran 95 (GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5))" while my gcc version is "gcc
(GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5)".
I also get the same bad results on my Debian sarge system which has g77
version "GNU Fortran (GCC) 3.3.5 (Debian 1:3.3.5-13)" and gcc version
"gcc (GCC) 3.3.5 (Debian 1:3.3.5-13)".
Python gives the correct results both on my Ubuntu system
(Python 2.4.3) and my older Debian system (Python 2.3.5).
Does anybody have access to non-gcc fortran or C compilers (such as the Intel
ones)? A non-gcc test result would be most interesting.
Alan
__________________________
Alan W. Irwin
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________
Linux-powered Science
__________________________
More information about the Discuss
mailing list