[LLVM] Fix Maintainers.md formatting (NFC)
[llvm-project.git] / flang / test / Semantics / pure02.f90
blob11dc0fd268293b03e827e1208b8a335a6b5a5a19
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 pure subroutine s1
3 contains
4 !ERROR: An internal subprogram of a pure subprogram must also be pure
5 subroutine t1
6 end
7 pure subroutine t2 ! ok
8 end
9 elemental subroutine t3(k) ! ok
10 integer, intent(in) :: k
11 end
12 !ERROR: An internal subprogram of a pure subprogram must also be pure
13 impure elemental subroutine t4(k)
14 integer, intent(in) :: k
15 end
16 !ERROR: An internal subprogram of a pure subprogram must also be pure
17 elemental impure subroutine t5(k)
18 integer, intent(in) :: k
19 end
20 end
22 elemental subroutine s2(j)
23 integer, intent(in) :: j
24 contains
25 !ERROR: An internal subprogram of a pure subprogram must also be pure
26 subroutine t1
27 end
28 pure subroutine t2 ! ok
29 end
30 elemental subroutine t3(k) ! ok
31 integer, intent(in) :: k
32 end
33 !ERROR: An internal subprogram of a pure subprogram must also be pure
34 impure elemental subroutine t4(k)
35 integer, intent(in) :: k
36 end
37 !ERROR: An internal subprogram of a pure subprogram must also be pure
38 elemental impure subroutine t5(k)
39 integer, intent(in) :: k
40 end
41 end
43 impure elemental subroutine s3(j)
44 integer, intent(in) :: j
45 contains
46 subroutine t1
47 end
48 pure subroutine t2
49 end
50 elemental subroutine t3(k)
51 integer, intent(in) :: k
52 end
53 impure elemental subroutine t4(k)
54 integer, intent(in) :: k
55 end
56 elemental impure subroutine t5(k)
57 integer, intent(in) :: k
58 end
59 end