------- Comment #4 from kargl at gcc dot gnu dot org  2009-03-28 03:02 -------
(In reply to comment #3)
> I chased this to airth.c line 1054:
> 
> mpz_pow_ui (result->value.integer, op1->value.integer, power);
> 
> The variable power is 268435472.
> 

On FreeBSD I get
REMOVE:kargl[6] gfc4x -o z a.f90
a.f90:2.12:

  print *, 2**huge(0) 
            1
Error: Arithmetic overflow at (1)
REMOVE:kargl[7] gfc43 -o z a.f90
a.f90:2.12:

  print *, 2**huge(0) 
           1
Error: Arithmetic overflow at (1)
REMOVE:kargl[8]

REMOVE:kargl[8] gfc4x --version
GNU Fortran (GCC) 4.4.0 20090308 (experimental) [trunk revision 140508]
REMOVE:kargl[9] gfc43 --version
GNU Fortran (GCC) 4.3.3 20081120 (prerelease)

REMOVE:kargl[11] pkg_info | grep gmp
libgmp-4.2.4        A free library for arbitrary precision arithmetic
REMOVE:kargl[12] pkg_info | grep mpfr
mpfr-2.4.1          A library for multiple-precision floating-point computation

Do your gmp/mpfr libraries pass their testsuites?  Do you have more
than one version of one of these libraries installed.

The error message indicates that gmp is broken or perhaps NetBSD's
malloc implementation.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39571

Reply via email to