https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111747
Bug ID: 111747
Summary: Problem with large float list initialization
Product: gcc
Version: 11.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: oplata.kes1 at mail dot ru
Target Milestone: ---
Created attachment 56085
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56085=edit
*ii file and output
I create a vector on stack of 50 (or 500mln) floats equal to 1.0 and simply add
them.
The sum is not equal to 50 mln (or 5 billions).
5 mln of floats initizalize and sum fine.
The command is
g++ -v -save-temps gcc.cpp && ./a.out
If it is a stack overflow, shouldn't the code fail with stack overflow error?
If not, what is it?
I use GCC 11.4.0 in Ubuntu 22.04 under WSL 2 (!)