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

    <tr>
        <th>Summary</th>
        <td>
            [flang] Missing diagnostic on ambiguous generic type-bound procedure - a different case
        </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 case:
```
module genericName

   type b1
      integer :: i
      contains
         procedure, nopass :: threeargs1
         generic :: threeargs => threeargs1
   end type

   type, extends(b1) :: c1
 contains
         procedure, nopass :: threeargs2
         generic :: threeargs => threeargs2
   end type


   contains

      subroutine threeargs1(x,y,z)
         real, optional, intent(in) :: x
 integer, intent(in) :: y
         real, intent(out) :: z
      end subroutine

      subroutine threeargs2(x,z,y)
         integer, optional, intent(in) :: x
         integer, intent(in) :: z
         real, intent(out) :: y
      end subroutine

end module
```

Generic procedure `threeargs1` and `threddargs2` are ambiguous.
All ifort, gfortran and XLF issue an error message.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJycVE2T2jAM_TXORQNjK5ANhxxSKL20PffqxEpwx9iM7WwXfn3Hgc1mu_RrZ5jBUd5T3pMsyRB0b4kqtv7A1rtMDvHgfLWTVpPZbg9ks8apc7V1NmhFHuKBoHPGuB_a9tDKQCyvGa9ZwW8_Xh-dGgxBT5a8br_KIyUArwEgnk8Ejbg-AIC2kXrykJLkNejpRetslNqGKQAAJ-9aUoMnhluw7iRDeCbGgyeSvg9iTrgpeAMClu9Y_vENi6waFb6Smz5GT5GsCgzLRjDcPCdsR957peK7pOI9qdfYTMiUOgyNd0PUluZusXxiuD0z3F4YbuY6PEmTNLtT1M5ez6lJNjIstZ2Zf0q0W_9-jzrfSz5B3RBn2MuETe5elP_ND978XK6eXvmZCfxHS3eY99GX_7B2_qO1FLsOzS-TxHj96XYxphsFrOCzVhYcpFXPQaWuBUlRTyCPje4HN4Ql43VtDOjO-Zh09ungpR3J3z7vQYcwEEgL5L3zcKQQZE_LTFW52uQbmVElHlaY56IUIjtU7UO55pLKMm_EuqWiRC5XK_7AVcGxK9aZrpDjmueiRMHzXCw3LXHaIHWibHhbFGzF6Si1WRrzeFw632ejhkrkYiNWmZENmTAuJsTOSNuzvO68SwVWDDGtK18l7qIZ-sBW3OgQw0u2qKMZF9uVvN7BFx1CWltKy966EHULzr4UaRrCNFiLxg1Wzcq-AAlKdx15snHcfNngTXWI8RRSl3HPcN_reBiaZeuODPdJye1vcfLuO7WR4X40GRjubz4fK_wZAAD__wSbq5Y">