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

    <tr>
        <th>Summary</th>
        <td>
            [flang] Missing diagnostic that an assumed-size array is being passed as the `ac-value` of an array constructor
        </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 case:
```
real :: arr(4)
call sub(arr)
contains
 subroutine sub(arg)
    real :: arg(*)
    call sub2([arg]) !! Should be error
  end
  subroutine sub2(arg)
    real :: arg(:)
 end
end
```

An assumed-size array shall not be allowed as the `ac-value` of an array constructor as it doesn't provide the shape information.
All ifort, gfortran and XLF issue an error message.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUUsGOmzAQ_RpzGSUyYwjkwIFNlFN76qXXARtw5diRx6Tafn1lku121UtXQtiaefPm6fkRs529MZ2oX0R9LmhNS4jdmbw17nRajC-GoF-7U_BstYmQFgNTcC78tH6GkdgI1QvZi4N8frKPhhzksuqBYhTYVgKPQvYjOQe8DgLbrb7Vgk9kPQvZ51YMa7Le_EHNDxQAwEfaWWArsH9vv5FjbtQvGVGfBR5BYCmwhG9LWJ2GwYCJMcRtyni9nR8X439sVm-bHxSP_98mCNn3Hoh5vRq9Y_vLZC_oFXjJQn1IWQplJ40G4s1ZcZA07u7kViMOEsIE5J9jY_Cc4jqmEDPaJtDBsBfYJLjFcLfabBS80M2A9VOIV0o2-H1W4hzYKcQk8ARzvsRM7DV8_3IBy7yavGkzBq6GmWazL3Sn9FEdqTBd2VSolCzxUCzdoWppGqVsZFVWQ6MH0ohNO4ylUlUztoXtUGItVdmiVDUe9iTLpp6ISE2DnqpJVNJcybq9c_frPsS52DR0pSqP8lg4GozjLZOIkyM_C9VPMfiUfUbMSY1dnt0N68yiks5y4ne2ZJPbMv0Yrs_w1TLnxGpLsw-c7AhpobT5--8bWYbBZPiNmD_7PMUaXbekdOMtJReBl9mmZR32Y7gKvGSVz2N3i-GHGZPAy2YAC7w8Pbh3-DsAAP__GZ4kaA">