This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/12245] [5/6/7 regression] Uses lots of memory when compiling large initialized arrays
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 01 Feb 2017 13:29:58 +0000
- Subject: [Bug c/12245] [5/6/7 regression] Uses lots of memory when compiling large initialized arrays
- Auto-submitted: auto-generated
- References: <bug-12245-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12245
--- Comment #63 from Richard Biener <rguenth at gcc dot gnu.org> ---
Sth that could pay off with other testcases (nested CONSTRUCTORs) is to
truncate the size of the CONSTRUCTOR_ELTS vec<> to the exact final size after
parsing it
as it will never grow again and we over-allocate during safe-pushing to it.
vec:: has no suitable function to do that (yet) though.
It won't help this particular testcase of course.