Bug 68203 - Аbout infinite compilation time on struct with nested array of pairs with -std=c++11
Summary: Аbout infinite compilation time on struct with nested array of pairs with -st...
Status: RESOLVED DUPLICATE of bug 84281
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 5.1.1
: P3 normal
Target Milestone: 8.0
Assignee: Not yet assigned to anyone
URL:
Keywords: compile-time-hog, memory-hog, missed-optimization
: 77562 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-11-03 22:26 UTC by MikeMirzayanov
Modified: 2018-06-26 19:51 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2015-11-04 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description MikeMirzayanov 2015-11-03 22:26:59 UTC
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.
Comment 1 Andrew Pinski 2015-11-04 07:56:57 UTC
This is most likely a memory hog which is generating lots of default constructors rather than a loop over them.
Comment 2 Richard Biener 2015-11-04 09:11:57 UTC
And we have a duplicate bugreport for this somewhere.
Comment 3 Jonathan Wakely 2016-01-26 15:17:36 UTC
Probably PR 56671
Comment 4 Andrew Pinski 2016-09-11 19:53:31 UTC
*** Bug 77562 has been marked as a duplicate of this bug. ***
Comment 5 Jason Merrill 2018-06-26 19:51:25 UTC
Fixed by patch for bug 84281.

*** This bug has been marked as a duplicate of bug 84281 ***