I tried to compile KDE 4.3.4 with gcc-r155523. The compilation stalled at file globalsettings_base.cpp, which took more than 40 minutes to compile (actually, it could have taken more, because I've simply aborted it).
In the attachement you will find the preprocessed version of this file. Sorry to have included such a huge file, but it seems impossible to comment out some parts of it because doing so greatly reduces the compilation time. To reproduce, do $ gcc -x c++ -c -O1 -g -o bug.o bug.i It seems this problem has something to do with debug info generation for optimized binaries, because omitting -O1 or -g makes the problem disappear. -- Summary: Huge compilation time with -O1 -g Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: aanisimov at inbox dot ru GCC build triplet: i686-slackware-linux GCC host triplet: i686-slackware-linux GCC target triplet: i686-slackware-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42565