This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/38507] Bogus Warning: Deleted feature: GOTO jumps to END of construct
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Dec 2008 22:28:50 -0000
- Subject: [Bug fortran/38507] Bogus Warning: Deleted feature: GOTO jumps to END of construct
- References: <bug-38507-6318@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from burnus at gcc dot gnu dot org 2008-12-12 22:28 -------
What is about the obsolescent DO related part? Do we need to do something there
(from F95, B.2):
"Shared DO termination and termination on a statement other than END DO or
CONTINUE ? use an END DO or a CONTINUE statement for each DO statement."
"8.1.4.2 Range of the DO construct" contains this small print (small =
deprecated, might get removed in later versions):
"The range of a nonblock DO construct consists of the do-body and the following
DO termination. The end of such a range is not bounded by a particular
statement as for the other executable constructs (e.g., END IF); nevertheless,
the range satisfies the rules for blocks (8.1.1). Transfer of control into the
do-body or to the DO termination from outside the range is prohibited; in
particular, it is permitted to branch to a do-term-shared-stmt only from within
the range of the corresponding inner-shared-do-construct."
Example:
do 10 i = 1, 5
do 10 ii = 1,5
goto 10
10 continue
end
NAG f95 prints:
Obsolescent: 10 is a shared DO termination label
ifort -stand f95 prints:
Warning: Sharing of a DO termination statement by more than one DO statement
is an obsolescent feature in Fortran 95. Use an END DO or CONTINUE statement
for each DO statement.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38507