<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/60224>60224</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [flang] Compilation error of explicit declaration of dummy argument
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          ohno-fj
      </td>
    </tr>
</table>

<pre>
    ```
Version of flang-new : 16.0.0(77f2f34d696b77fe5bf05afbe7386966b6bcc8ba)
```

flang-new points out that there is no explicit type declaration of dummy argument.

The following are the test program, flang-new, gfortran and ifort compilation result.

snggm004_2.f90:
```fortran
PROGRAM main
  IMPLICIT NONE
  EXTERNAL    sub1
  INTEGER  :: i1 = 1
 integer  :: j
  CALL sub (sub1, i1)
  print *,'OK'
END PROGRAM main

SUBROUTINE sub (routine, i)
  IMPLICIT NONE
  INTEGER, INTENT(IN   ) :: i
  CALL routine (i)
END SUBROUTINE sub

SUBROUTINE sub1 (ii)
  IMPLICIT NONE
  INTEGER, INTENT(IN ) :: ii
  WRITE (6,*)  ii
END SUBROUTINE sub1
```

```
$ flang-new -flang-experimental-exec snggm004_2.f90
error: Semantic errors in snggm004_2.f90
./snggm004_2.f90:10:17: error: No explicit type declared for 'routine'
  SUBROUTINE sub (routine, i)
 ^^^^^^^
$
```

```
$ gfortran snggm004_2.f90
$
```

```
$ ifort snggm004_2.f90
$
```

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycld-PozYQx_8a8zIKMsOv8MBDLiGnqHvsKZdr-1YZMMQrwMg2vd3_vjJJ2Gw2XXUrIQc89me-Y89MmNai6TlPSfiFhBuHjeYoVSqPvVzUT04hq5eURPT80A2hq9-50kL2IGuoW9Y3i57_AuKvwItc6lKCyziusfaDKkqiIo5rHhY1DVld8NhfRkkUFVFRlsuCEUxOyBsPp_EVPkjRGw1yNGCOzA5ccRAaegn8eWhFKQyYl4FDxcuWKWbO-qqx616AqWbseG_ca_rhyKGWbSt_ib4BprilguHawKBko1hHcP0aoP1oaqmMYj2wvgJhP6CU3SDakz_F9di-daL7pukoDf5Ct04o8Vc34Z6Bp9nv-8ev-9U36Jg4zwDsvn1_2K13B8gf8-wymf15yPb56gEAQI-FNy_OD9nXbA_2Mux9CA-Iv4GLXfSGN1zN5qfLvvXq4cGCgOBy4uEahDdfDsCgRG-A4IrgmmD8-BvB-GTL8g28130af_z8sn_8edjl2QWu5GhEzyf-Ff5ukOdg7Fr7mh8ILnc5ABBM5gDfRHCmW0evdCvwrZB_l-hNW_-vsmtds7A_9rtDZrHRdHQru2g2v9fmfVAOt5MYXJXf4vTKnweuhM111i74My_hJgOnrVwpqazOH7xjvRElTDMaRH93vUtw-y6TvWmILWbm5ffLkVdQSwUE4zkB4ssB_dckIWF257mcxOeOba7je8F-mnZqBJ9BOVXqV4mfMIenXhQHQRiHy8g5piUtAqRREJSel5RxHVJMgtqjcbmMI-YHjkiRok899GlMI4zcsCiwrioswySsIhqQgPKOidZt2787V6rGEVqPPI0oYuC0rOCtnlo9ok2byUgQbedXqd2zKMZGk4C2Qhv9SjHCtNN_xJRnJNzA-qrzTQlg--18-x_2YWdUbXo0ZtC2XnBLcNsIcxwLt5Qdwa31ev5ZDEo-8dIQ3E5aNcHtFMs_AQAA__-TkuM9">