This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/17708] New: gfortran problem with goto inside loop
- From: "mimo2 at free dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Sep 2004 08:28:33 -0000
- Subject: [Bug fortran/17708] New: gfortran problem with goto inside loop
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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