[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Semantics / label05.f90
blob944bb438f28d6627d7be040020f01cea345f0825
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
11 subroutine sub00(a,b,n,m)
12 real a(n,m)
13 real b(n,m)
14 if (n .ne. m) then
15 goto 50
16 end if
17 6 n = m
18 end subroutine sub00
20 subroutine sub01(a,b,n,m)
21 real a(n,m)
22 real b(n,m)
23 if (n .ne. m) then
24 goto 55
25 else
26 55 continue
27 end if
28 60 n = m
29 end subroutine sub01
31 subroutine sub02(a,b,n,m)
32 real a(n,m)
33 real b(n,m)
34 if (n .ne. m) then
35 goto 70
36 else
37 return
38 end if
39 70 FORMAT (1x,i6)
40 end subroutine sub02
42 subroutine sub03(a,n)
43 real a(n)
44 forall (j=1:n)
45 80 a(n) = j
46 end forall
47 go to 80
48 end subroutine sub03
50 subroutine sub04(a,n)
51 real a(n)
52 where (a > 0)
53 90 a = 1
54 elsewhere (a < 0)
55 91 a = 2
56 elsewhere
57 92 a = 3
58 end where
59 if (n - 3) 90, 91, 92
60 end subroutine sub04