[flang] Resolve and check names in equivalence sets
Collect sets of `parser::EquivalenceObject` to process at the end of the specification part. This is so that names mentioned in the EQUIVALENCE statement don't trigger implicit declarations. The `EquivalenceSets` class performs most of the numerous checks on objects that can be in equivalence sets at all and objects that can be in them together. It also merges sets when the same object appears in more than one. Once equivalence sets are checked they are added to the `Scope`. Further checks will be necessary after the size and alignment of variables are computed. Add `FindUltimateComponent` to simplify checks on ultimate components of derived types. Use it to implement `HasCoarrayUltimateComponent` and checks on equivalence objects. Make `ExpressionAnalyzer::Analyze(Designator)` public so that `parser::EquivalenceObject` can be analyzed. Add `GetDefaultKind`, `doublePrecisionKind`, and `quadPrecisionKind` to `SemanticsContext` so that `defaultKinds_` does not need to be accessed directly. Original-commit: flang-compiler/f18@1cc898e5b8d5dbda19748d8bc2ee8cba5c7df4ec Reviewed-on: https://github.com/flang-compiler/f18/pull/494 Tree-same-pre-rewrite: false
Loading
Please sign in to comment