[Bug fortran/41781] [OOP] bogus undefined label error with SELECT TYPE.
sfilippone at uniroma2 dot it
gcc-bugzilla@gcc.gnu.org
Wed Oct 21 14:24:00 GMT 2009
------- 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
More information about the Gcc-bugs
mailing list