Skip to content
Commit 1243a0d1 authored by Tim Keith's avatar Tim Keith
Browse files

[flang] Detect incorrect use of assumed-type dummy arguments

Assumed-type dummy arguments can only be used as actual arguments. If
they are used in other contexts it is an error. Change argument analysis
to handle these differently depending on the context. `allowAssumedType`
is set when the argument can be assumed-type. These expressions now all
get `typedExpr` set to `nullopt`.

Change `AnalyzeSectionSubscripts` to analyze all of the subscripts
even if one has an error. This ensures they all get analyzed expressions
(or `nullopt` in case of error).

Fix a bug analyzing `BoundsRemapping`: the lower bound was analyzed
twice and the upper bound not at all.

These change mean that `typedExpr` is set in all known cases.
Fixes flang-compiler/f18#915.

Original-commit: flang-compiler/f18@679ef69905e39f39454768264059afd85b615840
Reviewed-on: https://github.com/flang-compiler/f18/pull/923
parent b37ba4d3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment