[flang] Changes to enforce constraints C727 to C730 and most constraints related...
authorPete Steinfeld <psteinfeld@nvidia.com>
Fri, 20 Mar 2020 03:07:01 +0000 (20:07 -0700)
committerPete Steinfeld <psteinfeld@nvidia.com>
Tue, 24 Mar 2020 16:24:49 +0000 (09:24 -0700)
commite17e71735e902fbbe3e3845fed18341c1492df0d
tree00921ff8393cfba30712dcc3afd51fd819a90f32
parent23c227a97157758587a9f95ef6c2b5bfc13f95e2
[flang] Changes to enforce constraints C727 to C730 and most constraints related to attributes

The full list of constraints is C727, C728, C729, C730, C743, C755, C759, C778,
and C1543.

I added a function to tools.cpp to check to see if a symbol name is the name
of an intrinsic type.

The biggest change was to resolve-names.cpp to check to see if attributes were
either duplicated or in conflict with each other.  I changed all locations
where attributes were set to check for duplicates or conflicts.

I also added tests for all checks and annotated the tests and code with the
numbers of the constraints being tested/checked.

Original-commit: flang-compiler/f18@3f30e8a61e605b9ca6a67791469053286ae563b2
Reviewed-on: https://github.com/flang-compiler/f18/pull/1084
15 files changed:
flang/include/flang/Semantics/attr.h
flang/include/flang/Semantics/tools.h
flang/lib/Semantics/check-declarations.cpp
flang/lib/Semantics/expression.cpp
flang/lib/Semantics/resolve-names.cpp
flang/lib/Semantics/tools.cpp
flang/test/Semantics/kinds02.f90
flang/test/Semantics/resolve78.f90 [new file with mode: 0644]
flang/test/Semantics/resolve79.f90 [new file with mode: 0644]
flang/test/Semantics/resolve80.f90 [new file with mode: 0644]
flang/test/Semantics/resolve81.f90 [new file with mode: 0644]
flang/test/Semantics/resolve82.f90 [new file with mode: 0644]
flang/test/Semantics/resolve83.f90 [new file with mode: 0644]
flang/test/Semantics/resolve84.f90 [new file with mode: 0644]
flang/test/Semantics/resolve85.f90 [new file with mode: 0644]