[Bug c++/96197] New: Excess memory consumption, positive correlation with the size of a constexpr array
hyena at hyena dot net.ee
gcc-bugzilla@gcc.gnu.org
Tue Jul 14 15:30:48 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96197
Bug ID: 96197
Summary: Excess memory consumption, positive correlation with
the size of a constexpr array
Product: gcc
Version: 9.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hyena at hyena dot net.ee
Target Milestone: ---
Created attachment 48876
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48876&action=edit
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
my case).
More information about the Gcc-bugs
mailing list