This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/36232] New: Optimizer removes condition check to terminate loop
- From: "nick dot spence at freescale dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 May 2008 19:47:15 -0000
- Subject: [Bug c/36232] New: Optimizer removes condition check to terminate loop
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This section of code is used in a bootloader to test DRAM.
It loops over the DRAM performing various operations of reads and writes.
When optimization (O2 or Os) is switched on the second loop in this example no
longer terminates, but continues indefinitely because the loop condition has
been removed from the optimized code
--
Summary: Optimizer removes condition check to terminate loop
Product: gcc
Version: 4.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: nick dot spence at freescale dot com
GCC build triplet: gcc version 4.1.2 20070626 (Red Hat 4.1.2-13)
GCC host triplet: i386-redhat-linux
GCC target triplet: i386-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36232