AArch64: correct constraint on Upl early clobber alternatives
[official-gcc.git] / gcc / testsuite / gfortran.dg / do_check_14.f90
blob43425f19deca11384ea57b27c4cd7931fc3c5a33
1 ! { dg-do compile }
2 ! PR fortran/96469 - make sure that all legal variants pass.
4 module x
5 implicit none
6 contains
7 subroutine sub_intent_in(i)
8 integer, intent(in) :: i
9 end subroutine sub_intent_in
10 subroutine sub_intent_unspec(i)
11 integer :: i
12 end subroutine sub_intent_unspec
13 integer function fcn_intent_in(i)
14 integer, intent(in) :: i
15 fcn_intent_in = i + 42
16 end function fcn_intent_in
17 integer function fcn_intent_unspec (i)
18 integer :: i
19 fcn_intent_unspec = i + 42
20 end function fcn_intent_unspec
21 end module x
23 program main
24 use x
25 implicit none
26 integer :: i1, i2, i3, i4
27 integer :: k, l
28 do i1=1,10
29 call sub1
30 end do
31 do i2=1,10
32 call sub2
33 end do
34 do i3 = 1,10
35 k = fcn3()
36 end do
37 do i4=1,10
38 l = fcn4()
39 end do
40 contains
41 subroutine sub1
42 call sub_intent_in (i1)
43 end subroutine sub1
44 subroutine sub2
45 integer :: m
46 m = fcn_intent_in (i2)
47 print *,m
48 end subroutine sub2
49 integer function fcn3()
50 call sub_intent_unspec (i3)
51 fcn3 = 42
52 end function fcn3
53 integer function fcn4()
54 fcn4 = fcn_intent_unspec (i4)
55 end function fcn4
56 end program main