[Bug c++/14179] [8/9/10 Regression] out of memory while parsing array with many initializers
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 31 23:20:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14179
--- Comment #81 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:d2b9548f38c77edc29ab0e24e516f1fb341ecea7
commit r10-6387-gd2b9548f38c77edc29ab0e24e516f1fb341ecea7
Author: Jason Merrill <jason@redhat.com>
Date: Thu Jan 30 18:49:29 2020 -0500
c++: Reduce memory consumption for large static arrays.
PR14179 and the C counterpart PR12245 are about memory consumption of very
large file-scope arrays. Recently, location wrappers increased memory
consumption significantly: in an array of integer constants, each one will
have a location wrapper, which added up to over 500MB in the 14179
testcase. For this kind of testcase tracking these locations isn't worth
the cost, so this patch turns the wrappers off after 256 elements; any
array
that size or larger isn't likely to be interested in the location of
individual integer constants.
PR c++/14179
* parser.c (cp_parser_initializer_list): Suppress location wrappers
after 256 elements.
More information about the Gcc-bugs
mailing list