Find a file
Tim Keith 0d701085e0 [flang] Fix bug in adding symbols to parse tree.
We were collecting symbols in a map of SourceName to Symbol*.
This is wrong because sometimes different occurrences of a name
map to different symbols (e.g. in different scopes).
SourceName::begin() is unique for each occurrence so use that
as the map key instead.

The problem can be reproduced by running:
`f18 -fdebug-resolve-names -fparse-only -fdebug-dump-parse-tree`
on the following source. The two symbols 'i' should have different
types and they were both coming out as INTEGER because they both
pointed to the first symbol for 'i'.

```
module m
  integer :: i
contains
  subroutine s
    real :: i
  end
end
```

Original-commit: flang-compiler/f18@a165c717ff
Reviewed-on: https://github.com/flang-compiler/f18/pull/107
Tree-same-pre-rewrite: false
2018-06-19 14:59:41 -07:00
flang [flang] Fix bug in adding symbols to parse tree. 2018-06-19 14:59:41 -07:00