llvm/flang/lib/semantics
Tim Keith 351dc98948 [flang] Change parse tree to allow DO loop over REAL
It is a common extension to allow DO loops with REAL variable and
bounds. The parse tree currently parses those with the variable
as `scalar-int-variable-name` and the bounds as `scalar-int-expr`.
That causes the INTEGER constraint to be enforced automatically.

Change the grammar and parse tree to treat them as `scalar-variable-name`
and `scalar-expr`. This allows the name and expression to be REAL,
but we will have to verify that they aren't any other type (in a future
change).

To accomplish this, add a template parameter to `LoopBounds` for the type
of the variable name (always `Scalar<Name>` or `Scalar<Integer<Name>>`).
We sometimes need names for the instantiations of `LoopBounds` so add
type aliases like `LoopControl::Bounds` for each one.

Original-commit: flang-compiler/f18@d75aa03970
Reviewed-on: https://github.com/flang-compiler/f18/pull/455
Tree-same-pre-rewrite: false
2019-05-09 08:33:28 -07:00
..
assignment.cc [flang] Replace formatting of CharBlock & string 2019-05-07 09:24:32 -07:00
assignment.h [flang] Remove OwningPointer and ForwardReference 2019-05-06 07:51:07 -07:00
attr.cc [flang] Changed .clang-format so that it will not add a comment after the closing brace of each namespace. Removed all such previous comments from all .cc and .h files 2018-10-25 05:55:23 -07:00
attr.h [flang] Changed .clang-format so that it will not add a comment after the closing brace of each namespace. Removed all such previous comments from all .cc and .h files 2018-10-25 05:55:23 -07:00
canonicalize-do.cc [flang] Simplify Semantics::Perform 2019-03-06 17:07:25 -08:00
canonicalize-do.h [flang] Simplify Semantics::Perform 2019-03-06 17:07:25 -08:00
check-allocate.cc [flang] Replace formatting of CharBlock & string 2019-05-07 09:24:32 -07:00
check-allocate.h [flang] First batch of semantics checks for allocate 2019-04-23 03:05:56 -07:00
check-arithmeticif.cc [flang] Use SomeExpr rather than GenericExprWrapper in checkers 2019-04-19 08:22:28 -07:00
check-arithmeticif.h [flang] Cleanup -- Remove unnecessary inline keyword, 2019-04-11 15:20:14 -07:00
check-coarray.cc [flang] Replace formatting of CharBlock & string 2019-05-07 09:24:32 -07:00
check-coarray.h [flang] Save and fetch analyzed Expr in Variable 2019-04-18 17:48:55 -07:00
check-deallocate.cc [flang] Move HasError, SetError to SemanticsContext 2019-04-25 14:47:39 -07:00
check-deallocate.h [flang] Cleanup -- Remove unnecessary inline keyword, 2019-04-11 15:20:14 -07:00
check-do-concurrent.cc [flang] Added a TODO to include the name of the IMPURE procedure in the error 2019-05-09 10:58:55 -07:00
check-do-concurrent.h [flang] Remove the IF specific context classes; in these cases they 2019-03-26 18:03:33 -07:00
check-if-stmt.cc [flang] Reactivate tree-driven constraint checking on expressions. 2019-04-15 09:41:41 -07:00
check-if-stmt.h [flang] Cleanup -- Remove unnecessary inline keyword, 2019-04-11 15:20:14 -07:00
check-io.cc [flang] Remove support for Names in messages for now. 2019-05-07 10:04:21 -07:00
check-io.h [flang] Clause 12 semantics -- Check all constraints not otherwise checked (flang-compiler/f18#427) 2019-04-30 11:28:16 -07:00
check-nullify.cc [flang] Move HasError, SetError to SemanticsContext 2019-04-25 14:47:39 -07:00
check-nullify.h [flang] Cleanup -- Remove unnecessary inline keyword, 2019-04-11 15:20:14 -07:00
check-return.cc [flang] FindContainingSubprogram returns a pointer, not a reference. 2019-04-15 10:59:12 -07:00
check-return.h [flang] Implement semantic checks for return and alt-return. 2019-04-15 10:59:12 -07:00
check-stop.cc [flang] Use SomeExpr rather than GenericExprWrapper in checkers 2019-04-19 08:22:28 -07:00
check-stop.h [flang] Semantics checker for STOP and ERROR STOP statements - post review changes 2019-04-17 14:13:23 -07:00
CMakeLists.txt [flang] Move ProgramTree to its own file 2019-05-06 10:12:27 -07:00
expression.cc [flang] Change parse tree to allow DO loop over REAL 2019-05-09 08:33:28 -07:00
expression.h [flang] Remove OwningPointer and ForwardReference 2019-05-06 07:51:07 -07:00
mod-file.cc [flang] Replace formatting of CharBlock & string 2019-05-07 09:24:32 -07:00
mod-file.h [flang] Simplify Semantics::Perform 2019-03-06 17:07:25 -08:00
program-tree.cc [flang] Move ProgramTree to its own file 2019-05-06 10:12:27 -07:00
program-tree.h [flang] Move ProgramTree to its own file 2019-05-06 10:12:27 -07:00
resolve-labels.cc [flang] Replace formatting of CharBlock & string 2019-05-07 09:24:32 -07:00
resolve-labels.h [flang] Changed .clang-format so that it will not add a comment after the closing brace of each namespace. Removed all such previous comments from all .cc and .h files 2018-10-25 05:55:23 -07:00
resolve-names-utils.cc [flang] Move ProgramTree to its own file 2019-05-06 10:12:27 -07:00
resolve-names-utils.h [flang] Move ProgramTree to its own file 2019-05-06 10:12:27 -07:00
resolve-names.cc [flang] Change parse tree to allow DO loop over REAL 2019-05-09 08:33:28 -07:00
resolve-names.h [flang] Simplify Semantics::Perform 2019-03-06 17:07:25 -08:00
rewrite-parse-tree.cc [flang] Remove support for Names in messages for now. 2019-05-07 10:04:21 -07:00
rewrite-parse-tree.h [flang] Simplify Semantics::Perform 2019-03-06 17:07:25 -08:00
scope.cc [flang] Replace formatting of CharBlock & string 2019-05-07 09:24:32 -07:00
scope.h [flang] Delete the default copy constructor for Scope. 2019-04-15 10:30:40 -07:00
semantics.cc [flang] Clause 12 semantics -- Check all constraints not otherwise checked (flang-compiler/f18#427) 2019-04-30 11:28:16 -07:00
semantics.h [flang] Replace formatting of CharBlock & string 2019-05-07 09:24:32 -07:00
symbol.cc [flang] Process specification parts before execution parts 2019-05-06 07:26:43 -07:00
symbol.h [flang] Remove OwningPointer and ForwardReference 2019-05-06 07:51:07 -07:00
tools.cc [flang] lib/evaluate work for structure constructors 2019-05-03 11:29:15 -07:00
tools.h [flang] lib/evaluate work for structure constructors 2019-05-03 11:29:15 -07:00
type.cc [flang] Replace formatting of CharBlock & string 2019-05-07 09:24:32 -07:00
type.h [flang] lib/evaluate work for structure constructors 2019-05-03 11:29:15 -07:00
unparse-with-symbols.cc [flang] Change when symbol is set in parser::Name 2018-12-06 07:16:52 -08:00
unparse-with-symbols.h [flang] Changed .clang-format so that it will not add a comment after the closing brace of each namespace. Removed all such previous comments from all .cc and .h files 2018-10-25 05:55:23 -07:00