Commit graph

2924 commits

Author SHA1 Message Date
David Truby d545a132bc [flang] Link against zlib when LLVM does.
Original-commit: flang-compiler/f18@2260abe4c2
Reviewed-on: https://github.com/flang-compiler/f18/pull/1043
2020-03-02 14:19:10 +00:00
Tim Keith 7547f76928 [flang] Merge pull request flang-compiler/f18#1046 from flang-compiler/tsk-comps
Improve checking of structure constructor keywords

Original-commit: flang-compiler/f18@c80c72d6f9
Reviewed-on: https://github.com/flang-compiler/f18/pull/1046
2020-03-03 13:28:04 -08:00
Tim Keith 47452b9691 [flang] Improve checking of structure constructor arguments
When a misparsed FunctionReference was converted to a StructureConstructor,
the components accessed were not checked for accessibility.

The conversion happens in expression analysis so that where the accessibity
must be checked. So move `CheckAccessibleComponent` to `tools.h` so that it
can be shared by `resolve-names.cpp` and `expression.cpp`.

Add FindModuleContaining to help implement this and use it other places.

Check that an access-spec can only appear in a module.

Remove some unnecessary "semantics::" qualifiers.

Original-commit: flang-compiler/f18@99ce156e49
Reviewed-on: https://github.com/flang-compiler/f18/pull/1046
2020-03-03 13:24:09 -08:00
Tim Keith f30c0307c1 [flang] Merge pull request flang-compiler/f18#1039 from flang-compiler/tsk-arrays
Improve array element errors

Original-commit: flang-compiler/f18@899ef78d6a
Reviewed-on: https://github.com/flang-compiler/f18/pull/1039
2020-03-02 16:53:22 -08:00
Tim Keith 3495c78214 [flang] Improve array element errors
When something is parsed as an array element it was sometimes intended
to be a function call or structure constructor. So if the base name is
not found the errors can be confusing. This is an attempt to improve
them.

When the subscript list is empty, it was probably meant to be a function
call, so report that the name is not a function.

If the base is a scalar but there are subscripts, report that it is not
an array.

Original-commit: flang-compiler/f18@e2fd5333ff
Reviewed-on: https://github.com/flang-compiler/f18/pull/1039
2020-03-02 16:45:02 -08:00
Tim Keith 4ffbdb3d35 [flang] Merge pull request flang-compiler/f18#1044 from flang-compiler/tsk-data
Expression analysis on DataStmtConstant

Original-commit: flang-compiler/f18@1611fd8e9e
Reviewed-on: https://github.com/flang-compiler/f18/pull/1044
2020-03-02 13:37:33 -08:00
Tim Keith 2a00c617d6 [flang] Expression analysis on DataStmtConstant
Data statements contains expressions but they are not wrapped in one of
the kinds of parse tree nodes that are analyzed, like `parser::Expr`.
So potential errors were not discovered.

Change `ExprChecker` to handle `DataStmtConstant` and analyze any
expressions that are contained in it. Note that the analyzed form of
the expression is not yet saved in the parse tree.

Original-commit: flang-compiler/f18@8bdaf0a521
Reviewed-on: https://github.com/flang-compiler/f18/pull/1044
2020-03-02 07:59:29 -08:00
vjayathirtha-nv 015075840d [flang] Merge pull request flang-compiler/f18#1037 from vjayathirtha-nv/master
Add semantic checks C8104, C8105. Add tests for C8103, C8104, C8105

Original-commit: flang-compiler/f18@f2a4e5c685
Reviewed-on: https://github.com/flang-compiler/f18/pull/1037
2020-02-27 16:05:22 -08:00
Varun Jayathirtha 92c1f6bb98 [flang] Add semantic checks C8104, C8105. Add tests for C8103, C8104, C8105
Original-commit: flang-compiler/f18@8134fc477e
Reviewed-on: https://github.com/flang-compiler/f18/pull/1037
2020-02-27 15:55:46 -08:00
psteinfeld a5ff3ac51e [flang] Merge pull request flang-compiler/f18#1031 from flang-compiler/ps-types
Semantic checks for C712 through C727

Original-commit: flang-compiler/f18@d6898ab882
Reviewed-on: https://github.com/flang-compiler/f18/pull/1031
2020-02-27 13:57:27 -08:00
Pete Steinfeld 84b2909ded [flang] Responses to pull request comments
I cleaned up some code and reverted a change to semantic checking for
the exponent letter in REAL literals.

Original-commit: flang-compiler/f18@e81f57fcf5
Reviewed-on: https://github.com/flang-compiler/f18/pull/1031
2020-02-27 08:49:40 -08:00
Pete Steinfeld 657aaf8b8d [flang] Semantic checks for C712 through C727
I've updated the compiler and test source with references to the contraints at
the points where they were enforced and tested.  Many of these were already
implemented and required no code change.  A few constraint checks were both
implemented and tested, and I only added references to the constraint
numbers in the compiler source and tests.  Here are the things I had to
implement:

Constraint C716 states that, in a REAL constant, if both a kind-param and an
exponent letter appear, the exponent letter must be 'E'.

Constraints C715 and C719 require that a KIND value be actually implemented.

Constraint C722 requires that functions that return assumed-length character
types are external.

Constraint C726 disallows assumed lenght charater types for dummy arguments and
return types.

Original-commit: flang-compiler/f18@45998741e5
Reviewed-on: https://github.com/flang-compiler/f18/pull/1031
Tree-same-pre-rewrite: false
2020-02-26 20:19:48 -08:00
Tim Keith c388d26f41 [flang] Merge pull request flang-compiler/f18#1024 from flang-compiler/tsk-rewrite
Fix misparsed structure constructor in data stmt

Original-commit: flang-compiler/f18@7649e5d705
Reviewed-on: https://github.com/flang-compiler/f18/pull/1024
2020-02-26 19:20:57 -08:00
Tim Keith 914a91c1c3 [flang] Fix misparsed structure constructor in data stmt
In a data statement like `data x / a(1) /`, `a(1)` may be an array
element or a structure constructor. It is parsed as an array element
so if it turns out `a` is a derived type it must be rewritten as a
strucutre constructor.

Original-commit: flang-compiler/f18@a2b2a330e7
Reviewed-on: https://github.com/flang-compiler/f18/pull/1024
2020-02-25 17:13:56 -08:00
Tim Keith 327ec4d2f2 [flang] Merge pull request flang-compiler/f18#1014 from flang-compiler/tsk-where
Remove use of std::set::merge

Original-commit: flang-compiler/f18@59c14bad32
Reviewed-on: https://github.com/flang-compiler/f18/pull/1014
2020-02-26 16:10:49 -08:00
Tim Keith c875618506 [flang] Remove use of std::set::merge
Some versions of clang that we are building with don't have
std::set::merge, even though it is part of C++17. Work around
that by using std::set::insert until we can count on merge being
available everywhere.

Original-commit: flang-compiler/f18@886ccc37fb
Reviewed-on: https://github.com/flang-compiler/f18/pull/1014
2020-02-26 16:10:11 -08:00
Peter Waller 42cc44fbc8 [flang] Add script to flatten git history for llvm monorepo submission (flang-compiler/f18#854)
This script, when run on a checkout of the f18 repository, takes the
current origin/master and makes a branch called "new" with a rewritten
history;

The "new" branch has a flat git history (that is, a series of commits
with only one parent). Flattening is done for merge commits by taking
the content of the commit as it is at the merge commit.

Original-commit: flang-compiler/f18@d9871fa9eb
Reviewed-on: https://github.com/flang-compiler/f18/pull/854
2020-02-26 11:50:43 -08:00
Peter Klausler dec83a5e10 [flang] Merge pull request flang-compiler/f18#1021 from flang-compiler/pmk-ieee-128
Fix layout of 128-bit IEEE-754 floating-point values

Original-commit: flang-compiler/f18@91feed7a38
Reviewed-on: https://github.com/flang-compiler/f18/pull/1021
2020-02-26 08:54:41 -08:00
peter klausler b7a5b5c7b6 [flang] Fix layout of 128-bit IEEE-754 floating-point values
Original-commit: flang-compiler/f18@c95c45704e
Reviewed-on: https://github.com/flang-compiler/f18/pull/1021
2020-02-26 08:23:44 -08:00
jeanPerier 844e7628b0 [flang] Merge pull request flang-compiler/f18#1026 from flang-compiler/jpr-drone-fix
Fix drone CI build failure due to lack of FileCheck

Original-commit: flang-compiler/f18@a5644a4e8e
Reviewed-on: https://github.com/flang-compiler/f18/pull/1026
2020-02-26 07:15:42 -08:00
Jean Perier 13c7778df9 [flang] Remove clang from LLVM drone builds until needed to fasten builds
Original-commit: flang-compiler/f18@5eaebc800c
Reviewed-on: https://github.com/flang-compiler/f18/pull/1026
2020-02-26 06:16:22 -08:00
Jean Perier c3ce28b8b4 [flang] Fix drone CI build failure due to lack of FileCheck
Simply use the llvm build directory and save installing LLVM on the way.

Original-commit: flang-compiler/f18@7848ab146a
Reviewed-on: https://github.com/flang-compiler/f18/pull/1026
Tree-same-pre-rewrite: false
2020-02-26 03:49:42 -08:00
Tim Keith 05e649376b [flang] Merge pull request flang-compiler/f18#1023 from flang-compiler/tsk-issue1022
Allow for access-stmt before namelist-stmt

Original-commit: flang-compiler/f18@618dc08139
Reviewed-on: https://github.com/flang-compiler/f18/pull/1023
2020-02-25 15:32:06 -08:00
Tim Keith de066a2756 [flang] Allow for access-stmt before namelist-stmt
You can declare a name in an access statement and then declare it as
a namelist group name. We weren't allowing that because we didn't
convert a symbol with UnknownDetails to one with NamelistDetails.

Fixes flang-compiler/f18#1022.

Original-commit: flang-compiler/f18@a759204db5
Reviewed-on: https://github.com/flang-compiler/f18/pull/1023
2020-02-25 15:22:13 -08:00
David Truby 0855c45400 [flang] Replace module writer posix file handling with llvm file handling. (flang-compiler/f18#993)
NOTE: This commit introduces a dependency on LLVM HEAD

Original-commit: flang-compiler/f18@97efc0194d
Reviewed-on: https://github.com/flang-compiler/f18/pull/993
2020-02-25 07:59:50 -08:00
CarolineConcatto 64ab3302d5 [flang] [LLVMify F18] Compiler module folders should have capitalised names (flang-compiler/f18#980)
This patch renames the modules in f18 to use a capital letter in the
module name

Signed-off-by: Caroline Concatto <caroline.concatto@arm.com>

Original-commit: flang-compiler/f18@d2eb7a1c44
Reviewed-on: https://github.com/flang-compiler/f18/pull/980
2020-02-25 07:11:52 -08:00
Tim Keith 456a61d188 [flang] Merge pull request flang-compiler/f18#1013 from flang-compiler/tsk-rewrite
Temporarily disable part of data01 test

Original-commit: flang-compiler/f18@cf48fe8746
Reviewed-on: https://github.com/flang-compiler/f18/pull/1013
2020-02-21 16:25:54 -08:00
Tim Keith 6374eea9cf [flang] Temporarily disable part of data01 test
`data x /a(1)/` is ambiguous. The data value may be an array element
or a structure constructor. We need to parse it as one of these and
then fix up the parse tree when it should have been the other one.

My PR 1012 changed the parser to identify this as an array element.
That makes this test invalid until we have the right parse tree fixup,
so I am disabling it for now.

Original-commit: flang-compiler/f18@72aa278f03
Reviewed-on: https://github.com/flang-compiler/f18/pull/1013
2020-02-21 16:25:10 -08:00
Tim Keith b7af30a33b [flang] Merge pull request flang-compiler/f18#1009 from flang-compiler/tsk-where
Add more checks on WHERE and FORALL

Original-commit: flang-compiler/f18@c9638d10c6
Reviewed-on: https://github.com/flang-compiler/f18/pull/1009
2020-02-21 15:48:52 -08:00
Tim Keith e0ba2b8783 [flang] Add more checks on WHERE and FORALL
Check that masks and LHS of assignments in WHERE statements and
constructs have consistent shapes. They must all have the same rank and
any extents that are compile-time constants must match.

Emit a warning for assignments in FORALL statements and constructs where
the LHS does not reference each of the index variables.

Original-commit: flang-compiler/f18@8b04dbebcf
Reviewed-on: https://github.com/flang-compiler/f18/pull/1009
2020-02-21 15:47:01 -08:00
Tim Keith 703c56132b [flang] Merge pull request flang-compiler/f18#1012 from flang-compiler/tsk-rewrite
Fix parsing bug on DATA statement

Original-commit: flang-compiler/f18@b9f2617f55
Reviewed-on: https://github.com/flang-compiler/f18/pull/1012
2020-02-21 15:46:24 -08:00
Tim Keith 28d8a67d43 [flang] Fix parsing bug on DATA statement
This DATA statement was getting a parsing error:
`data x /a(i)%b/`

The parser was expecting the ending '/' where the '%' was. The problem
was parsing `a(i)` as a structure constructor. Instead, move the
constant subobject case before structure constructor, but match it only
if not followed by '('. That is because in `data x /a(1)(2)/`, `a(1)` is
a valid structure constructor.

Also, remove the NamedConstant alternative from DataStmtRepeat. A named
constant is always parsed as a ConstantSubobject so it can never occur.

Original-commit: flang-compiler/f18@04a76b2726
Reviewed-on: https://github.com/flang-compiler/f18/pull/1012
2020-02-21 15:31:12 -08:00
Anchu Rajendran S df1b4b144e [flang] Issue flang-compiler/f18#992 : Implementing Semantic checks for DATA Statement (C874-C887) (flang-compiler/f18#992)
This commit covers Semantic Constraints C882 - C887

C882 : It was partially Implemented. Finished the implementation
and added test case
C884 : Implemented and added test case
C883 : Implementation was there already. Added test case
C885, C886, C887 : Implementation was there already. Added test case for
data-repeat.

Original-commit: flang-compiler/f18@822129736b
Reviewed-on: https://github.com/flang-compiler/f18/pull/992
2020-02-20 22:19:14 -08:00
Isuru Fernando ca861fd494 [flang] Add missing array include (flang-compiler/f18#1004)
Original-commit: flang-compiler/f18@de801a0db7
Reviewed-on: https://github.com/flang-compiler/f18/pull/1004
2020-02-20 13:12:48 -08:00
Isuru Fernando 256b53688e [flang] Disable 80-bit extended precision if on MSVC (flang-compiler/f18#1003)
Original-commit: flang-compiler/f18@2c1fc63758
Reviewed-on: https://github.com/flang-compiler/f18/pull/1003
2020-02-20 11:33:43 -08:00
Tim Keith 4aea41c907 [flang] Merge pull request flang-compiler/f18#989 from flang-compiler/tsk-forall
Add FORALL checking to DoChecker

Original-commit: flang-compiler/f18@35fd0cda58
Reviewed-on: https://github.com/flang-compiler/f18/pull/989
2020-02-19 13:42:30 -08:00
Tim Keith aafc1578ae [flang] Rename DoChecker to DoForallChecker
This reflects the fact that it now performs checks on both DO
and FORALL constructs. Rename the source files as well.

Original-commit: flang-compiler/f18@8ecb6a279f
Reviewed-on: https://github.com/flang-compiler/f18/pull/989
2020-02-19 13:28:19 -08:00
Tim Keith ee7cc4764f [flang] Add FORALL checking to DoChecker
FORALL statements and constructs require a lot of the same checking
as DO CONCURRENT, so do the checks in DoChecker so that code can be
shared where possible. This requires some reorganization there.
Remove code from AssignmentChecker that did some of these checks.

Change names that contain `DoVar` or `DoVariable` to `IndexVar` to
reflect the fact that they may be DO or FORALL index variables.
Distinguish between the two when necessary with enum `IndexVarKind`.

Change some messages that referred to "concurrent-header" or
"concurrent-control" to specifically say "DO CONCURRENT" or "FORALL".

Original-commit: flang-compiler/f18@84752c492e
Reviewed-on: https://github.com/flang-compiler/f18/pull/989
Tree-same-pre-rewrite: false
2020-02-18 17:14:24 -08:00
Tim Keith 88aa96ffe9 [flang] Reorganize evaluate::Assignment
Every analyzed assignment represented by `evaluate::Assignment` has
a LHS and RHS expression. These need to be checked uniformly in various
places. So change Assignment always to have those data members, with
the variant determining which kinds of assignment it is: intrinsic,
user-defined, or pointer.

Original-commit: flang-compiler/f18@fb87d16a86
Reviewed-on: https://github.com/flang-compiler/f18/pull/989
Tree-same-pre-rewrite: false
2020-02-18 15:20:28 -08:00
psteinfeld 79c467b1a8 [flang] Merge pull request flang-compiler/f18#985 from flang-compiler/ps-types
Semantic checks for C709, C710, and C711

Original-commit: flang-compiler/f18@fa6d4753b7
Reviewed-on: https://github.com/flang-compiler/f18/pull/985
2020-02-19 12:24:46 -08:00
Pete Steinfeld 4d0c8522e3 [flang] Semantic checks for C709, C710, and C711
C709 An assumed-type entity shall be a dummy data object that does not
have the ALLOCATABLE, CODIMENSION, INTENT (OUT), POINTER, or VALUE
attribute and is not an explicit-shape array.

C710 An assumed-type variable name shall not appear in a designator or
expression except as an actual argument corresponding to a dummy
argument that is assumed-type, or as the first argument to the intrinsic
function IS_CONTIGUOUS, LBOUND, PRESENT, RANK, SHAPE, SIZE, or UBOUND,
or the function C_LOC from the intrinsic module ISO_C_BINDING.

C711 An assumed-type actual argument that corresponds to an assumed-rank
dummy argument shall be assumed-shape or assumed-rank.

For C709 I added code to check-declarations.cpp.  For this, I had to
distinguish between polymorphic types and assumed-type types to
eliminate multiple messages on the same line.

C710 was already checked, but I added a notation in the source.

For C711 I added code to check-call.cpp and the test call15.f90.

Original-commit: flang-compiler/f18@4a703f2b5a
Reviewed-on: https://github.com/flang-compiler/f18/pull/985
2020-02-19 11:58:29 -08:00
jeanPerier d49804cde5 [flang] Merge pull request flang-compiler/f18#994 from flang-compiler/jpr-fix-shared-builds
Fix issues with -DBUILD_SHARED_LIBS=On

Original-commit: flang-compiler/f18@a20a80e71e
Reviewed-on: https://github.com/flang-compiler/f18/pull/994
2020-02-19 10:44:59 -08:00
Jean Perier 24b9ef8727 [flang] Fix issues with -DBUILD_SHARED_LIBS=On
This re-ordering allows building f18 with shared library using and LLVM build
with static libraries.

This reordering (that also made sens form an alphabetical point of view)
works here to do such "shared+archive" compiling because the current
dependency on LLVM is simple (only one f18 lib + an executable depends on LLVM).
As soon as two f18 libraries will depend on LLVM, one will have to use an LLVM
version built with -DBUILD_SHARED_LIBS=On if one wants to use this option
to compile f18.

Original-commit: flang-compiler/f18@bbbbe9c1aa
Reviewed-on: https://github.com/flang-compiler/f18/pull/994
2020-02-19 05:25:35 -08:00
Jinxin (Brian) Yang aa9fc5bddc [flang] [OpenMP] Predetermined rule for sequential loop index (flang-compiler/f18#976)
This commit implements rule:
A loop iteration variable for a sequential loop in a parallel or
task generating construct is private in the innermost such construct
that encloses the loop.

A Simple example:
```
  i = -1                    <== Scope 0
  j = -1
  !$omp parallel            <== Scope 1
  print *,i,j      <-- both are shared (Scope 0)
  !$omp parallel            <== Scope 2
  print *,i,j      <-- a) i is shared (Scope 0), j is private (Scope 2)
  !$omp do                  <== Scope 3
  do i=1, 10       <-- i is private (Scope 3)
     do j=1, 10    <-- b) j is private (Scope 2, not 3!)
     enddo
  enddo
  print *,i,j      <-- c) i is shared (Scope 0), j is private (Scope 2)
  !$omp end parallel
  print *,i,j      <-- both are shared (Scope 0)
  !$omp end parallel
  print *,i,j      <-- both are shared (Scope 0)
end
```

Ideally the above rule solves a), b), and c) but a) is left as a TODO
because it is better to handle the data-sharing attribute conflicts
along with the rules for "Predetermined DSA on Clauses".

The basic idea is when visiting the `DoConstruct` node within an OpenMP
construct, if the do-loop is not associated (like `i` loop is associated
with `!$omp do`) AND the do-loop is in the parallel/task generating
construct, resolve the loop index to be private to that innermost construct.

In the above example, `j` loop is not associated (then it is sequential) and
the innermost parallel/task generating construct that encloses the `j` loop
is the `parallel` construct marked with `<== Scope 2`, so `j` is private
to that construct. To do that, I also need to change the prototype of those
`ResolveOmp*` functions to allow specifiying the `scope` because the new
symbol for `j` should be created in Scope 2 and all the `symbol` field of
`Name j` in that `parallel` construct should be fixed, such as c).

Original-commit: flang-compiler/f18@69a845283b
Reviewed-on: https://github.com/flang-compiler/f18/pull/976
2020-02-18 16:27:43 -08:00
jeanPerier 840e19eed8 [flang] Merge pull request flang-compiler/f18#959 from jeanPerier/jpr-mono-split
RFC: FIR Merge - PR1: Add PFTBuilder structure to help lowering the parse-tree

Original-commit: flang-compiler/f18@f28afa7138
Reviewed-on: https://github.com/flang-compiler/f18/pull/959
2020-02-17 09:47:01 -08:00
Jean Perier 3364086795 [flang] Add Pre-FIR Tree structure to help lowering the parse-tree
The Pre-FIR Tree structure is a transient data structure that
is meant to be built from the parse tree just before lowering to
FIR and that will be deleted just afterwards. It is not meant to perfrom
optimization analysis and transformations. It only provides temporary
information, such as label target information or parse tree parent nodes,
that is meant to be used to lower the parse tree structure into
FIR operations.
A PFTBuilder class builds the Pre-Fir Tree from the parse-tree.
A pretty printer is available to visualize this data structure.

- Lit tests are added to:
  1. that the PFT tree structure is as expected
  2. that the PFT captures all intented nodes

- Cmake changes: Prevent warnings inisde LLVM headers when compiling flang

The issue is that some LLVM headers  define functions where the usage of
the parameters depend on environment ifdef. See for instance Size in:
5f940220bf/llvm/include/llvm/Support/Compiler.h (L574)

Because flang is build with -Werror and -Wunused-parameter is default in
clang, this may breaks build in some environments (like with clang9 on macos).
A solution would be to add -Wno-unused-parameter to flang CmakLists.txt,
but it is wished to keep this warning on flang sources for quality purposes.
Fixing LLVM headers is not an easy task and `[[maybe_unused]]` is C++17 and
cannot be used yet in LLVM headers.
Hence, this fix simply silence warnings coming from LLVM headers by telling
CMake they are to be considered as if they were system headers.

- drone.io changes: remove llvm 6.0 from clang config in drone.io and link
flang with libstdc++ instead of libc++

llvm-dev resolved to llvm-6.0 in clang builds on drone.io. llvm 6.0 too old.
LLVM packages are linked with libstdc++ standard library whereas libc++ was
used for flang. This caused link time failure when building clang. Change
frone.io to build flang with libc++.

Note:
This commit does not reflect an actual work log, it is a feature based split of the
changes done in the FIR experimental branch. The related work log can be found in the
commits between:
864898cbe509d032abfe1172ec367dbd3dd92bc1
and
137c23da9c64cf90584cf81fd646053a69e91f63

Other changes come from https://github.com/flang-compiler/f18/pull/959 review.

Original-commit: flang-compiler/f18@edb0943bca
Reviewed-on: https://github.com/flang-compiler/f18/pull/959
2020-02-17 02:38:49 -08:00
Jean Perier c52cd6355c [flang] Add clang-format files for FIR source (LLVM style)
Note:
This commit does not reflect an actual work log, it is a feature based split of the
changes done in the FIR experimental branch. The related work log can be found in the commits between:
8c320e3bf2
and:
9b9ea05f9a

Original-commit: flang-compiler/f18@00d8d5121c
Reviewed-on: https://github.com/flang-compiler/f18/pull/959
Tree-same-pre-rewrite: false
2020-02-17 02:37:49 -08:00
psteinfeld 5334ee6e5f [flang] Merge pull request flang-compiler/f18#981 from flang-compiler/ps-c708
Semantic check for C708

Original-commit: flang-compiler/f18@4d4b375d14
Reviewed-on: https://github.com/flang-compiler/f18/pull/981
2020-02-14 09:27:52 -08:00
Pete Steinfeld 79f38ab4bb [flang] Semantic check for C708
An entity declared with the CLASS keyword shall be a dummy argument or
have the ALLOCATABLE or POINTER attribute.

Implementing this check revealed a problem in the test resolve44.cpp.
It also showed that we were doing semantic checking on the entities
created by the compiler for LOCAL and LOCAL_INIT locality-specs.  So I
changed the creation of symbols associated with LOCAL and LOCAL_INIT
locality-specs to be host associated with the outer symbol rather than
new object entities.  In the process, I also changed things so that the
`parser::Name` associated with the newly created symbols was set to the
symbol rather than being set to nullptr.

Original-commit: flang-compiler/f18@5dd0b0bbe8
Reviewed-on: https://github.com/flang-compiler/f18/pull/981
2020-02-14 08:33:07 -08:00
David Truby d7cee59762 [flang] Add zlib to drone files so that linking LLVM works. (flang-compiler/f18#983)
Original-commit: flang-compiler/f18@403faf847d
Reviewed-on: https://github.com/flang-compiler/f18/pull/983
2020-02-13 20:46:29 -08:00