RISC-V: Refactor Dynamic LMUL codes
[official-gcc.git] / gcc / testsuite / gfortran.dg / whole_file_12.f90
blob23ea10248eca692de9a6615f1cb4702560d719e3
1 ! { dg-do compile }
3 ! Tests the fix PR40011 comment 17 in which the explicit interface was
4 ! being ignored and the missing argument was not correctly handled, which
5 ! led to an ICE.
7 ! Contributed by Dominique d'Humieres <dominiq@lps.ens.fr
9 Implicit None
10 call sub(1,2)
11 call sub(1,2,3)
13 contains
15 subroutine sub(i,j,k)
16 Implicit None
17 Integer, Intent( In ) :: i
18 Integer, Intent( In ) :: j
19 Integer, Intent( In ), Optional :: k
20 intrinsic present
21 write(*,*)' 3 presence flag ',present(k)
22 write(*,*)' 1st arg ',i
23 write(*,*)' 2nd arg ',j
24 if (present(k)) then
25 write(*,*)' 3rd arg ',k
26 else
27 write(*,*)' 3rd arg is absent'
28 endif
29 return
30 end subroutine
32 end