nvptx, libgfortran: Switch out of "minimal" mode
[official-gcc.git] / gcc / testsuite / gfortran.dg / missing_optional_dummy_6.f90
blobcb6de2ebf614d06bcc3dcad78976bd11e76ded34
1 ! { dg-do run }
2 ! { dg-options "-fdump-tree-original" }
4 ! PR fortran/41907
6 program test
7 implicit none
8 call scalar1 ()
9 call assumed_shape1 ()
10 call explicit_shape1 ()
11 contains
13 ! Calling functions
14 subroutine scalar1 (slr1)
15 integer, optional :: slr1
16 call scalar2 (slr1)
17 end subroutine scalar1
19 subroutine assumed_shape1 (as1)
20 integer, dimension(:), optional :: as1
21 call assumed_shape2 (as1)
22 call explicit_shape2 (as1)
23 end subroutine assumed_shape1
25 subroutine explicit_shape1 (es1)
26 integer, dimension(5), optional :: es1
27 call assumed_shape2 (es1)
28 call explicit_shape2 (es1)
29 end subroutine explicit_shape1
32 ! Called functions
33 subroutine assumed_shape2 (as2)
34 integer, dimension(:),optional :: as2
35 if (present (as2)) STOP 1
36 end subroutine assumed_shape2
38 subroutine explicit_shape2 (es2)
39 integer, dimension(5),optional :: es2
40 if (present (es2)) STOP 2
41 end subroutine explicit_shape2
43 subroutine scalar2 (slr2)
44 integer, optional :: slr2
45 if (present (slr2)) STOP 3
46 end subroutine scalar2
48 end program test