URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [do_2.f90] - Rev 694
Compare with Previous | Blame | View Log
! { dg-do compile }! Check the fix for PR20839, which concerned non-compliance with one of the! constraints for block-do-constructs (8.1.4.1.1):! Constraint: If the do-stmt of a block-do-construct is identified by a! do-construct-name, the corresponding end-do shall be an end-do-stmt! specifying the same do-construct-name. (Tests a & b)! If the do-stmt of a block-do-construct is not identified by a! do-construct-name, the corresponding end-do shall not specify a! do-construct-name. (Tests c & d)! Constraint: If the do-stmt is a nonlabel-do-stmt, the corresponding end-do! shall be an end-do-stmt.! Constraint: If the do-stmt is a label-do-stmt, the corresponding end-do shall! be identified with the same label.!! Test a - this was the PRdoi: DO 111 i=1,3 ! { dg-error "requires matching ENDDO name" }111 continue! Test bdoii: DO 112 ij=1,3112 enddo doij ! { dg-error "Expected label" }! Test cDO 113 ik=1,3113 enddo doik ! { dg-error "Syntax error" }! Test dDO il=1,3enddo doil ! { dg-error "Syntax error" }! Test edoj: DO 114 j=1,3enddo doj ! { dg-error "doesn't match DO label" }! Correct block do constructsdok: DO 115 k=1,3dokk: do kk=1,3dokkk: DOdo kkkk=1,3doenddoenddoenddo dokkkenddo dokk115 enddo dok! Correct non-block do constructsdo 117 l=1,3do ll=1,3do 116 lll=1,3116 continueenddo117 enddo! These prevent an EOF error, arising from the previous errors.end do113 end do112 end do doiiEND
