https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104722
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I think this code is undefined as the order of the addition is not specified for std::accumulate
pinskia at gcc dot gnu.org via Gcc-bugs Tue, 01 Mar 2022 00:35:26 -0800
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104722
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I think this code is undefined as the order of the addition is not specified for std::accumulate