<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/139600>139600</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[flang] Missing diagnostic on intrinsic `SIZE` when the argumen `DIM` is equal to the rank.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
flang:frontend
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
DanielCChen
</td>
</tr>
</table>
<pre>
Consider the following code:
```
implicit none
real :: a(10, 10)
print*, size(a, dim=2)
end
```
The standard requires the DIM argument to be less than the rank of SOUCE. This usage should be diagnosed.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxcUU1v3CAU_DX48hQLgz8PPrjrrJTDqoekl96webZfi2EDOFH76yt2t6pUyTKImYE3MyoEWi1iz6ovrBozdcTN-X5UltCcThvabHL6V39yNpBGD3FDWJwx7pPsCrPTyOTA-MBq_vj4QPvV0EwRrLPI-OBRGUg0OYBioi04EydI_47x4erJRiaGdBboNzLRqrTXtDM5ijsJrf7vEcaHtw0hRGW18ho8vh_kMdwmHF8uoPx67GgjRAcTgsGQMGVvBK_sT3ALvH79dnrO4W2jAEdQK0LY3GF0UmhSq3UBdZ7pXupOdirDvmjKhjdSlG229V3RISIKnNtlERUveTM1NS8qqecSpcyoF1xUvCpE0fJGtHnZtGVdC7XMEqemnVjJcVdkcmM-9tz5NaMQDuwL2dWcZ0ZNaMKtHSEWo-zK5LB4Z2NKRIjUme-T9mk61sBKbijE8O-2SNHc2r2LqxEuFELq7mEv0gzOAtnoyQaagdX89eX7M6s5fG54j-uRZcLGl0uCKAC-H8qkdP8GmmeHN_0W4zWktsWZifNKcTumfHY7E-c01WN5unr3A-fIxPlmODBxfnj-6MWfAAAA___HrM-E">