<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/128757>128757</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Flang] Missing diagnostic on mixed function and subroutine with the same generic name.
</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 dt
contains
procedure :: foo
procedure :: bar
generic :: gen => foo, bar ! Error: foo is function, but bar is a sub
end type
contains
integer function foo(a)
class(dt) a
foo = 3
end function
subroutine bar(a)
class(dt) a
end subroutine
end module
```
`foo` and `bar` shall not be mixed into the same generic name `gen`.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx8UsFu3CAQ_ZrxZZQVhthrH3xwd-NbPwLDrE2FYQU4af6-grgbpWorWTLDzLx583gyRrM4ogGab9BcK7mn1YfhKp0he7ms5KrZ6_fh4l00mgKmlfDmrfVvxi2ovCYQI7ARWnZ8bNy83i3hBmxETO93Qp3KWXmXpHGxBIj34BXpPRBmDDHizft_pWYZjtRCjoJRvxMLOQRxBfFS2vkllyICr_ElBB8OXDQRb7tTyXhXivZUCk1EiXGfCzg5XfgCG79QNS7RQuEB8DGpk8D7nFdWxgi80wl4j_LgmYeCuKJ4QD_ms7HcxX0Ofk_GUVnv_4AZ4LMB2JgvPpT-Q_6PMFNsGUqnEVqW8VuGcZXWovMJZ8LN_CSdd_PlVaPc6CGuywG0bCEHLTtVehC6F72saKjPz6xhXSvaah0ENbVgPadOyl6d61qf21k1da112zPVV2bgjDeM86buxLluTqwWUqm57-ama5US8Mxok8aerH3dTj4slYlxp6Hm3bk5V1bOZGOxJ-c3K90CYrwF7xI5DZxn04Yh9z7N-xLhmVkTU_xESybZYu-pNDdX_G5izObVRi7Ox2QUeneo8Xhh-UVufDNp_btKp2oPdlhTusfsSD4BnxaT1n0-Kb8BnzKT4_d0D_4HqQR8KktG4NOx5-vAfwUAAP__7FobXg">