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

    <tr>
        <th>Summary</th>
        <td>
            flang interface matching error for logicals with -fdefault-integer-8
        </td>
    </tr>

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

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

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

<pre>
    Consider:
```
module testm
implicit none
interface testi
  module procedure testc
end interface testi
contains
subroutine testc(l)
logical l
end subroutine testc
end module testm

subroutine tests
use testm
implicit none
integer i
call testi(i.ne.0)
end subroutine tests
```
This compiles fine with:
```
> flang-new -c test.f90
```
but not with:
```
> flang-new -c -fdefault-integer-8 test.f90
error: Semantic errors in test.f90
./test.f90:14:1: error: No specific subroutine of generic 'testi' matches the actual arguments
  call testi(i.ne.0)
  ^^^^^^^^^^^^^^^^^^
```
Calling the subroutine directly:
```
call testc(i.ne.0)
```
works fine, and also it works by wrapping the expression with `logical` intrinsic:
```
call testi(logical(i.ne.0))
```
So it seems specific to the mapping of a call to an interface to a specific subroutine.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVNtuszgQfhpzMwoyJhC44KLbNpd7030BYwaYrrGRbZrN2684JI1auodfskCe4zffzFh6T51BrFj2G8teIjmF3rpKvg_yWiRRbZtr9WyNpwYdS58Yf2H8ieV8O8t1sM2kEQL6MKwSGkZNigIYa3ATmYCulWq1o1UIsPmOzipsJrdq1apF08Cum7ImSDJ-vfmpdnYKZG7OotBMlKtS246U1KA_Q36zv2u-F7KbYcs7-f9Sc4cObrCl1lsZoqDYYMzvOHeA-V2y_-jJg7LDSBo9tLPxhUL_U29Y-gqtlqY7GLzAQS2R47bku9b1NMMP_y_ioW2wlZMOh63eQ_ElCzpn5-mBNxykCaRgkXgg88UyZuJ8l6RPyXH-zJ73EL9b8CMqakk9EmZb6NCgIwVMnDaSTzDIoHr0EHoEqcIkNUjXTQOaG70A_9QWAJa9_srZY-5Zak2mW8A8QG_IoQr6-hPhd3zqO74vphfr_lyHgolnkKYBqb0FCrBq6itcnBzHGwr8a3ToPVmztBxYzreFYTmfd8-R8aT-FdnM3M3xEeMPMN8WSB5x8J_NDHaBNGzwbAtya40FaR4fAgtybwbiqKnSpkxLGWGVnIRI0zTNiqivijZTaZnlSd3URZvnopQ843kuW9UW6sQjqgQXR35KOS-zLCvi7HQ85W1THou6lMc0Y0eOgyQda_0xxNZ1EXk_YZXwJMmTSMsatV_eUCGW5WBCzM-pq2aHQz11nh25Jh_8Z4hAQWO1mD-Ut4zszMAy8tBaBxu1fm3Szr5Fk9NVH8Lo51aJMxPnjkI_1bGyAxPnOeX2O4zOvqMKTJyXEjwT562Kj0r8HQAA__9ikN16">