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

    <tr>
        <th>Summary</th>
        <td>
            [Flang] 'fir.rebox' complains when passing an expression of character type as an actual argument corresponding to an assumed-length dummy with different rank of a BIND(C) routine 
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            bug,
            flang:ir
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          DanielCChen
      </td>
    </tr>
</table>

<pre>
    Consider the following test case:
```
 interface
   subroutine sub(arg1) bind(c)
     character(*) :: arg1(2,3)
   end subroutine
 end interface
 character(3) :: c1(8)
 character(3) :: c2(8)
 call sub(c1)                     !! OK
 call sub(c1 // c2)             !! 'fir.rebox' op result type and shape operand ranks must match
end
```
`fir.rebox` failed to verify.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0U9GOozoM_RrzYk0VTFvoAw-dVpWurrT7DSE4kN2QoCTMTP9-Faa7rWa7CInEOucY28cyRjM45hZ2r7A7F3JJow_tWTrD9nQa2RWd76_tybtoeg6YRkbtrfXvxg2YOCZUMjJURxBnEEfYi9u7XtG4xEFLxbc7Yly64JdkHOcjUCPDUAIdsDOuB2oU0OEPGFGNMkiVOAA1QMcMzMmqI37yGgI6VY8cdv1Dkls4B7_-y6N09SCssmxzl_wnjr7gpLW3mtRa0bMHqAQq8fv_z0gIdAG6rMqHZzSgWpuwCdz5D6Aa_YyB42ITpuvMKHPpo5wZ_cwh34J0PyNOS0w4yaTGz6zs-qfjgr24y-8Famks95g8vnEw-rr5hBV9W_WH6iALbsu6rKimphLF2KptLeq-Lpud0kpqQftKN_uG9rqmcltzYVoStBXbcl9Woi7Fpqs7llLsqNdaHmoFW8GTNHZj7du08WEoTIwLt03TNIfCyo5tXM1K1C0DUJ4-EGkr3QDV0YQc2p2L0GaBl24ZImyFNTHFu2Qyya6Wv6y03fmvvio_zVYaF_F9ZIdz3hM3oHTIH3PgGI136PXdGrf-xwyRKi3SZn8uE7uEyofAcfauX3fGr5gYl4n7F8tuSCP2yzRd8d3ko9GaQ-bl2eUkEl__-3YGak7ZFb-Xp1iCbceU5pjtuPpmMGlcuo3yE9AlV3v7vMzB_2CVgC5rNyPQZW3orwAAAP__bi4zfg">