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/17708] New: gfortran problem with goto inside loop


Here is a simple example 
      program test
      do 10 i=1,3
      if(i == 2) goto 10
      write(*,*) ' loop with i =',i
 10   enddo
      end
  where the loop stops at the second pass (i=2). Replacing the
  "goto" by "cycle" cures the problem  (but this breaks compatibility
  with old g77 codes)
      program test
      do 10 i=1,3
      if(i == 2) cycle
      write(*,*) ' loop with i =',i
 10   enddo
      end
  I've used the gfortran version as of today (28 sep), on gcc 3.2.2

-- 
           Summary: gfortran problem with goto inside loop
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mimo2 at free dot fr
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17708


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