comparison gcc/testsuite/gfortran.dg/exit_2.f08 @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 ! { dg-do compile }
2 ! { dg-options "-std=f2008" }
3
4 ! PR fortran/44709
5 ! Check that the resolving of loop names in parent namespaces introduced to
6 ! handle intermediate BLOCK's does not go too far and other sanity checks.
7
8 ! Contributed by Daniel Kraft, d@domob.eu.
9
10 PROGRAM main
11 IMPLICIT NONE
12
13 EXIT ! { dg-error "is not within a construct" }
14 EXIT foobar ! { dg-error "is unknown" }
15 EXIT main ! { dg-error "is not a construct name" }
16
17 mainLoop: DO
18 CALL test ()
19 END DO mainLoop
20
21 otherLoop: DO
22 EXIT mainLoop ! { dg-error "is not within construct 'mainloop'" }
23 END DO otherLoop
24
25 CONTAINS
26
27 SUBROUTINE test ()
28 EXIT mainLoop ! { dg-error "is unknown" }
29 END SUBROUTINE test
30
31 END PROGRAM main