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

    <tr>
        <th>Summary</th>
        <td>
            [Flang][debug] conflicting debug info for argument
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            flang
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          k-arrows
      </td>
    </tr>
</table>

<pre>
    Reproducible on Godbolt:
https://godbolt.org/z/c8e9ob5Gb

Reproducer:
```f90
function s(x)
    character(len=2) :: x, s, ss

    s = x

    entry ss()

end function s
```

Error message:
```console
conflicting debug info for argument
#dbg_declare(ptr %0, !15, !DIExpression(), !11)
!12 = !DILocalVariable(name: "s", arg: 1, scope: !4, file: !2, line: 2, type: !9)
!15 = !DILocalVariable(name: "ss", arg: 1, scope: !4, file: !2, line: 2, type: !9)
conflicting debug info for argument
#dbg_declare(ptr %0, !25, !DIExpression(), !23)
!22 = !DILocalVariable(name: "s", arg: 1, scope: !18, file: !2, line: 2, type: !9)
!25 = !DILocalVariable(name: "ss", arg: 1, scope: !18, file: !2, line: 2, type: !9)
error: failed to create the LLVM module
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0VMFu3CAQ_Rp8QVnB2GTtgw9JHEeV0ksPuVYYj720LKwAp5t-fYXtbDbpoVGUSivW85g3vHmCkSHo0SLWRFwT0WRyijvn658X0nv3K2Sd65_qb3jwrp-U7gxSZ-md6ztnIsmvCGsIu9rFeAgpgpZAOy67G-dHAu1vAq0qsXKduOuW9GV9Lor-VIdcsuU3VGxBhsmqqJ2lgUB5JFAtMKWUqp30UkX0BEqDluQNEKhoKpZf0SOBm0S6oSGcn5qYgZK8oce3MNron1I6lKeDlhVtT8-UvNZ6nnjrvfN0jyHIEf9uSzkbnMEFVc4ORquo7Uh77KaRajs4OjhPpR-nPdq40iHvu_F7j8pIjwTKQ_SUgGCpOwKci_Wj-XJ7PHgMQTu7NrFm8JeGgHOY-58J905J8yC9lp1Jpa3cJ92UAAQCkPjSjwnhs5fKHdZ9XiRg0OY5npONtnM8B_HplFy9EiDeJ-A_Kfg04-GfxkN-3jd8jvG8_LDz8EnOf1QCpveR0EFqgz2NjiqPMiKNO6T39w9f6d710_MTOT2crK_zvsormWHNtzkvebnlItvV1QAwKKZYl0vBi0rlOYqeDz3jrGMwZLoGBgXnfMuKQnCxkSAuywKHHMW2StoKhnupzcaYx32aWZkOYcKa80sBIjOyQxPm6QgwGGnHZI1oMl8nwkU3jYEUzOgQw0uJqKOZR2o7M0RDxPV81Yho6DvuXzZ5U7-Zqjrupm6j3J5Amw5a_y4O3v1AFQm0s_BAoF21P9bwJwAA___YmqWy">