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: "sfilippone at uniroma2 dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Oct 2009 14:23:49 -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 #5 from sfilippone at uniroma2 dot it 2009-10-21 14:23 -------
>
> I believe jumping *into* a (DO/IF/SELECT (TYPE/CASE)/BLOCK/ ...) block is
> invalid, but they are all in the same scoping unit. However, I failed to find
> this restriction.
>
That is what is spelled out clearly in the two translation from standardese
into English that I have, Metcalf Reid and Cohen page 54: "a goto statement
must never specify a branch into a block" and Fortran 2003 handbook page 280ff
"the statements that may be branch targets are those classified as action
statements plus the initial statements for ASSOCIATE, CASE, DO, FORALL, IF,
SELECT TYPE and WHERE, however it is not permitted to branch to a statement
within a block from outside the block. " plus some other things about the END
[something] often being a legitimate target.
Thus I think both your examples should be rejected
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41781