This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: A prototype loop reverser for the scalarizer


Toon Moene wrote:

Hmmm, good idea, that -fassociative-math - why didn't I come up with that myself ;-)

[ I suppose it means: treat (A+B)+C as the same as A+(B+C) ]

I realize this needs a correction:


In Fortran

A + B + C

means the processor (compiler, run time library, OS) can evaluate this expression as either:

(A + B) + C

or

A + (B + C)

or

(A + C) + B

[Because the programmer didn't specify an order by applying parentheses]

This is what -fassociative-math should establish: It doesn't matter in which order you add the terms, we don't care.

Cheers,

--
Toon Moene - e-mail: toon@moene.indiv.nluug.nl - phone: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
A maintainer of GNU Fortran: http://gcc.gnu.org/fortran/
Who's working on GNU Fortran: http://gcc.gnu.org/ml/gcc/2006-01/msg00000.html



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]