https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90801
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |compile-time-hog
Status|UNCONFIRMED |NEW
Last reconfirmed| |2019-06-11
Ever confirmed|0 |1
Known to fail| |9.1.0
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed with GCC 9.1.0 and -fsyntax-only.
N time
100000 4.2s
200000 14.7s
300000 31.7s
memory use isn't as much as of a problem.
Samples: 200 of event 'cycles:ppp', Event count (approx.): 90115299747038
Overhead Command Shared Object Symbol
79.41% cc1plus libc-2.22.so [.] __memmove_avx_unaligned
10.98% cc1plus [unknown] [k] 0xffffffff81189984
1.87% cc1plus cc1plus [.] cp_fold_r
1.07% cc1plus cc1plus [.] decay_conversion
1.07% cc1plus cc1plus [.] mark_use
0.93% cc1plus cc1plus [.] cp_fold
So this is the known issue in split_nonconstant_init_1 doing
FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (init), idx,
field_index, value)
{
...
}
else if (!initializer_constant_valid_p (value, inner_type))
{
tree code;
tree sub;
/* FIXME: Ordered removal is O(1) so the whole function is
worst-case quadratic. This could be fixed using an aside
bitmap to record which elements must be removed and remove
them all at the same time. Or by merging
split_non_constant_init into process_init_constructor_array,
that is separating constants from non-constants while building
the vector. */
CONSTRUCTOR_ELTS (init)->ordered_remove (idx);
--idx;