J3/14-242 To: J3 From: Van Snyder Subject: Branching to END BLOCK and END CRITICAL Date: 2014 October 02 Reference: 14-191r3 14-191r3 proposed to prohibit to branch to END BLOCK or END CRITICAL statements from outside the constructs they terminate. It also proposed that existing prohibitions on branching to statements that terminate constructs, from outside the constructs, ought to be constraints. The editor rejected 14-191r3 on the grounds that these proposals were not authorized as work items, that the incompatibilites and additional constraints proposed address mere oversigits or mistakes, and that they therefore ought to be corrected by the interpretation process. ------------------------------------------------------------------------ NUMBER: TBD TITLE: Branching to END BLOCK and END CRITICAL KEYWORD: Branching, END BLOCK, END CRITICAL DEFECT TYPE: Error STATUS: J3 consideration in progress QUESTION: Do the GO TO statements in the following conform to the Fortran 2008 standard? go to 1 do block 1 end block go to 2 critical 2 end critical go to 3 associate ( ... ) 3 end associate ANSWER: Branching to END BLOCK and END CRITICAL statements from outside the construct is not prohibited. The GO TO statements that branch to statements 1 and 2 are not prohibited. This is considered to be a mistake. Branching to the terminating statement of any other construct from outside the construct is prohibited, but the prohibitions are not constraints. The GO TO Statement that branches to statement 3 is prohibited, but a processor is not required to diagnose this violation. It is considered to be a mistake that a processor is not required to diagnose this violation. Edits are provided to constrain against branching to these statements. EDITS: [170:36 8.1.3.2p3] Delete the paragraph. [175:35-36 8.1.6.4p1] Delete "It is permitted ... DO construct." [175:40 8.1.6.4p2] Delete "Transfer of control ... ." [180:25 8.1.7.2p2] Delete "It is permissible ... IF construct." [182:26 8.1.8.2p3] Delete the paragraph. [185:26 8.1.9.2p9] Delete the paragraph. [187:7+ 8.2.1p1+] Insert constraints: "C847a If a branch target statement is an , , , , , , or , the branching statement that references the label of that branch target statement shall be within the construct completed by that branch target statement." "C847b If a branch target statement is a , the branching statement shall be within the range of the corresponding ." SUBMITTED BY: Van Snyder HISTORY: m205 14-nnn Submitted ------------------------------------------------------------------------