[Bug c++/96197] New: Excess memory consumption, positive correlation with the size of a constexpr array
hyena at hyena dot net.ee
Tue Jul 14 15:30:48 GMT 2020
Bug ID: 96197
Summary: Excess memory consumption, positive correlation with
the size of a constexpr array
Assignee: unassigned at gcc dot gnu.org
Reporter: hyena at hyena dot net.ee
Target Milestone: ---
Created attachment 48876
Contains the problematic constant expression array.
The memory consumption of the compiler seems to have an exponential dependency
on one of the constant expression arrays that I have set up in the header. I
have attached the header file. With an array of just 500 elements the memory
consumption of GCC goes above 5 GiB.
I have tested even with the latest 10.x version and the problem is still there.
Tested also with -O1, -O2 and -O3 and none of these made any difference.
If anyone is aware of any workarounds then I would much appreciate learning
more about them because I need to keep developing the project I have at hand
but because of this bug it has become impossible to continue without changing
the architecture a lot.
This only becomes noticeable at larger array sizes (several hundred elements in
More information about the Gcc-bugs