[flang][cuda] Do not apply implicit data attribute on dummy arg with VALUE (#119927)
[llvm-project.git] / flang / test / Semantics / label05.f90
blob7f5067e282f4c7424216ce744f2945189f1d7136
1 ! RUN: not %flang_fc1 -fdebug-unparse-with-symbols %s 2>&1 | FileCheck %s
2 ! CHECK: Label '50' was not found
3 ! CHECK: warning: Label '55' is in a construct that should not be used as a branch target here
4 ! CHECK: Label '70' is not a branch target
5 ! CHECK: Control flow use of '70'
6 ! CHECK: error: Label '80' is in a construct that prevents its use as a branch target here
7 ! CHECK: error: Label '90' is in a construct that prevents its use as a branch target here
8 ! CHECK: error: Label '91' is in a construct that prevents its use as a branch target here
9 ! CHECK: error: Label '92' is in a construct that prevents its use as a branch target here
10 ! CHECK: error: Label '30' is in a construct that prevents its use as a branch target here
11 ! CHECK: error: Label '31' is in a construct that prevents its use as a branch target here
12 ! CHECK-NOT: error: Label '32' is in a construct that prevents its use as a branch target here
13 ! CHECK: error: Label '40' is in a construct that prevents its use as a branch target here
14 ! CHECK: error: Label '41' is in a construct that prevents its use as a branch target here
15 ! CHECK-NOT: error: Label '42' is in a construct that prevents its use as a branch target here
17 subroutine sub00(a,b,n,m)
18 real a(n,m)
19 real b(n,m)
20 if (n .ne. m) then
21 goto 50
22 end if
23 6 n = m
24 end subroutine sub00
26 subroutine sub01(a,b,n,m)
27 real a(n,m)
28 real b(n,m)
29 if (n .ne. m) then
30 goto 55
31 else
32 55 continue
33 end if
34 60 n = m
35 end subroutine sub01
37 subroutine sub02(a,b,n,m)
38 real a(n,m)
39 real b(n,m)
40 if (n .ne. m) then
41 goto 70
42 else
43 return
44 end if
45 70 FORMAT (1x,i6)
46 end subroutine sub02
48 subroutine sub03(a,n)
49 real a(n)
50 forall (j=1:n)
51 80 a(n) = j
52 end forall
53 go to 80
54 end subroutine sub03
56 subroutine sub04(a,n)
57 real a(n)
58 where (a > 0)
59 90 a = 1
60 elsewhere (a < 0)
61 91 a = 2
62 elsewhere
63 92 a = 3
64 end where
65 if (n - 3) 90, 91, 92
66 end subroutine sub04
68 subroutine sub05(a)
69 real a(..)
70 select rank (a)
71 rank(1)
72 31 goto 30
73 rank(2)
74 goto 32
75 32 continue
76 30 continue
77 end select
78 goto 31
79 end
81 subroutine sub06(a)
82 class(*) a
83 select type (a)
84 type is (integer)
85 41 goto 40
86 type is (real)
87 goto 42
88 42 continue
89 40 continue
90 end select
91 goto 41
92 end