This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/52053] SUM intrinsic is wrong for very large arrays
- From: "francois.willot at cmm dot ensmp.fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 30 Jan 2012 14:41:58 +0000
- Subject: [Bug fortran/52053] SUM intrinsic is wrong for very large arrays
- Auto-submitted: auto-generated
- References: <bug-52053-4@http.gcc.gnu.org/bugzilla/>
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.