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: SIGFPE, Arithmetic exception. "Value optimized out" when using --ffast-math


On 7/2/2011 11:18 AM, Steve Kargl wrote:
On Sat, Jul 02, 2011 at 02:36:21PM +0200, Dominique Dhumieres wrote:



Associative is a forbidden transformation in the standard.


Note 7.18 [1] form F2003 has the following forbidden transformation

(X + Y) + Z          X + (Y + Z)
(X * Y) - (X * Z)    X * (Y - Z)
X * (Y - Z)          X*Y-X*Z

If -funsafe-math-optimization any of these, then you get what
you asked for. (NO, I haven't looked to see what the option
allows).

[1] Yes, I know a Note is non-normative text.


The Fortran list of permitted and forbidden associations has been carried over since the f66 standard. It seems to have passed the test of practical usage time after time.
Is there a combination of options which observes the standard with respect to parentheses, but permits vectorization of sum reduction?


--
Tim Prince


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