camfort / fortran-src

Fortran parsing and static analysis infrastructure
https://hackage.haskell.org/package/fortran-src
Other
48 stars 20 forks source link

fix renaming edge case ambiguity #195

Closed raehik closed 2 years ago

raehik commented 2 years ago

Previously, symbols like int and int1 could have the same unique name generated for them, depending on the fresh number used e.g. n=12: int -> int12; n=2: int1 -> int12. This can break things further up that expect unique names to be, well, unique. Adding a separator between the variable and the fresh number prevents this type of edge case from occurring.

Also see the GitHub discussion for further info: https://github.com/camfort/fortran-src/issues/190