[WebAssembly] Fix asan issue from https://reviews.llvm.org/D121349
[llvm-project.git] / flang / test / Semantics / label05.f90
blob51fd90263911c95526229a1e0bf81a3f3c28393a
1 ! RUN: not %flang_fc1 -fdebug-unparse-with-symbols %s 2>&1 | FileCheck %s
2 ! CHECK: Label '50' was not found
3 ! CHECK-NOT: error: Label '55' is in a construct that prevents its use as a branch target here
4 ! CHECK: Label '55' is in a construct that prevents its use as a branch target here
5 ! CHECK: Label '70' is not a branch target
6 ! CHECK: Control flow use of '70'
7 ! CHECK: error: Label '80' is in a construct that prevents its use as a branch target here
8 ! CHECK: error: Label '90' is in a construct that prevents its use as a branch target here
9 ! CHECK: error: Label '91' is in a construct that prevents its use as a branch target here
10 ! CHECK: error: Label '92' is in a construct that prevents its use as a branch target here
12 subroutine sub00(a,b,n,m)
13 real a(n,m)
14 real b(n,m)
15 if (n .ne. m) then
16 goto 50
17 end if
18 6 n = m
19 end subroutine sub00
21 subroutine sub01(a,b,n,m)
22 real a(n,m)
23 real b(n,m)
24 if (n .ne. m) then
25 goto 55
26 else
27 55 continue
28 end if
29 60 n = m
30 end subroutine sub01
32 subroutine sub02(a,b,n,m)
33 real a(n,m)
34 real b(n,m)
35 if (n .ne. m) then
36 goto 70
37 else
38 return
39 end if
40 70 FORMAT (1x,i6)
41 end subroutine sub02
43 subroutine sub03(a,n)
44 real a(n)
45 forall (j=1:n)
46 80 a(n) = j
47 end forall
48 go to 80
49 end subroutine sub03
51 subroutine sub04(a,n)
52 real a(n)
53 where (a > 0)
54 90 a = 1
55 elsewhere (a < 0)
56 91 a = 2
57 elsewhere
58 92 a = 3
59 end where
60 if (n - 3) 90, 91, 92
61 end subroutine sub04