This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/19032] modulo generates wrong result for divisor -1
- From: "Thomas dot Koenig at online dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Dec 2004 22:40:15 -0000
- Subject: [Bug libfortran/19032] modulo generates wrong result for divisor -1
- References: <20041216112828.19032.Thomas.Koenig@online.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From Thomas dot Koenig at online dot de 2004-12-16 22:40 -------
Reals are also broken:
$ cat mod-real.f90
program main
real :: a,b
a = 2.0
b = -1.0
print *,modulo(a,b)
end program main
$ gfortran mod-real.f90
$ ./a.out
-1.000000
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19032