http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55402
--- Comment #6 from Kevin Hsu <kevin at topsy dot com> 2012-11-20 00:24:11 UTC --- (In reply to comment #5) > I don't think it's correct to say that it *never* finishes - the memory usage > also doesn't diverge - it's just extremely slow. We have of course to analyze > why (as far as I know nobody tested so far this typical ;) case). Right, I did test with a few thousand entries, and it did come back. It feels like there's a exponential issue somewhere... Anyways, thank you for looking into this :) The use case we encountered was that we have a global data structure with around 25,000 pairs known at compile time. So, we naturally generated the code file. I haven't tested whether this happens at all with std::unordered_map or other containers. My workaround was to change the ctor to take a pointer to the entries with a count. In that case, the C-style initialization compiles in expected time.