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

    <tr>
        <th>Summary</th>
        <td>
            MOVE_ALLOC with the same actual passed to TO and FROM fails with "Invalid descriptor"
        </td>
    </tr>

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

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

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

<pre>
    This example calls the intrinsic MOVE_ALLOC passing the same variable to both actual arguments.  When the resulting code is executed, it generates a runtime error saying "Invalid descriptor".  All other compilers process this call as a no-op, except for GNU, which generates the following message at compile time:
```
Error: The FROM and TO arguments at (1) violate aliasing restrictions (F2003 12.4.1.7)
```
The request is to clarify the runtime message.

Here's a small program the reproduces the problem:
```
program p
  real, allocatable :: a1(:)

 allocate(a1(0:10))
  call MOVE_ALLOC(a1,a1)
end
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0U01vhDYQ_TXmMgoCw7K7Bw40ybaVkq5UbdtjNZgBXBmbeswm-feVWdKNqkZCBqP35uPNPGTWgyWqxe4HsXtKcAmj8zWzQjM7S0nruo_6MmoGesdpNgQKjWEII4G2wWvLWsHr-ffnP5uXl_MjzDGkHVYA40RwRa-xNQTBQevCCKjCggbQD8tENnAK8MdIdmV44sWEyFeuI1jTkloCdUI-gg4wkCWPgRgQ_GKDngjIe-eB8SPyhJQ_2ysa3UFHrLyeg_NCyhSgMQZcGMmDctOsDXmG2TtFHPvRvLYGGENb9-DmmJLeFc0Beufhx19-i3_eRq3GL3XEsntnjHuL6SdixoEAw2cSiDWKohHZk8gaUWXbs16fY-miaOAyEpx-Pb8C2g4u57s6MZKQh1zII1y1MxgI0GhcRfbEwWsVtLMcUSeZZQXkMi3TPN0LefzfpJdV6L8X4hAVDg6UQa_7j9sINlW3TtItxHr-RJ6E3EeFeIpizd4NHqdtdrN33aI2TWbvWkPTd51_MufbFcATmqgvGuMUhnVlIrloAHMhD_H734ZunA1KQh5WSCaKJs8i6hMIt5ne93ODPsZjw5Dt_lNh0tVFdyyOmFCdV_tyd8jL4piMdVcRde2u7fsSu8OxrFo6KGzzXmJVHCpKdC0zWWS5LPN9kRXHVEmSkjJqC6nUbr8XZUYTapMac51S54dEMy9UV5ms9onBlgyvZpSyN2gHUTTbQISU0aG-jsyHdhlYlJnRHPgeK-hgqP7ixjcdxrsVN-dFi1IX5x4XzXa3xetRG74RvvNQsnhTjyHMvA7jJORp0GFc2lS5SchTrGN7Pcze_UUqCHlaG2QhT2uP_wQAAP__QdRqeA">