This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/68399] New: c++11 default initialization of a large array: slow compile
- From: "kcc at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 18 Nov 2015 00:47:57 +0000
- Subject: [Bug c++/68399] New: c++11 default initialization of a large array: slow compile
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68399
Bug ID: 68399
Summary: c++11 default initialization of a large array: slow
compile
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: kcc at gcc dot gnu.org
Target Milestone: ---
Reproducible with 4.8.2 and fresh trunk (r230509).
% gcc -O1 z.cpp -std=c++11 -c
#ifndef SZ
# define SZ 16
#endif
struct Range {
short B, E;
Range() : B(0), E(0) {}
};
struct ArrayOfRanges {
Range LabelRanges[1 << SZ] = {};
};
ArrayOfRanges *AOR = new ArrayOfRanges();
This code will take ~10 minutes to compile at -O1
The larger the SZ is the longer it takes.