public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98604] New: Passing constexpr by const reference causes excessive memory usage during compilation
@ 2021-01-08 17:19 adamkzyzik at gmail dot com
2021-01-09 3:58 ` [Bug c++/98604] " ppalka at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: adamkzyzik at gmail dot com @ 2021-01-08 17:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98604
Bug ID: 98604
Summary: Passing constexpr by const reference causes excessive
memory usage during compilation
Product: gcc
Version: 9.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: adamkzyzik at gmail dot com
Target Milestone: ---
Created attachment 49922
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49922&action=edit
code
https://stackoverflow.com/questions/65621617/huge-memory-consumption-during-compilation-when-passing-constexpr-by-const-refer
Seems like passing constexpr object to a constexpr constructor by const
reference causes excessive memory footprint during compilation.
The more that object is used in the constructor, the more memory is consumed.
g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
I tested it on few other versions and the behavior was the same.
It doesn't occur on clang-10.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/98604] Passing constexpr by const reference causes excessive memory usage during compilation
2021-01-08 17:19 [Bug c++/98604] New: Passing constexpr by const reference causes excessive memory usage during compilation adamkzyzik at gmail dot com
@ 2021-01-09 3:58 ` ppalka at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-01-09 3:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98604
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ppalka at gcc dot gnu.org
Resolution|--- |DUPLICATE
Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Thanks for the bug report. I think this might be a dup of PR96197, which has
been fixed on the 10 and 11 branches.
*** This bug has been marked as a duplicate of bug 96197 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-09 3:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-08 17:19 [Bug c++/98604] New: Passing constexpr by const reference causes excessive memory usage during compilation adamkzyzik at gmail dot com
2021-01-09 3:58 ` [Bug c++/98604] " 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).