http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48695
Summary: Runtime with an array of std::vectors Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: critical Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: perso...@e-maxx.ru Created attachment 24048 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24048 The entire program The following program crashes if compiled with -O2: for (int i=0; i<=1; i++) for (int j=0; j<=1; j++) { std::vector<int> a[2]; a[i].push_back (0); } If we remove any 'for' loop, or if we change a[i] to a[0] or to a[1] - there will be no crash.