This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/35584] New: invalid warning: branch causes infinite loop


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]