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

    <tr>
        <th>Summary</th>
        <td>
            [Flang] Missing diagnostic on ambiguous generic type-bound procedure
        </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
      integer :: i
 contains
         procedure, nopass :: printa
         generic :: print => printa
   end type

   contains

      subroutine printa()
 print *, 'a'
      end subroutine

      subroutine printb()
 print *, 'b'
      end subroutine

end module

module n
   use m

 type,extends(base) :: child
      integer :: j
      contains
 procedure, nopass :: printb
         generic :: print => printb
   end type

end module
```

`printa` and `printb` have the same interface. They bound to the same generic `print`. This usage should be diagnosed.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUU12PozoM_TXhxZoqNUMLDzxw29u3-3b_QEIMZBSSKh-zO_9-FUppR9rZ0UpIKI7PiX2OLULQoyVqWfUPq86FSHFyvj0Lq8mcThPZQjr10Z6cDVqRhzgRDM4Y90PbEXqniJUd4x078PXj3exUMgRzDvMOAOLHlUCKQLcjAGgbaSQPGVx2oPNF72wU2oYtCQCu3vWkkieGJ7DuKkK4Y65e2yiek0ey5HX_KQFYeWblv5-yyaqlpK2-p5c3vpCkdylqS3cs1gybfL8SY5eLYngUDI8bLpM_sH9ilF8zyu8Yc-wm8-28Sm5voBQe6i-N4ol-RrIqMKwXH7C5q9RP2qivfHnbLp7N-c4U-VemyN-Z8rm_p9m6HVdHDhyEVXAPyByYxDstUxrETEs_fhA97eD_iT5AupTfcY-Mrb6VhB14ztUBUhAjQZhcMgokgdJitC6Q2hWqLVVTNqKgdn985RVv6roqprY5NqIXdcMbakqU5bHe76sjqj3hwPe9LHSLHCuOWO3rqubVTlRDf2jEgZMqGzko9sppFtrsjHmfd86PhQ4hUbvH-njghRGSTFi2FXEwwo6s7AbvbHaXIeYd9m3Gvsg0BvbKjQ4xPNiijmbZ9ssCrs7wnw4h7_LaXtQ9OAtilnpMLoVNoGzOy02_bQCK5E07xXgN2V68MLyMOk5J7no3M7zkZ9ffy9W7N-ojw8vSUWB4WZt6b_FXAAAA__8DPWM4">