public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/96197] New: Excess memory consumption, positive correlation with the size of a constexpr array
@ 2020-07-14 15:30 hyena at hyena dot net.ee
  2020-07-15  6:29 ` [Bug c++/96197] " rguenth at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: hyena at hyena dot net.ee @ 2020-07-14 15:30 UTC (permalink / raw)
  To: gcc-bugs

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).

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

end of thread, other threads:[~2021-01-18 15:39 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-14 15:30 [Bug c++/96197] New: Excess memory consumption, positive correlation with the size of a constexpr array hyena at hyena dot net.ee
2020-07-15  6:29 ` [Bug c++/96197] " rguenth at gcc dot gnu.org
2020-07-15  8:47 ` hyena at hyena dot net.ee
2020-07-15  9:10 ` rguenther at suse dot de
2020-07-15  9:42 ` hyena at hyena dot net.ee
2020-07-21 16:17 ` ppalka at gcc dot gnu.org
2020-07-21 19:49 ` tridacnid at gmail dot com
2020-07-31  2:29 ` cvs-commit at gcc dot gnu.org
2020-07-31 13:51 ` ppalka at gcc dot gnu.org
2021-01-09  3:52 ` cvs-commit at gcc dot gnu.org
2021-01-09  3:54 ` ppalka at gcc dot gnu.org
2021-01-09  3:58 ` ppalka at gcc dot gnu.org
2021-01-18 15:39 ` ppalka 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).