https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90851
Bug ID: 90851 Summary: -O3 overflow Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: zhonghao at pku dot org.cn Target Milestone: --- My gcc is 10.0.0, and the code is: struct S { S (); S (int); ~S (); int i; }; struct A { S s[100000]; }; void foo () { A a = {{}}; } It takes several minutes to compile the code. With the following parameters: g++ -Os | g++ -O3 | gcc -Os | gcc -O3 |, I got a overflow: cc1plus: out of memory allocating 65536 bytes after a total of 58655244288 bytes