My source file hangs the compiler reliably when building for release, using 100% of the processor, for indefinite time. The code should be correct, it builds on lots of other compilers (including gcc2) and platforms. I attached the zipped *.ii-file. Before the preprocessing, I stripped everything unrelated out of the source file, it hangs in the constructor at the very end. Release: Apple Computer, Inc. GCC version 1175, based on gcc version 3.1 20020420 (prerelease) Environment: Mac OS X 10.2.4, December 2002 DevTools How-To-Repeat: /usr/bin/g++3 -c -arch ppc -fno-common -fpascal-strings -Os -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -Wno-unused -mdynamic-no-pic hangtest.ii
Fix: Omitting "-Os"
From: Geoffrey Keating <geoffk@apple.com> To: dixl@medimach.de, gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-prs@gcc.gnu.org Cc: Subject: Re: c++/10039: [macosx] gcc hangs at a c++-Constructor with switch "-Os" Date: Wed, 26 Mar 2003 10:26:39 -0800 This is most likely a bug specific to Apple's compiler. Could you file a bug report at <http://developer.apple.com/bugreporter/index.html>?
From: Geoffrey Keating <geoffk@apple.com> To: dixl@medimach.de, gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-prs@gcc.gnu.org Cc: Subject: Re: c++/10039: [macosx] gcc hangs at a c++-Constructor with switch "-Os" Date: Wed, 26 Mar 2003 14:25:30 -0800 Dix says this was filed as Apple Radar 3042899, quite some time ago. In summary: The compiler is not really hanging, just taking a very long time (hours). The problem is specific to -Os. A workaround for released compilers is to add -fno-gcse, or use -O2 instead of -Os. -fno-schedule-insns will also help. It looks like later compiler releases (3.3, 3.4, the next Apple compiler release) will have the performance bottlenecks improved, down to sane numbers (like 10 minutes, with no workarounds, or 1 minute with -fno-schedule-insns in 3.3, and better in 3.4). -- Geoff Keating <geoffk@apple.com>
Responsible-Changed-From-To: unassigned->geoffk Responsible-Changed-Why: Can see Radar.
State-Changed-From-To: open->closed State-Changed-Why: - Not filed against FSF GCC - Performance issue, improved in 3.3, fixed in 3.4
Subject: Bug 10039 Author: hjl Date: Thu Apr 9 15:44:05 2009 New Revision: 145842 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145842 Log: 2009-04-09 H.J. Lu <hongjiu.lu@intel.com> PR gas/10039 * configure.ac: Require texinfo 4.7. * configure: Regenerated. Modified: trunk/ChangeLog trunk/configure trunk/configure.ac