This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/35584] New: invalid warning: branch causes infinite loop
- From: "dfranke at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Mar 2008 16:03:02 -0000
- Subject: [Bug fortran/35584] New: invalid warning: branch causes infinite loop
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Extracted from a FORTRAN 77 application:
$> cat infloop.f
open (5, file = 't2.txt')
do while (.TRUE.)
1 read(5,*,err=1,end=2) i
write(*,*) i
enddo
2 close(5)
end
$> gfortran-svn -g -Wall -W infloop.f
infloop.f:3.72:
1 read(5,*,err=1,end=2) i
1
Warning: Branch at (1) causes an infinite loop
This is not exactly true. Consider:
$> cat t2.txt
2
a
3
$> ./a.out t2.txt
2
3
--
Summary: invalid warning: branch causes infinite loop
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dfranke at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35584