<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/128610>128610</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Flang] Compile error when argument keyword is used as argument to an extension sizeof intrinsic function
</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 : 21.0.0(f75126eeabba13ce2aab53c2e4296fca12b9da0d)/AArch64
```
When `argument keyword (X=)` is used as argument to an extension `sizeof` intrinsic function, a compilation error occurs.
The following are the test program, Flang, Gfortran and ifx compilation/execution result.
sngts014_22.f90:
```fortran
program main
call s2
print *,'pass'
contains
subroutine s2
integer,parameter::pi41=sizeof(X=1)
integer::i41
if(pi41/=sizeof(X=i41)) print *,'err11'
end subroutine s2
end program main
```
```
$ flang sngts014_22.f90; ./a.out
error: Semantic errors in sngts014_22.f90
./sngts014_22.f90:6:36: error: unknown keyword argument to intrinsic 'sizeof'
integer,parameter::pi41=sizeof(X=1)
^
./sngts014_22.f90:8:21: error: unknown keyword argument to intrinsic 'sizeof'
if(pi41/=sizeof(X=i41)) print *,'err11'
^
$
```
```
$ gfortran sngts014_22.f90; ./a.out
pass
$
```
```
$ ifx sngts014_22.f90; ./a.out
pass
$
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJysVF2TnDYQ_DXDy9RR0vCxywMP-C7kBySV5C0lYADZIG1JwnfOr0-JxefLrlN2xdna2gVquqc107TyXk-GuYbiHRRPidrCbF1tZ2MfxvdJZ4dPNZTi-IrmN3ZeW4N2xHFRZkLIGiSZilQAncdTIalkVl2nZNYzKdUVWU-cU1WOvZLUVYMSA1AF1DaN6-cyB9G87QCi-X1mg1AK5aZtZRPwA396tm5AoPMfkD1FeClQe9w8D6g8vlYGi8ogvwQ2u04ohdd_sR13gAlOG697HDfTB20N0CMq7O160YuKD5Cdsw5t32_Op1c5v86Mo10W-6zNhMoxhpkxsA94cXZyao00bRxHvPh5tC44ZVCZAfX48pYeqOUX7re9lWO_LeFo4s0UvJD5n0TpWAnImrdzOShBNEdHXJWOt4i9Whb0tF9fnDYBgRqgR6DTRXkPdALR9NYEpY3fq_zWObsFbfjAaRN4Ygf0eFFOrRzYxf5Zc9G5hOzpmOB1-DJOP9LgK26vjaWRK9btOGpvofvTCqi6FcrOSXlVishmuJMYn92c_MYz_7il_HDn3VTfYQrUqtRuIdLGZUcH_8KrMkH31_V71OYOKpqIvF9TCVmTxR98ZdvMB2Ofzatt37rziweBTp-nczoGiv9tFVD89K_yzpA1JP83eT-83a99rvrj1r691-nz2_WN1eJu_u9lja_pDxEmQ50NVVaphGt5ykWe52Upk7mm0zlT45ids1IIVicpujzvJVdCFeO5GhNdk6BCEBVCFFLItJNcDaIqhSw6WZx7yAWvSi_psnxcU-umRHu_cS3pXEqRLKrjxe_5TbS7HrJmdNYENgMQxVR3dcQ-dNvkIReL9sF_YQs6LHv-XxOseMLHPbD4yMLnmMZ3Ufw94Xu1x1diN9ncUs8hXHw0N7VA7aTDvHVpb1egNmo7_h4uzr7nPgC1-7E9UHuc_GNNfwcAAP__VW4D5g">