I compiled this trivial function on the OS X 10.3.9 g++ compiler, which is still only version 3.3. With the optimizer enabled -O2, the compiler hangs. Without optimization, the compile succeeds.
Code: int f(int x) { return 1 / (x ? 1 : 0) ; } GCC VERSION: gcc version 3.3 20030304 (Apple Computer, Inc. build 1666) -- Summary: Optimizer hangs on conditional expression Product: gcc Version: 3.3.6 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pmcilroy at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26589