This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34214] New: Bad test on do loop limit
- From: "manz at intes dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Nov 2007 13:03:02 -0000
- Subject: [Bug fortran/34214] New: Bad test on do loop limit
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
A Fortran DO loop does not terminate if the loop variable is changed
inside of the loop to a value higher than the implied limit.
Please find below a small example which shows this behavior.
program main
integer LOOP
do LOOP=1,3
print *,' LOOP = ',LOOP,' < 3'
CALL B (LOOP)
print *,'LOOP is now ',LOOP
end do
end
SUBROUTINE B(LOOP)
INTEGER LOOP
if (LOOP > 10) then
LOOP = 1
else
LOOP = LOOP + 1
endif
END
--
Summary: Bad test on do loop limit
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: manz at intes dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34214