http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
--- Comment #25 from Janne Blomqvist 2012-05-05
07:59:30 UTC ---
Author: jb
Date: Sat May 5 07:59:22 2012
New Revision: 187191
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187191
Log:
PR 49010,24518 MOD/MODULO fixes.
gcc/fortran:
201
--
pinskia at gcc dot gnu dot org changed:
What|Removed |Added
Target Milestone|--- |4.1.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518
--- Comment #24 from burnus at gcc dot gnu dot org 2006-12-02 08:23 ---
(In reply to comment #23)
> Just to let you know that the Fortran compiler has been broken for about a
> month on all Solaris versions (except release 10) with
I just filled this as PR30048.
--
http://gcc.gnu.o
--- Comment #23 from ebotcazou at gcc dot gnu dot org 2006-12-02 08:12
---
Just to let you know that the Fortran compiler has been broken for about a
month on all Solaris versions (except release 10) with:
Undefined first referenced
symbol
--- Comment #23 from chaoyingfu at gcc dot gnu dot org 2006-12-01 00:07
---
Subject: Bug 24518
Author: chaoyingfu
Date: Fri Dec 1 00:05:26 2006
New Revision: 119383
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119383
Log:
Merged revisions 118455-118543 via svnmerge from
svn
--- Comment #22 from pault at gcc dot gnu dot org 2006-11-10 21:52 ---
Subject: Bug 24518
Author: pault
Date: Fri Nov 10 21:52:00 2006
New Revision: 118666
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118666
Log:
2006-11-10 Paul Thomas <[EMAIL PROTECTED]>
Backport fro
--- Comment #21 from pault at gcc dot gnu dot org 2006-11-05 22:18 ---
Fixed on trunk and 4.2 - will soon be fixed on 4.1.
Paul
--
pault at gcc dot gnu dot org changed:
What|Removed |Added
--
--- Comment #20 from pault at gcc dot gnu dot org 2006-11-05 08:46 ---
Subject: Bug 24518
Author: pault
Date: Sun Nov 5 08:46:02 2006
New Revision: 118493
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118493
Log:
2006-11-05 Francois-Xavier Coudert <[EMAIL PROTECTED],org>
--- Comment #19 from pault at gcc dot gnu dot org 2006-11-05 06:27 ---
Subject: Bug 24518
Author: pault
Date: Sun Nov 5 06:27:48 2006
New Revision: 118492
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118492
Log:
2006-11-05 Francois-Xavier Coudert <[EMAIL PROTECTED],org>
--- Comment #16 from paul dot richard dot thomas at cea dot fr 2006-10-31
16:14 ---
Subject: RE: Intrinsic MOD incorrect for large arg1/arg2 and slow.
FX,
>
> --- Comment #15 from fxcoudert at gcc dot gnu dot org
> 2006-10-31 16:05 ---
> (In reply to comment #14)
> > It al
--- Comment #17 from pault at gcc dot gnu dot org 2006-10-31 16:21 ---
The fortran version of Uros' #13:
real(8) :: x
real(8) :: t = 0.0
x = 1000.0
do while (x > 0.0)
t = t + mod (x, 1.7e-8)
x = x - 1.0
end do
print *, t
end
Yields:
$ /irun/bin/gfortran -O2 -ma
--- Comment #15 from fxcoudert at gcc dot gnu dot org 2006-10-31 16:05
---
(In reply to comment #14)
> It also does MODULO correctly
Why not use remainder{f,,l}? Is it incorrect?
> although I am not sure that I understand why anybody
> would use this intrinsic knowingly!
Agreed :)
--- Comment #14 from pault at gcc dot gnu dot org 2006-10-31 15:56 ---
Created an attachment (id=12518)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12518&action=view)
A fix for the PR:
FX and Uros,
I believe that this correctly detects the presence of the built_in. It also
doe
--- Comment #18 from fxcoudert at gcc dot gnu dot org 2006-10-31 16:46
---
(In reply to comment #16)
> I understood that remainder (a, b) = a - round (a/b) * b, whereas
> mod (a, b) = a - int (a/b) * b
> and modulo (a, b) = a - floor (a/b) * b
Right you
--- Comment #13 from uros at kss-loka dot si 2006-10-26 22:22 ---
Just some performance numbers (sorry for the C testcase...) on x86_64:
--cut here--
#include
#include
int main()
{
double x;
double t = 0.0;
for (x = 1000.0; x > 0.0; x -= 1.0)
t += fmod (x, 1.7e-8);
p
--- Comment #12 from pault at gcc dot gnu dot org 2006-10-26 20:08 ---
FX and Steve,
I'll dig out my version of MOD and MODULO that uses the library call, if you
like. The availability of the builtin can be tested and the existing call
used, if not present. That I already did because
--- Comment #11 from sgk at troutmask dot apl dot washington dot edu
2006-10-26 04:03 ---
Subject: Re: Intrinsic MOD incorrect for large arg1/arg2 and slow.
On Wed, Oct 25, 2006 at 08:19:21AM -, fxcoudert at gcc dot gnu dot org
wrote:
>
> I'm adding Steve Kargl to the CC list, si
--- Comment #10 from uros at kss-loka dot si 2006-10-25 14:16 ---
(In reply to comment #9)
> > In the later case, expansion will fall-back to normal library call.
>
> OK. So on system where the math library doesn't have remainderl, for example,
> we shouldn't use BUILT_IN_REMAINDERL or
--- Comment #9 from fxcoudert at gcc dot gnu dot org 2006-10-25 13:53
---
(In reply to comment #8)
> In the later case, expansion will fall-back to normal library call.
OK. So on system where the math library doesn't have remainderl, for example,
we shouldn't use BUILT_IN_REMAINDERL or
--- Comment #8 from uros at kss-loka dot si 2006-10-25 11:48 ---
(In reply to comment #7)
> Just to be sure I understand: we are garanteed that BUILT_IN_REMAINDER{F,,L}
> and BUILT_IN_FMOD{F,,L} are always available, right?
Yes. The expansion does not depend on -ffast-math anymore. How
--- Comment #7 from fxcoudert at gcc dot gnu dot org 2006-10-25 08:19
---
I'm adding Steve Kargl to the CC list, since he's our arithmetics expert :)
(In reply to comment #6)
> Revision 118024 clears the way for MOD and MODULO implementation:
> http://gcc.gnu.org/ml/gcc-cvs/2006-10/msg
--- Comment #6 from uros at kss-loka dot si 2006-10-25 07:33 ---
Revision 118024 clears the way for MOD and MODULO implementation:
http://gcc.gnu.org/ml/gcc-cvs/2006-10/msg00703.html
BTW: I don't know fortran requirements, but built-in functions produce faster
code if errno is not neede
--- Comment #5 from fxcoudert at gcc dot gnu dot org 2006-10-23 06:19
---
Created an attachment (id=12477)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12477&action=view)
Example patch
I don't know if it's giving correct results in all cases, or if it works even
on platforms wit
--- Comment #4 from fxcoudert at gcc dot gnu dot org 2006-10-22 21:01
---
Having thought about it some more, MODULO should be implemented using
fmod{f,,l} and MOD should use remainder{f,,l}. See how BUILT_IN_POWL is used,
for example, to emit the same kind of code in gfc_conv_intrinsic_
0 juin 2006 14:23
> À : THOMAS Paul Richard 169137
> Objet : [Bug fortran/24518] Intrinsic MOD incorrect for large
> arg1/arg2
> and slow.
>
>
>
>
> --- Comment #2 from fxcoudert at gcc dot gnu dot org
> 2006-06-20 12:22 ---
> Why exactly are
--- Comment #2 from fxcoudert at gcc dot gnu dot org 2006-06-20 12:22
---
Why exactly aren't we using BUILT_IN_FMOD{F,,L}?
$ cat a.f90
real*8 :: x = 10.0e9
do i = 10, 22
x = 10d0 * x
print '(a,i2,a,g14.8," = ",g14.8)', "mod (10**",i,", 1.7_8) = ", &
--- Comment #1 from pinskia at gcc dot gnu dot org 2005-10-25 14:37 ---
Confirmed.
--
pinskia at gcc dot gnu dot org changed:
What|Removed |Added
CC|
27 matches
Mail list logo