------- Comment #7 from dfranke at gcc dot gnu dot org 2010-05-17 23:49 ------- (In reply to comment #6) > I already explained what dot_product is doing in comment #2. > dot_product(a,b) is equivalent to > > s = 0 > do n = 1, m > s = s + a(n) * b(n) > end do > (return s) > > For Thomas' code, you end up with 0 + (-0), which is 0 (which > is what IEEE 754 explicitly says in Sec 8.3).
Thanks for the clarification. Finally also found the c.l.f thread (where, btw, Tobias answers my question on what other compilers do): http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/a693c3dd5f725e77 After reading it, I'd agree that this is probably a non-issue. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44156