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

    <tr>
        <th>Summary</th>
        <td>
            [flang] allocate array from the scalar source
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            flang:runtime
      </td>
    </tr>

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

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

<pre>
    ```
program a
  integer n
  integer, allocatable :: i(:)
  n = 42
 allocate(i(4), source=n)
end program a
```
```
$ flang-new sa.f90
$ a.out

fatal Fortran runtime error(./sa.f90:5): Assign: mismatched ranks (1 != 0) in assignment to unallocated allocatable
Aborted
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxcUs2OpDwMfBpzsaYVHKCbAwe-aXH-9hEccNPZDckoCbs7b7-CZn7UEoJUcFnlcnFKdvYiHdT_AdH_Yv9a_8NyACKorwWv-R5i93VfmDC9d9Co41FXUP1bDHPkBfkBEa3PMktE_3QB9IrsXBg5s3GCoHvQPVqgy3ak9qPeI-grVnTggyNAl6222irpFVNY4yigr_6TKn7CJzlPYp8hVXhz7OcXL38w8enWfvvDp7DmA-7vG2d2OISYI3uMq892EZQYQwS6nICGo4Xu602U7rHfPd5Oi00L5_EuE0b2vxICXUoEKrdhFVCL1uNjJYv4jDng6j9mn7479xDTmxCzTE9zFVOnp1a3XEhXNmfdlucL1cW9Y2Pk3OqxbLSayroRUzdmOpuGmlbdxqqwHSnSqizPqiwV1SeZyqphXRulLs3ZCFRKFrbu5Nzv5RTiXNiUVukapVpVODbi0hGl3VPQ_WHRkafYbcwXs84JKuVsyumrV7bZ7Ul8cOvr596RY-R3vMWwYL4LppEdx2P_xRpdd8_5Le0ZGoCG2eb7ak5jWICGrf_xeXmL4aeMGWjYhSegYdf-LwAA__-RGedS">