<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/83164>83164</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Flang] fir.rebox verification failure when passing rank-2 actual to polymorphic assumed-size dummy
</td>
</tr>
<tr>
<th>Labels</th>
<td>
bug,
flang:fir-hlfir
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
DanielCChen
</td>
</tr>
</table>
<pre>
Consider the following code:
```
type base
integer :: i
end type
class(base), pointer :: b1(:,:)
call sub(b1)
contains
subroutine sub(arg)
class(base) :: arg(1:*)
end
end
```
Flang currently issues
```
error: loc("t1.f":5:1): 'fir.rebox' op result type and shape operand ranks must match
error: verification of lowering to FIR failed
```
XLF, gfortran and ifort all compile this successfully.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8U02P4ygU_DX48pTIxnZsH3zwJrK00p72tFfAD5sdDBYf3ZP59SNIpqNujUaKCIVfUbwqYN6r1SCOpP2LtLeCxbBZN96YUaiv1w1Nwe1yH6_WeLWgg7AhSKu1fVdmBWEXJPVEyhspJ3Ipn78Mw_1A4MzjAwIoE3BFB4lQT6Ae62gWSKUPJDTzntA-8-hA6BUOm4gfNF4R2qc5veZxeBKZ1uAjT9zqtWpNYMr4B_KROxuDMvisZG59lX5W_iWXS_oqS73U0CxfJl-af4yzZsmk6ByaoO-gvI_of0tA56xLgtqK1CCloTpLQimpp5bUU-6pnoDQTip3dsjtd0I7sAc49FGHbCIws4Df2IFgD3QJOWa-edijD7CzILYvcm_olFSCBWUNWAnavqNL0QYL89__gmRK4596_O-fOaW0SuuCYyafQCUAKRFh90NphLApDz4Kgd7LqPX9XCxjvQz1wAocq64cyrajQ1ts48CqpqPY17xkfJAtb8qh7S68k3039GIp1EhL2pSUdlVf9lV1lqW4DBfe1VTWjbwI0pS4M6XPWr_tZ-vWIhs_9nV1aQrNOGqfLzylPK7JY3ollMqUFqknqdxp01K59KW9FW5M-5x4XD1pSq188K-dgwo6v56cNWlv8BHPZ2-TkdEhvG9o4Ejvzqw5nBMFJkJkOll-WH3frTs2JYB5H3dcTl79QFjivt-L6PS4hXD4fB9nQudVhS3ys7A7oXM61fPvdDj7P4pA6Py8dXTO_f8MAAD__6-hNYw">