This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/55402] Compiling large initializer lists never finishes
- From: "m.hasnain.lakhani at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 01 Feb 2016 01:09:23 +0000
- Subject: [Bug c++/55402] Compiling large initializer lists never finishes
- Auto-submitted: auto-generated
- References: <bug-55402-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55402
Hasnain Lakhani <m.hasnain.lakhani at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |m.hasnain.lakhani at gmail dot com
--- Comment #13 from Hasnain Lakhani <m.hasnain.lakhani at gmail dot com> ---
I ran into this just now with GCC 4.8; and a coworker verified that the problem
is still there in gcc-6.0-pre.
My file (slow.cpp), which contains a huge map literal takes 630 seconds to
compile with gcc 4.8, while the same code would compile in 16 seconds with
clang.
Additionally it seems to compile fine if changing the generated code to instead
use assignment (which was fine for our purposes as a workaround) rather than a
huge initializer list; which suggests exponential behaviour. That would compile
in 30 seconds with gcc 4.8 and under a second with clang.
I'm attaching the two above mentioned files.