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

    <tr>
        <th>Summary</th>
        <td>
            [Flang] BINC(C) attribute not propagate to the generic name that is the same as the specific name that has the BIND(C) attribute. 
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            bug,
            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
  USE ISO_C_BINDING

 INTERFACE ExtFun
    FUNCTION ExtFun() BIND(C)
    IMPORT
 INTEGER(C_INT) :: ExtFun
    END FUNCTION
  END INTERFACE

  END MODULE

  PROGRAM MAIN
  USE M
  PROCEDURE(ExtFun), BIND(C), POINTER :: PExtFun
  END
```

Flang currently issues an error as:
```
: error: An interface name with BIND attribute must be specified if the BIND attribute is specified in a procedure declaration statement
    PROCEDURE(ExtFun), BIND(C), POINTER :: PExtFun
 ^^^^^^^
 ```
 
 It passes if I remove the generic name. The `BIND(C)` attribute seems missing from both the generic and specific symbol in the dump.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVE2PozgQ_TXmUpoIHCDhwIHho4W0Ia1M-twyUIBXYEe2mdn-9yvTYUJmZm8roQRcz1WvXj2bac17gRiT4CsJMofNZpAqzpjgOKbpgMKpZfsRp1Jo3qICMyB0chzlDy56aGSLZJ8QNyNuQkL3_iyfAKdz9vZXDqf1--1bDuW383v6_rWssrJ6ue_7DJfVNb8USZpD_o8pZrHuAijeqvRanqs1QI-ERmBzEHpMCY0e0PL0er5cNxlf8osFvZfV1W6yZPfJbxXyKvtZZV21az85PTFdQp_NPa-_Xs4vl-QEp6Sstk2fNoA0z94uOaHHtZmI0PSpGZrC63mpvNJ9feabV9kfFf_8LUZmJzMrhcKMH8C1nlEDE4BKSQVM_9fEbKkFY18SAVwYVB1rEASbEH5wMyxEgRmjeD0bhGnWBmoEfcOGdxxb4N3ikV9wXG8hAhjclGywnRVCi83IFDNcCtCGGZxQmMds_hfNSJD_4bnHfvHt6h4DN6Y1attSCQon-R2X3noUqHizqLKD64A2xZZN6G5a14iTholrbU9Mp-QEtTTDUyYm2lWfBvTHVMvRqmQh7Tzddk4b79toHzEHY-_gHvch9f3QGeJDd_QZBu6x8fwgql3Pi9rI95hXe_U-qDuHx9Slvku9yDu4Bxru3D0iC6O26w6h2wWU-C5OjI-7cfw-7aTqncUw8ZHS8OCMrMZRL7cDpfXcE0oJTQmlnXUZ2SedksKgaG0gyBwV2zRf6rnXxHdHro1-JDbcjMtNs1iUBJkdYXoXbaOYkMba48Z6ZhCM_E10MAMz1lM2oO0Cu7-vGj5Qwz20mc-j1A6cWY3xYMxtORW0ILTouRnmetfIidDCkr__fbkp-Tc2htDi80wRWiwq_RsAAP__PmmM7w">