Tried on g++.EXE (tdm-1) 5.1.0 and g++ (GCC) 5.1.1 20150618 (Red Hat 5.1.1-4) Compile the following minimal source code with command line 'g++ -std=c++11 t.cpp' #include <utility> using namespace std; struct A { pair<int, int> values[2000000]; }; int main() { A x; return 0; } Compilation hangs for a very long time.
This is most likely a memory hog which is generating lots of default constructors rather than a loop over them.
And we have a duplicate bugreport for this somewhere.
Probably PR 56671
*** Bug 77562 has been marked as a duplicate of this bug. ***
Fixed by patch for bug 84281. *** This bug has been marked as a duplicate of bug 84281 ***