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

    <tr>
        <th>Summary</th>
        <td>
            [flang] [regression] Literal logical fails to select a generic with a logical dummy argument
        </td>
    </tr>

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

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

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

<pre>
    A literal logical fails to select a generic with a logical dummy argument.  Perhaps related to https://reviews.llvm.org/D157600

```
% cat gen.f90
MODULE m
 INTERFACE l
  FUNCTION l4(x)
   LOGICAL(KIND=4) l4
 LOGICAL(KIND=4), INTENT(IN) :: x
  END FUNCTION
  FUNCTION l8(x)
 LOGICAL(KIND=8) l8
   LOGICAL(KIND=8), INTENT(IN) :: x
  END FUNCTION
 END INTERFACE
END MODULE
FUNCTION l4(x)
 LOGICAL(KIND=4) l4
 LOGICAL(KIND=4), INTENT(IN) :: x
 l4 = x
END FUNCTION
FUNCTION l8(x)
 LOGICAL(KIND=8) l8
 LOGICAL(KIND=8), INTENT(IN) :: x
 l8 = x
END FUNCTION
 USE :: m
 LOGICAL b
 b = l(.TRUE.)
END PROGRAM
```

```
% flang-new gen.f90
error: Semantic errors in gen.f90
./gen.f90:25:6: error: One or more actual arguments to the generic procedure 'l' matched multiple specific procedures, perhaps due to use of NULL() without MOLD= or an actual procedure with an implicit interface
   b = l(.TRUE.)
       ^^^^^^^^^
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0VM2OozgQfhpzKTUCAwEOHJgmjKJNJ6Oe5AGMKYhX5ke2mZ55-5UhYTbqzh5aO5EVVJ_LVZ-ryh_TWrQ9YkaiLyQqHDaZy6AyrTmT49CjUw31rywHKQwqJkEOreBMQsOE1GAG0CiRG2DQYo9KcHgT5gJsdaynrvsFTLVTh71xAb6hurBRg0LJDNY2xsWYUZMgJ7QktFT4Q-CbdqX80bmDagktCz-KN55HvIJ4-fV_413XYtIIODOWhdukV_DlWJz3W-gWC3aH0_a1zJ-3IK8IlOfD82l3PIAMCU1-EpredmB__Lp7zveEJn_tDgUJipDQ1PotDh9uE_o8ZzmcCE12B3vAXivI4ect7vZQrFnfs0juWbxLkswcksckk0-zsNBaoQWz0FLDxX5YrT9TKxkCCYqb-Z7yZ8v2yaLJ5L_pwPn79namu08F1dWu5hCS0MQ9vZ637srZhvv2evz6mr98PN-Phr6RrG-feny7H31UalCWyXfsWG8EhxnRIPp7R5fQ8gYEOY1IkG_suTXAsUcYFHSDQmDcTEyur3kWAHPB9e2PauBYTwqB0FgSGkPHDL9gDd0kjRglgh6Ri-bfvtqWfryqQj2hDTpphKGBw3lv22SbYWVlmAy8HPe2ZZYS62-Efudd1KcH0Y1ScGFA9AZVwziub-ZhD2D5kWj7cN13wamzoE6DlDmY-ZuUenESp75zyeLab4KgopuUViHlSRRVEU39iNVJmDQNdURGPRp4iR95URT4vuvHdchCHsYpjz3GEhJ62DEhVxV0hNYTZptwkyaOZBVKPWs2pbb38yah1Eq4yuyZp2pqNQk9KbT5raWOEUbOYj_PDYkKINEXha1CrcXQW2D__0i9MymZ3St7K8xlqlw-dISWltL18zSq4W_khtByvogmtJwv-k8AAAD__9nE2uA">