[Bug fortran/52053] SUM intrinsic is wrong for very large arrays

francois.willot at cmm dot ensmp.fr gcc-bugzilla@gcc.gnu.org
Mon Jan 30 15:32:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52053

--- Comment #2 from François Willot <francois.willot at cmm dot ensmp.fr> 2012-01-30 14:41:58 UTC ---
(In reply to comment #1)
> This is not a bug: 16777216. == 2.0**24, then you can add 1.0 as much as you
> like without changing the result.
> 
> If one want a bug here, it is a missed optimization as SUM does not seem to be
> vectorized (one day I should compile libgfortran with -O3 and the option
> allowing operations to be reordered).

OK it wasn't clear to me at first. At least the alternative with the optional
DIM is good enough in the common case where the array values have the same
order, so feel free to close this report.



More information about the Gcc-bugs mailing list