https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92385
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |compile-time-hog,
| |memory-hog
Status|UNCONFIRMED |NEW
Last reconfirmed| |2019-11-06
Ever confirmed|0 |1
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
It's yet another case where the C++ FE should emit loops rather than
individual array element initializations.
;; Function item_array::item_array() (null)
;; enabled by -tree-original
<<cleanup_point <<< Unknown tree: expr_stmt
*(struct
{
struct item a[524288];
} &) this = {CLOBBER} >>>>>;
{
<<cleanup_point <<< Unknown tree: expr_stmt
(void) (((struct item_array *) this)->a = {TARGET_EXPR <D.2340, <<< Unknown
tree: aggr_init_expr
4
__ct_comp
D.2340
(struct item *) <<< Unknown tree: void_cst >>> >>>>, TARGET_EXPR <D.2350, <<<
Unknown tree: aggr_init_expr
4
__ct_comp
D.2350
(struct item *) <<< Unknown tree: void_cst >>> >>>>, TARGET_EXPR <D.2351, <<<
Unknown tree: aggr_init_expr
...
2 million lines later
...
D.526635
(struct item *) <<< Unknown tree: void_cst >>> >>>>, TARGET_EXPR <D.526636,
<<< Unknown tree: aggr_init_expr
4
__ct_comp
D.526636
(struct item *) <<< Unknown tree: void_cst >>> >>>>}) >>>>>;
also probably not too intelligent individual elements either.