This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: g77 behaviour
- To: gborzi at oxygen dot unime dot it, gcc at gcc dot gnu dot org
- Subject: Re: g77 behaviour
- From: N8TM at aol dot com
- Date: Wed, 28 Jul 1999 09:34:08 EDT
In a message dated 99-07-28 06:46:50 EDT, gborzi@oxygen.unime.it writes:
<< do 10 j=1,k
x0=x0-a(j)*x(laij(j)-l)
10 continue >>
Sum accumulation in a non-static local is still optimized more reliably by
gnu compilers than accumulation in an array element. I make a practice of
doing it this way in any case. One of the reasons is that it may be
necessary (on non-Intel architectures) to write the accumulation using
DPROD() and a REAL*8 accumulation variable in order to preserve accuracy. Of
course, use of current standard Fortran DOT_PRODUCT() would save you the
necessity of considering this detail.
Tim
tprince@computer.org