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

    <tr>
        <th>Summary</th>
        <td>
            flang: interface mismatch if array arguments have different names
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    This MWE:
```fortran
module p
  implicit none
contains

  subroutine bar(s)
    interface
       subroutine s(g)
         implicit none
         integer, intent(in) :: g(:)
       end subroutine s
    end interface
    integer :: a(2) = [ 1, 2 ]
    call s(a)
  end subroutine bar

  subroutine t(v)
    integer, intent(in) :: v(:)
    write(*,*) v
  end subroutine t

  subroutine foo
    call bar(t)
  end subroutine foo

end module p
```
cannot be processed by flang 10d2195305ac:
```
error: Semantic errors in p.f90
./p.f90:22:14: error: Actual procedure argument has interface incompatible with dummy argument 's='
      call bar(t)
               ^
flang: in /home/e89/e89/jme/array_interface, flang-new failed with exit status 1: /work/e89/e89/jme/LLVM/install/main-10d2195305ac/bin/flang-new -fc1 -module-suffix .f18.mod -fdebug-unparse -fno-analyzed-objects-for-unparse p.f90 -c -o p.o
```
However, if the arguments are scalars
```fortran
module q
  implicit none
contains

  subroutine bar(s)
    interface
       subroutine s(g)
         implicit none
         integer, intent(in) :: g   !!!
       end subroutine s
    end interface
    integer :: a(2) = [ 1, 2 ]
    call s(a(1))
  end subroutine bar

  subroutine t(v)
    integer, intent(in) :: v   !!!
    write(*,*) v
  end subroutine t

  subroutine foo
    call bar(t)
  end subroutine foo

end module q
```
or vectors with the same name
```fortran
module r
  implicit none
contains

  subroutine bar(s)
    interface
       subroutine s(v)
         implicit none
         integer, intent(in) :: v(:)   !!!
       end subroutine s
    end interface
    integer :: a(2) = [ 1, 2 ]
    call s(a)
  end subroutine bar

  subroutine t(v)
    integer, intent(in) :: v(:)   !!!
    write(*,*) v
  end subroutine t

  subroutine foo
    call bar(t)
  end subroutine foo

end module r
```
flang processes them without any complaints.

flang-14.0.3 (and gfortran) are able to correctly process (compile) the MWE. Is this a regression recently introduced in main?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzdVkuzmzYY_TV4o4EBYa7NgoWbG087k6zaaZcdAQKUguRIwo7763skbGPfcDNZdJK0DCOEHt_zfDoqVX0ufuuEIe__eBukuyB-DuJd8BRPb6O01UxOo4Oqx56Tw_RHiBgOvaiEJVJJPg1WSlompLmIuSw0Y6nVaIXkpGQ6oFsT0Pw6CTnSct2wis9D5GETlm_bhy3-WdA_z0Fmy6Hrje9KCxFCQgZxTqY7Anlb130hlcv6UfNt0s0sWHpRdBXLIJZOap5JkP1EEmcCRfd53lOxvvdOsTv1LzS7QL0WROfM8bMQftHd44K7Jy0sd-MU4298m2Phsj32VWsapV64NiXZvu7cbcvUutlHcN0AeIEVk1JZUmJeq4obw2tSnknTM9mSJK5pkmdpnLHqcwRfNGittIvDr3xg0oqK-BGDaJFD1OSXZVFA99NvuqMUTbJ2m267d5UdWT8ZUY-aE6bbcUC4ScfMjA70KjUcmBUlXDoJ25F6HIbzvDygGwOE4HOPvleC9_AE2dtp3DvvjIILMLtTA3K559v81n7wI0xrdv5zRi4g4reGkp9Iw0SPWHoT-SeUkrHMjgaohWBsPin916LUd-9-f48PSt3CaPQGlH34kAq6Lx0E97O2sKkSEk6ZDs3YNOITiZpkG2EIkzUvxzYc5YFpw_EvVcgk689_8zpU5QdeWRPiQLqt8JkiYUVChb5aTPzP6sSPl8JoiO3mlBn0UOCIOYR9xbH38f9x7DkI0eTyfteTb5s4377ZAbjs-I94Bn5cRLLS5IgScIeWL1eHZcMGTiSar8Cv_i74Pf7L-J157McB8jen8P8OlPUilCfevlK5cVAePKghjzB5Jo49ewDSmuhe8MQkyTqKo5S42ENRe8U6nHUHOnOUaxVEaI1y6c9XPW6DkwvCc2td-eDKG5FfnH7cfxn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