This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/41781] [OOP] bogus undefined label error with SELECT TYPE.
- 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: 21 Oct 2009 14:25:08 -0000
- Subject: [Bug fortran/41781] [OOP] bogus undefined label error with SELECT TYPE.
- References: <bug-41781-9410@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from burnus at gcc dot gnu dot org 2009-10-21 14:25 -------
Found it:
"8.1.2.1 Control
flow in blocks
Transfer of control to the interior of a block from outside the block is
prohibited, except for the return from a procedure invoked within the block.
Transfers within a block and transfers from the interior of a block to outside
the block may occur."
> One has also to think about which of those should give a warning (like now)
> and which should give a hard error.
NAG f95 always rejects it.
ifort/gfortran/g95 allow it for IF, SELECT TYPE, DO, ASSOCIATE (only supported
by ifort).
ifort/gfortran reject it for SELECT TYPE (though gfortran only indirectly). I
think it should definitely remain like this!
Other blocks are BLOCK and CRITICAL.
Personally, I would not mind to reject it for SELECT TYPE, BLOCK, CRITICAL,
ASSOCIATE on the basis that this is a legacy feature.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41781