public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99117] New: cannot accumulate std::valarray
@ 2021-02-16  5:26 yasui at icepp dot s.u-tokyo.ac.jp
  2021-02-16  7:43 ` [Bug middle-end/99117] [9/10/11 Regression] " rguenth at gcc dot gnu.org
                   ` (23 more replies)
  0 siblings, 24 replies; 25+ messages in thread
From: yasui at icepp dot s.u-tokyo.ac.jp @ 2021-02-16  5:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99117

            Bug ID: 99117
           Summary: cannot accumulate std::valarray
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: yasui at icepp dot s.u-tokyo.ac.jp
  Target Milestone: ---

Created attachment 50193
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50193&action=edit
source file

The result of the summation of the std::valarrays by std::accumulate is
improper when compiling with -O2.
It works properly with -O1.

option:
g++ -std=c++2a -Wall -Wextra -O2 source.cpp

In the source file, it calculates (1,1) + (2,2) = (3,3).
The expected result is outputting nothing.
If compiling with -O2, following message is shown:
a.out: source.cpp:10: int main(): Assertion `sum[0]==3' failed.

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2024-02-16 15:12 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-16  5:26 [Bug c++/99117] New: cannot accumulate std::valarray yasui at icepp dot s.u-tokyo.ac.jp
2021-02-16  7:43 ` [Bug middle-end/99117] [9/10/11 Regression] " rguenth at gcc dot gnu.org
2021-02-16  7:59 ` [Bug libstdc++/99117] " rguenth at gcc dot gnu.org
2021-02-16 10:41 ` redi at gcc dot gnu.org
2021-02-16 11:01 ` redi at gcc dot gnu.org
2021-02-16 11:25 ` jakub at gcc dot gnu.org
2021-02-16 11:40 ` rguenther at suse dot de
2021-02-16 11:47 ` redi at gcc dot gnu.org
2021-02-16 11:54 ` rguenther at suse dot de
2021-02-16 14:07 ` redi at gcc dot gnu.org
2021-02-23  9:28 ` rguenth at gcc dot gnu.org
2021-02-23 10:35 ` redi at gcc dot gnu.org
2021-02-23 11:43 ` rguenther at suse dot de
2021-02-23 13:26 ` rguenth at gcc dot gnu.org
2021-02-23 13:30 ` jakub at gcc dot gnu.org
2021-02-23 13:56 ` jakub at gcc dot gnu.org
2021-02-23 14:17 ` jakub at gcc dot gnu.org
2021-02-23 14:20 ` jakub at gcc dot gnu.org
2021-06-01  8:19 ` [Bug libstdc++/99117] [9/10/11/12 " rguenth at gcc dot gnu.org
2022-05-27  9:44 ` [Bug libstdc++/99117] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:43 ` jakub at gcc dot gnu.org
2023-07-07 10:39 ` [Bug libstdc++/99117] [11/12/13/14 " rguenth at gcc dot gnu.org
2024-02-08 21:34 ` redi at gcc dot gnu.org
2024-02-15 11:44 ` cvs-commit at gcc dot gnu.org
2024-02-16 15:12 ` [Bug libstdc++/99117] [11/12/13 " cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).