This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/26589] New: Optimizer hangs on conditional expression
- From: "pmcilroy at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Mar 2006 04:40:10 -0000
- Subject: [Bug c/26589] New: Optimizer hangs on conditional expression
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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