Hi,

assuming that my reading of the standard is correct,
the following warning is inappropriate:

% cat gfcbug83.f90program gfcbug83
  do 10 i = 1, 5
     if (i == 3) goto 10
10 end do
end program gfcbug83
%  gfc4x gfcbug83.f90
gfcbug83.f90:3.24:

     if (i == 3) goto 10
                       1
gfcbug83.f90:4.9:

10 end do
        2
Warning: Deleted feature: GOTO at (1) jumps to END of construct at (2)


No other compiler seems to complain, not even NAG f95.
The F2003 draft standard mentions in appendix B.1(2)
branching to an ENDIF, but not ENDDO, for the reasons
explained therein.

I suggest this warning be removed.

Cheers,
Harald


-- 
           Summary: Bogus Warning: Deleted feature: GOTO jumps to END of
                    construct
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: anlauf at gmx dot de


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

Reply via email to