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

    <tr>
        <th>Summary</th>
        <td>
            [flang] Missing diagnostic on non-rank-1 `v_list` in `formattedRead`
        </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 code:
```
module m
    type base
        real(4), allocatable :: d1
    end type
end module

program fdtio001d1
use m
 interface read(formatted)
        subroutine formattedRead (dtv, unit, iotype, v_list, iostat, iomsg)
        use m
            class (base), intent(inout) :: dtv
            integer, intent(in) :: unit
 character(*), intent(in) :: iotype
            integer, intent(in) :: v_list(:,:)  !<-- must be rank 1
            integer, intent(out) :: iostat
            character(*), intent(inout) :: iomsg
        end subroutine
    end interface
end
```

The `v_list` argument should be rank-1. This code should be diagnosed.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUVE2P4ygQ_TX4UkqEyx-xDz543cptL6u-r7Ap28xgiABn1P9-hOPufMxhZlAUIKl6r96jQHivJkPUsOIfVrwlYg2zdc2bMIp0181kkt7Kj6azxitJDsJMMFqt7Q9lJhisJJa1jLes5PuHt4uVqyZYGG8BAMLHhaAXnvZ9HI6EZljlDGuGHQit7SCC6DVBxMtakOkeTkZuEIy3cXkDj4y8vTg7ObHAKIOynKdbzup3amUCuVEMFNkkw2q0bhEhkIys91r82ju7BmWisj3iPxISGFYyXGN9q1EhzspulWAH1_-18vtvPoh9tfjpGfurmIcxaOF9BN88uRkQazWBYaWMXQPD-suGcH1Jj6ETuZesh5StWN7CMAsnhhBDK4btr0wPObuwv2T6NKGKe-y27xqAYcqy7nCAZfUBegInzHdI_wD9Wfvu7It7v1P1ihHP5A4RW-h-4A8t9tUttz57aWnG2_eZgJV811xyEG5aFzIB_GxXLT-FHtIjvM_Kb5fj4T-pxGSsJ3lMZJPJOqtFQk16yssyRyzqZG4E8lHkMuOUiyGl_lTwHMeqGHrZl9nIE9Ugx4IX_JRWmKf1kZdjWpzSQfKRqgwHlnNahNJHra_L0bopUd6v1KRZVWdZokVP2m-XHXHUwkwsa0dno3uSIcYnwDUx99Cvk2c5j2L9HS2ooLfH4pZcvMG_yvv4FOzyghrAGjDWHG5mPHumTNw_XTNW8mR1uplDuPithc4Mz5MK89ofB7swPEf6fTpcnP1GQ2B43pR5hudd3LXBnwEAAP__83txJg">