<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/67946>67946</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Flang] Compilation error of a dummy argument of Derived Types used in MODULE PROCEDURE subprogram statement
</td>
</tr>
<tr>
<th>Labels</th>
<td>
flang:frontend
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ohno-fj
</td>
</tr>
</table>
<pre>
```
Version of flang-new : 18.0.0(cc627828f5176c6d75a25f1756d387d18539c1fb)
```
A dummy argument of `Derived Types` used in `MODULE PROCEDURE` subprogram statement results in a compilation error.
The following are the test program, Flang-new, Gfortran and ifort compilation result.
sngf_c1249_105b_2.f90:
```fortran
module m
interface
module subroutine sub(a)
type ty
sequence
integer ::i
end type ty
type(ty)::a
end subroutine
end interface
contains
module subroutine sub(a)
type ty
sequence
integer ::i
end type ty
type(ty)::a
if (a%i /= 10) print *,'ng'
write(6,*) "sub"
end subroutine
end module m
program main
use m
type ty
sequence
integer ::i
end type ty
type(ty) :: a
a%i=10
call sub(a)
print *,'pass'
end program main
```
```
flang-new sngf_c1249_105b_2.f90
error: Semantic errors in sngf_c1249_105b_2.f90
./sngf_c1249_105b_2.f90:17:15: error: Dummy argument 'a' has type ty; the corresponding argument in the interface body has type ty
type(ty)::a
^
./sngf_c1249_105b_2.f90:8:18: Declaration of 'a'
type(ty)::a
^
$
```
```
$ gfortran sngf_c1249_105b_2.f90
$
```
```
$ ifort sngf_c1249_105b_2.f90
$
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVV1zozYU_TXiRRMPXCE-Hnjwhrgv7Wxnu9vXjIAL1g5IriQ243_fEWDHZkmariZDrI97rs6RdK6wVnYKsSD8E-FlIEZ31KbQR6Uf2u9BpZtzQZJw-QtLEu7_RmOlVlS3tO2F6h4UvlDC9jTKduEuJJDVdQJpBlnLozSpkyblAngbpTxpWJY2U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