This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/32500] New: Loop optimization limits range to size of array used inside loop
- From: "ed at fxq dot nl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jun 2007 15:35:17 -0000
- Subject: [Bug c/32500] New: Loop optimization limits range to size of array used inside loop
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Hello,
On the FreeBSD -CURRENT mailing lists a user of the upcoming FreeBSD release
discovered a bug in the GCC that is shipped with the base system (4.2.0
20070514). This bug causes the amount of iterations in a loop to be limited to
the range of an array used in a single part of the loop. When the size of the
loop is increased (in the attached example, to 6 or higher) the problem
disappears.
The issue is solved when compiling the application with -O1 or lower.
--
Summary: Loop optimization limits range to size of array used
inside loop
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: blocker
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ed at fxq dot nl
GCC build triplet: amd64-undermydesk-freebsd
GCC host triplet: amd64-undermydesk-freebsd
GCC target triplet: amd64-undermydesk-freebsd
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32500