http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55402
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-11-20 11:43:27 UTC --- I believe the expensive part here is the EH, we end up with > 56000 nested try/finally constructs. With -fno-exceptions this compiles in reasonable time (even for the insane testcase), at least without optimizations, with optimizations costly phases are e.g. the inliner (remember there are hundreds of thousands of calls to inline). For EH, I think it would help if at least for the larger initializer list the compiler emitted just a single try/finally, where if exception is thrown during construction of some element, it would just loop over all the older elements in the array (starting from previous one down to first) that would destruct them.