llvm/flang/lib/semantics
Tim Keith 543b15bca4 [flang] Add support for common blocks
A symbol for a common block has `CommonBlockDetails` which contains
a list of the symbols that are in the common block.

The name of the symbol for the blank common block is the empty string.
That preserves the property that every symbol name is a substring of
the cooked source. We use the 0-length substring starting at the COMMON
statement so that when symbols are sorted by the location of the start
of the name it ends up in the right place.

Some of the checks on members of common blocks don't happen until the
end of the scope. They can't happen earlier because we don't necessarily
know the type and attributes.

Enhance `test_errors.sh` so that multiple errors can be expected for
a single line.

Original-commit: flang-compiler/f18@2c4ca6b5d3
Reviewed-on: https://github.com/flang-compiler/f18/pull/286
2019-02-14 07:59:20 -08:00
..
assignment.cc [flang] basic skeleton of assignment analyzer 2019-01-17 10:41:08 -08:00
assignment.h [flang] basic skeleton of assignment analyzer 2019-01-17 10:41:08 -08:00
attr.cc
attr.h
canonicalize-do.cc [flang] Change formatting of common::visitors{} 2018-11-29 09:27:34 -08:00
canonicalize-do.h
check-do-concurrent.cc [flang] Refactoring: improve some names 2018-12-17 12:41:43 -08:00
check-do-concurrent.h
CMakeLists.txt [flang] Remove SHARED from add_library(), use cmake command line option instead 2019-01-22 16:31:20 -08:00
dump-parse-tree.h [flang] basic skeleton of assignment analyzer 2019-01-17 10:41:08 -08:00
expression.cc [flang] Resolve kind parameters on literal constants 2019-02-08 16:03:23 -08:00
expression.h [flang] Resolve kind parameters on literal constants 2019-02-08 16:03:23 -08:00
mod-file.cc [flang] Add support for common blocks 2019-02-14 07:59:20 -08:00
mod-file.h [flang] Move default intrinsic type kinds from lib/semantics to lib/common 2019-01-22 16:31:18 -08:00
resolve-labels.cc [flang] Fix for both issues 274 and 278 2019-02-08 10:53:18 -08:00
resolve-labels.h
resolve-names.cc [flang] Add support for common blocks 2019-02-14 07:59:20 -08:00
resolve-names.h
rewrite-parse-tree.cc [flang] Strengthen checking for unresolved names 2019-02-11 10:58:20 -08:00
rewrite-parse-tree.h
scope.cc [flang] Convert structs to classes, move some defs from variable.h to call.h 2019-01-31 16:04:17 -08:00
scope.h [flang] Address review comments, fix some f90_correct failures 2019-01-31 09:59:37 -08:00
semantics.cc [flang] Run expression semantic analysis with rest of semantics. 2019-01-31 09:59:28 -08:00
semantics.h [flang] Run expression semantic analysis with rest of semantics. 2019-01-31 09:59:28 -08:00
symbol.cc [flang] Add support for common blocks 2019-02-14 07:59:20 -08:00
symbol.h [flang] Add support for common blocks 2019-02-14 07:59:20 -08:00
type.cc [flang] Add support for common blocks 2019-02-14 07:59:20 -08:00
type.h [flang] Add support for common blocks 2019-02-14 07:59:20 -08: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