This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/40019] LEADZ and TRAILZ give wrong results
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 May 2009 10:27:59 -0000
- Subject: [Bug fortran/40019] LEADZ and TRAILZ give wrong results
- References: <bug-40019-10259@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from fxcoudert at gcc dot gnu dot org 2009-05-27 10:27 -------
(In reply to comment #1)
> I don't think your patch fixes the following,
>
> print *, leadz(-1_1), leadz(-1_2), leadz(-1_4), leadz(-1_8), leadz(-1_16)
>
> which yields
>
> 7 15 31 63 127
I think it does:
$ cat h.f90
print *, leadz(-1_1), leadz(-1_2), leadz(-1_4), leadz(-1_8), leadz(-1_16)
end
$ gfortran h.f90 && ./a.out
0 0 0 0 0
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40019