Tim Keith [Mon, 18 Feb 2019 19:39:46 +0000 (11:39 -0800)]
[flang] More work on COMMON blocks
Common block names can't clash with other names, so add `commonBlocks_`
to `Scope` to record the common blocks of a scoping unit. This requires
changes to how scopes are dumped and written to `.mod` files.
Support common blocks in BIND statements. Add optional bind-name to
`CommonBlockDetails`.
Add `CheckNotInBlock()` for checking statements that are not allowed in
block constructs.
In `rewrite-parse-tree.cc`, no longer skip check for resolved names in
common statements. But do skip the checks in compiler directives.
Original-commit: flang-compiler/f18@
805a1ffd9b7f33ce95d334ef5fe3e864b9f3d69e
Reviewed-on: https://github.com/flang-compiler/f18/pull/298
Tree-same-pre-rewrite: false
Tim Keith [Fri, 15 Feb 2019 18:16:25 +0000 (10:16 -0800)]
[flang] Change handling of BIND attributes
Previously `BIND(C, NAME="...")` caused `bindName` to be set but not
the `BIND` attribute. This made writing the `.mod` file easier, but it
makes it hard to ask: does this symbol have a C binding.
This change causes the `BIND` attribute to be set whenever there is
`BIND(C)` in the source, regardless of whether there is a name or not.
`bindName` is only set when the `BIND` attribute is also set.
Original-commit: flang-compiler/f18@
5a6706ffcbb96c4439a6af5a1f739ad4e7b8c00a
Reviewed-on: https://github.com/flang-compiler/f18/pull/298
Tree-same-pre-rewrite: false
Peter Klausler [Tue, 19 Feb 2019 18:08:42 +0000 (10:08 -0800)]
[flang] Merge pull request flang-compiler/f18#291 from flang-compiler/pmk-recursive-type
Fix recursive use of parameterized derived types (issue flang-compiler/f18#283)
Original-commit: flang-compiler/f18@
4da7f01f077167da2a4734d019b6b15e260adac3
Reviewed-on: https://github.com/flang-compiler/f18/pull/291
peter klausler [Tue, 19 Feb 2019 18:08:10 +0000 (10:08 -0800)]
[flang] address review comments
Original-commit: flang-compiler/f18@
a27f240bd4d5e390e4114be9837db9d264024e08
Reviewed-on: https://github.com/flang-compiler/f18/pull/291
peter klausler [Sat, 16 Feb 2019 00:21:43 +0000 (16:21 -0800)]
[flang] Check for recursive EXTENDS()
Original-commit: flang-compiler/f18@
8d0a9bb36008fdbc5ad86d4857e6ea1a6da6d024
Reviewed-on: https://github.com/flang-compiler/f18/pull/291
Tree-same-pre-rewrite: false
peter klausler [Sat, 16 Feb 2019 00:08:32 +0000 (16:08 -0800)]
[flang] fix flang-compiler/f18#283 - recursive use of derived types
Original-commit: flang-compiler/f18@
f8889b83fcca8630c773dc52482b8236a30254c9
Reviewed-on: https://github.com/flang-compiler/f18/pull/291
Tree-same-pre-rewrite: false
Peter Klausler [Mon, 18 Feb 2019 22:12:57 +0000 (14:12 -0800)]
[flang] Merge pull request flang-compiler/f18#287 from flang-compiler/pmk-struct
Structure constructor semantics
Original-commit: flang-compiler/f18@
b1a822276693abc60d3688ee1262ec553cce4c23
Reviewed-on: https://github.com/flang-compiler/f18/pull/287
peter klausler [Mon, 18 Feb 2019 21:47:34 +0000 (13:47 -0800)]
[flang] Address review comments
Original-commit: flang-compiler/f18@
7662121287a4317e1090e3ca360e2e214d3698cd
Reviewed-on: https://github.com/flang-compiler/f18/pull/287
peter klausler [Fri, 15 Feb 2019 22:26:23 +0000 (14:26 -0800)]
[flang] push for review
Original-commit: flang-compiler/f18@
17dc73591104ee0c171b1d66ef24703ff612d909
Reviewed-on: https://github.com/flang-compiler/f18/pull/287
Tree-same-pre-rewrite: false
peter klausler [Fri, 15 Feb 2019 20:20:30 +0000 (12:20 -0800)]
[flang] Fix CHECK() on wa22 by implementing PGI language extension
Original-commit: flang-compiler/f18@
03fcb58977878ace2cd81cd404d8f6751bd9739b
Reviewed-on: https://github.com/flang-compiler/f18/pull/287
Tree-same-pre-rewrite: false
peter klausler [Thu, 14 Feb 2019 22:37:55 +0000 (14:37 -0800)]
[flang] complete transfer of struct constructor code to expression.cc
Original-commit: flang-compiler/f18@
e6178b2fc73bf7c98bb0519be8866ba799c17029
Reviewed-on: https://github.com/flang-compiler/f18/pull/287
Tree-same-pre-rewrite: false
peter klausler [Thu, 14 Feb 2019 20:51:20 +0000 (12:51 -0800)]
[flang] checkpoint, much code moved out of name resolution
Original-commit: flang-compiler/f18@
8a081e82fa8174414ca07b0b5126dd5e96bb0588
Reviewed-on: https://github.com/flang-compiler/f18/pull/287
Tree-same-pre-rewrite: false
peter klausler [Wed, 13 Feb 2019 20:02:42 +0000 (12:02 -0800)]
[flang] catch up with master
Original-commit: flang-compiler/f18@
e66ef3699c6f4c9c1053305aafeae0eefbe19b9b
Reviewed-on: https://github.com/flang-compiler/f18/pull/287
Tree-same-pre-rewrite: false
peter klausler [Wed, 13 Feb 2019 01:24:43 +0000 (17:24 -0800)]
[flang] checkpoint, tests pass
Original-commit: flang-compiler/f18@
d90d5d92442533b6ebb8c7a9336770347aeed57b
Reviewed-on: https://github.com/flang-compiler/f18/pull/287
Tree-same-pre-rewrite: false
peter klausler [Tue, 12 Feb 2019 00:02:14 +0000 (16:02 -0800)]
[flang] checkpoint
Original-commit: flang-compiler/f18@
6146957713a67d2975ffb295c495578d928b9f8c
Reviewed-on: https://github.com/flang-compiler/f18/pull/287
Tree-same-pre-rewrite: false
peter klausler [Mon, 11 Feb 2019 22:56:03 +0000 (14:56 -0800)]
[flang] Rework Constant<character>
Original-commit: flang-compiler/f18@
fc807bfd7d93895b4f097fae9974d11cd8cc170b
Reviewed-on: https://github.com/flang-compiler/f18/pull/287
Tree-same-pre-rewrite: false
peter klausler [Sat, 9 Feb 2019 00:35:02 +0000 (16:35 -0800)]
[flang] checkpoint
Original-commit: flang-compiler/f18@
156791b2885a455d30f7c78533a7a410188b17b0
Reviewed-on: https://github.com/flang-compiler/f18/pull/287
Tree-same-pre-rewrite: false
peter klausler [Fri, 8 Feb 2019 18:39:10 +0000 (10:39 -0800)]
[flang] checkpoint array/struct constructor work
Original-commit: flang-compiler/f18@
b0a574fa359938936712eada41994601c8df2713
Reviewed-on: https://github.com/flang-compiler/f18/pull/287
Tree-same-pre-rewrite: false
peter klausler [Thu, 7 Feb 2019 20:41:04 +0000 (12:41 -0800)]
[flang] merged with new master
Original-commit: flang-compiler/f18@
03944d5052227c8d738b72fc7f093672c398e0ec
Reviewed-on: https://github.com/flang-compiler/f18/pull/287
Tree-same-pre-rewrite: false
peter klausler [Thu, 7 Feb 2019 20:05:27 +0000 (12:05 -0800)]
[flang] checkpoint Constant<SomeDerived> based on StructureConstructor
Original-commit: flang-compiler/f18@
47986f0c7e1c5e47ac1aa0830c08e1dafe186fd8
Reviewed-on: https://github.com/flang-compiler/f18/pull/287
Tree-same-pre-rewrite: false
peter klausler [Wed, 6 Feb 2019 20:25:28 +0000 (12:25 -0800)]
[flang] Name resolution for structure constructors
Original-commit: flang-compiler/f18@
9d60038f0395464ef73f2f28e27281fb9e72be20
Reviewed-on: https://github.com/flang-compiler/f18/pull/287
Tree-same-pre-rewrite: false
peter klausler [Tue, 5 Feb 2019 18:48:26 +0000 (10:48 -0800)]
[flang] Eliminate DerivedTypeDetails::extends_ since it is front of component list
Original-commit: flang-compiler/f18@
15150225f83545c76cdb02c83e7be4843d388f94
Reviewed-on: https://github.com/flang-compiler/f18/pull/287
Tree-same-pre-rewrite: false
peter klausler [Mon, 4 Feb 2019 20:24:25 +0000 (12:24 -0800)]
[flang] begin work on structure constructors
Original-commit: flang-compiler/f18@
7131a2f91d8bfeed4d675be1db53b52e99acc83f
Reviewed-on: https://github.com/flang-compiler/f18/pull/287
Tree-same-pre-rewrite: false
Tim Keith [Fri, 15 Feb 2019 18:24:51 +0000 (10:24 -0800)]
[flang] Merge pull request flang-compiler/f18#286 from flang-compiler/tsk3
Add support for common blocks
Original-commit: flang-compiler/f18@
6a37805094865577c9e215546eee562c76d56db2
Reviewed-on: https://github.com/flang-compiler/f18/pull/286
Tim Keith [Thu, 14 Feb 2019 15:59:20 +0000 (07:59 -0800)]
[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@
2c4ca6b5d3e5798ef7815a52739a3e642bebd1c9
Reviewed-on: https://github.com/flang-compiler/f18/pull/286
Tim Keith [Thu, 14 Feb 2019 16:41:03 +0000 (08:41 -0800)]
[flang] Merge pull request flang-compiler/f18#282 from flang-compiler/tsk1
Document describing overview of compiler phases
Original-commit: flang-compiler/f18@
9648645634b4cd134f9ca3c8d4e83c33b36bd9b1
Reviewed-on: https://github.com/flang-compiler/f18/pull/282
Tim Keith [Thu, 14 Feb 2019 16:40:19 +0000 (08:40 -0800)]
[flang] Address rest of review comments
Original-commit: flang-compiler/f18@
3aa7303a308e6ecdf22fc217daa28cfe3d273310
Reviewed-on: https://github.com/flang-compiler/f18/pull/282
Tim Keith [Tue, 12 Feb 2019 18:40:52 +0000 (10:40 -0800)]
[flang] Address review comments
Original-commit: flang-compiler/f18@
6b42a1777f4d9b0135b391a6ef97e2af41733060
Reviewed-on: https://github.com/flang-compiler/f18/pull/282
Tree-same-pre-rewrite: false
Tim Keith [Tue, 12 Feb 2019 00:33:20 +0000 (16:33 -0800)]
[flang] Document describing overview of compiler phases
Original-commit: flang-compiler/f18@
ac7a492a25733fa497267cff3aaae724eb3f9d5b
Reviewed-on: https://github.com/flang-compiler/f18/pull/282
Tree-same-pre-rewrite: false
Tim Keith [Wed, 13 Feb 2019 00:22:15 +0000 (16:22 -0800)]
[flang] Merge pull request flang-compiler/f18#284 from flang-compiler/tsk3
Simplify CommonStmt in parse tree
Original-commit: flang-compiler/f18@
5f5430af333a46e843cc7fdefcb9b759ec1bb642
Reviewed-on: https://github.com/flang-compiler/f18/pull/284
Tim Keith [Wed, 13 Feb 2019 00:13:58 +0000 (16:13 -0800)]
[flang] Simplify CommonStmt in parse tree
The grammar requires parsing the first common block in a common stmt
differently from the others: the '//' is optional for the blank common.
But once it's parsed, it is easier to work with if each is represented
as a `parser::CommonStmt::Block`. This is achieved by using the same
constructor for `CommonStmt` but then including the first block in
the list of blocks.
Original-commit: flang-compiler/f18@
dd46afd6b5607ec61ea9b2e97efa16deda31441b
Reviewed-on: https://github.com/flang-compiler/f18/pull/284
Tim Keith [Wed, 13 Feb 2019 00:18:41 +0000 (16:18 -0800)]
[flang] Merge pull request flang-compiler/f18#281 from flang-compiler/tsk4
More name resolution improvements
Original-commit: flang-compiler/f18@
4466041ad0deba9b43f5f0bf3a7ac8477e4e92da
Reviewed-on: https://github.com/flang-compiler/f18/pull/281
Tim Keith [Mon, 11 Feb 2019 18:58:20 +0000 (10:58 -0800)]
[flang] Strengthen checking for unresolved names
Make it a fatal error to have an unresolved name, except for a few
exceptions.
Remove namelist, bind, save statements from the exceptions.
Original-commit: flang-compiler/f18@
b16cbed780964e48dcba41548ce92dcf42716a98
Reviewed-on: https://github.com/flang-compiler/f18/pull/281
Tim Keith [Mon, 11 Feb 2019 18:49:48 +0000 (10:49 -0800)]
[flang] Fix bug setting type from association expression
When an association selector is an expression, we get the type of the
associate-name from the type of the expression. If that is a derived
type, we were failing to get the derived type scope in copy of the
type that was made. That meant the component names were not resolved.
The fix is to copy the scope in the copy and move constructors of
`DerivedTypeSpec`. As a result, `DerivedTypeSpec::Instantiate` cannot
assume that the `scope_` is not set.
Original-commit: flang-compiler/f18@
79eaa8c47fc0f1c1c71bf2760ec0a1e39e2a55ac
Reviewed-on: https://github.com/flang-compiler/f18/pull/281
Tree-same-pre-rewrite: false
Tim Keith [Sat, 9 Feb 2019 00:17:52 +0000 (16:17 -0800)]
[flang] Always resolve associate-name in select-type
Even if the selector expression has an error, we can resolve the
associate-name.
Original-commit: flang-compiler/f18@
3c35c30f581b2ef0d7d74af8fddfc4adaba9d6c0
Reviewed-on: https://github.com/flang-compiler/f18/pull/281
Tree-same-pre-rewrite: false
Tim Keith [Sat, 9 Feb 2019 00:03:23 +0000 (16:03 -0800)]
[flang] Resolve kind parameters on literal constants
When the kind parameter is a constant name, that name must be resolved.
Add `CheckIntrinsicKind` and `CheckIntrinsicSize` for common checking of
valid intrinsic kinds. Previous we had different forms of the error
message depending on the context ( "unsupported INTEGER(KIND=47)" and
"INTEGER(KIND=47) is not a supported type").
Report error for parameters without initialization where are they
declared (in `Post(EntityDecl)`) rather than where they are referenced
(in `AnalyzeExpr`).
Remove error message from `AnalyzeKindParam`: `AnalyzeExpr` will report
the error (e.g. not integer, not constant, etc.).
Remove "name was not resolved" error from `AnalyzeExpr`: it should be
reported by name resolution.
Original-commit: flang-compiler/f18@
9b0a99ce6696fe7db7708ea0362e103faa509968
Reviewed-on: https://github.com/flang-compiler/f18/pull/281
Tree-same-pre-rewrite: false
Tim Keith [Fri, 8 Feb 2019 16:57:28 +0000 (08:57 -0800)]
[flang] Resolve binding names in type-bound generic
Enhance `FindInTypeOrParents()` to also accept a `parser::Name` argument
and to resolve that name when the symbol is found. This causes binding
names in type-bound generic statements to be resolved. Move this process
to the beginning of the handling of such statements so that they are
resolve even if the generic spec is not and we return early.
Also resolve type parameter keywords in derived type specs
(e.g. `k` in `type(k=1) :: x`). That involves collecting and searching
the symbols of the `TypeParamDetails` to match the name with the symbol.
Original-commit: flang-compiler/f18@
7387fb436d6d61bafe202f1d85a1e1ea824c7a32
Reviewed-on: https://github.com/flang-compiler/f18/pull/281
Tree-same-pre-rewrite: false
Eric Schweitz [Fri, 8 Feb 2019 20:01:03 +0000 (12:01 -0800)]
[flang] Merge pull request flang-compiler/f18#280 from flang-compiler/eas6
Fix for both issues 274 and 278
Original-commit: flang-compiler/f18@
3dc5b01a3f53e46ed2b135d690a18b650ab83cac
Reviewed-on: https://github.com/flang-compiler/f18/pull/280
Eric Schweitz [Fri, 8 Feb 2019 18:53:18 +0000 (10:53 -0800)]
[flang] Fix for both issues 274 and 278
Original-commit: flang-compiler/f18@
9bb54046c7ab1404533120eb3f321d6d911c0c4e
Reviewed-on: https://github.com/flang-compiler/f18/pull/280
Eric Schweitz [Fri, 8 Feb 2019 00:58:19 +0000 (16:58 -0800)]
[flang] Merge pull request flang-compiler/f18#279 from flang-compiler/eas5
Fixes infinite loop in tests
Original-commit: flang-compiler/f18@
85cf54e9854faf070358d0657b5f6fdc25d841b8
Reviewed-on: https://github.com/flang-compiler/f18/pull/279
Eric Schweitz [Fri, 8 Feb 2019 00:41:18 +0000 (16:41 -0800)]
[flang] Fixes infinite loop in tests
Original-commit: flang-compiler/f18@
2fa96b77345b6c6baa781b53712d9590eca41c68
Reviewed-on: https://github.com/flang-compiler/f18/pull/279
Tim Keith [Thu, 7 Feb 2019 20:27:25 +0000 (12:27 -0800)]
[flang] Merge pull request flang-compiler/f18#277 from flang-compiler/tsk4c
Name resolution for namelist and data statements
Original-commit: flang-compiler/f18@
c6d4360f3c0bc8632c5cd305de1c4df8dd08a2e7
Reviewed-on: https://github.com/flang-compiler/f18/pull/277
Tim Keith [Thu, 7 Feb 2019 20:25:59 +0000 (12:25 -0800)]
[flang] Address review comments
Original-commit: flang-compiler/f18@
9daa2351c2a6f8d67267d6b0e44f0cf25bd1acad
Reviewed-on: https://github.com/flang-compiler/f18/pull/277
Tim Keith [Thu, 7 Feb 2019 01:18:02 +0000 (17:18 -0800)]
[flang] Improvements to name resolution in data statements
Handle variables in data statements differently from implied dos:
If a variable is first mentioned in a data statement, it is implicitly
declared in the current scope (and subsequent type declarations only
confirm the type).
In the implied do case, the only variables that can be implicitly
declared are the iteration variables. They must be created in the new
ImpliedDos scope. There must be one such scope for each data-stmt-object
because the variable name can be reused.
Resolve references to named constants, e.g. in complex-literal-constant
and data-stmt-value. This requires changing the handling of
named-constant-def as that is a definition, not a reference.
Original-commit: flang-compiler/f18@
9952b56af090b307f03202c128f242866d76d1a2
Reviewed-on: https://github.com/flang-compiler/f18/pull/277
Tree-same-pre-rewrite: false
Tim Keith [Wed, 6 Feb 2019 18:28:31 +0000 (10:28 -0800)]
[flang] Add Symbol::IsArray()
Add and use IsArray for symbols, meaning: it is an object entity
with shape.
Original-commit: flang-compiler/f18@
31c1a37f03493c7ab56122986f07bb67153b3d91
Reviewed-on: https://github.com/flang-compiler/f18/pull/277
Tree-same-pre-rewrite: false
Tim Keith [Tue, 5 Feb 2019 22:43:00 +0000 (14:43 -0800)]
[flang] Resolve namelist group and object names
Namelist groups are represents by symbols with `NamelistDetails`.
Those contain a list of symbols representing the objects in the group.
References to namelist groups in io-control-spec are resolved.
In `.mod` files, namelist groups are written out at the end of the
module specification section. This is so that the declarations of the
objects in the namelist group appear before they are referenced.
Original-commit: flang-compiler/f18@
8b70dbcac77f287725a8772899c5ea5ff093e25f
Reviewed-on: https://github.com/flang-compiler/f18/pull/277
Tree-same-pre-rewrite: false
Tim Keith [Tue, 5 Feb 2019 21:51:36 +0000 (13:51 -0800)]
[flang] Add SayWithDecl function for error reporting
Add `SayWithDecl` to handle the common case of reporting an error about
a symbol and referencing its original declaration.
Original-commit: flang-compiler/f18@
cf4d6fbe7f6b977f8b683a37a47109f642e2a44c
Reviewed-on: https://github.com/flang-compiler/f18/pull/277
Tree-same-pre-rewrite: false
Eric Schweitz [Wed, 6 Feb 2019 00:55:22 +0000 (16:55 -0800)]
[flang] Merge pull request flang-compiler/f18#276 from flang-compiler/eas3
Issue flang-compiler/f18#274 - add separate scopes for each procedure in the module
Original-commit: flang-compiler/f18@
64e175ceb03e835d2e33ee841b4b6eb4ea4e1b23
Reviewed-on: https://github.com/flang-compiler/f18/pull/276
Eric Schweitz [Tue, 5 Feb 2019 18:27:32 +0000 (10:27 -0800)]
[flang] identifier conformity
Original-commit: flang-compiler/f18@
7d6e28f6997172f3d5bbaa66fc35fad021306235
Reviewed-on: https://github.com/flang-compiler/f18/pull/276
Eric Schweitz [Tue, 5 Feb 2019 17:43:51 +0000 (09:43 -0800)]
[flang] Issue flang-compiler/f18#274 - add separate scopes for each procedure in the module
Original-commit: flang-compiler/f18@
d8f6b6617858a320fefab640fdc8a1a92b86ef6f
Reviewed-on: https://github.com/flang-compiler/f18/pull/276
Tree-same-pre-rewrite: false
Peter Klausler [Mon, 4 Feb 2019 21:38:08 +0000 (13:38 -0800)]
[flang] Merge pull request flang-compiler/f18#271 from flang-compiler/pmk-exprs
Semantic analysis & folding of array constructors
Original-commit: flang-compiler/f18@
00be335567ceb320a47eccc76be51d1cb07974b7
Reviewed-on: https://github.com/flang-compiler/f18/pull/271
peter klausler [Mon, 4 Feb 2019 21:06:21 +0000 (13:06 -0800)]
[flang] fix crash found by tim
Original-commit: flang-compiler/f18@
c24120d8116c58ceaed6e70fb1cedeb517ddb4a4
Reviewed-on: https://github.com/flang-compiler/f18/pull/271
peter klausler [Mon, 4 Feb 2019 18:39:41 +0000 (10:39 -0800)]
[flang] address comments
Original-commit: flang-compiler/f18@
ccbb1a2036d818f167216ee6b107048afff3765c
Reviewed-on: https://github.com/flang-compiler/f18/pull/271
Tree-same-pre-rewrite: false
peter klausler [Fri, 1 Feb 2019 21:37:49 +0000 (13:37 -0800)]
[flang] More value semantics in Constant<> and GetScalarConstantValue
Original-commit: flang-compiler/f18@
c7acce46854f815e2a1c53d385d8c39bae23098e
Reviewed-on: https://github.com/flang-compiler/f18/pull/271
Tree-same-pre-rewrite: false
peter klausler [Fri, 1 Feb 2019 00:04:17 +0000 (16:04 -0800)]
[flang] Convert structs to classes, move some defs from variable.h to call.h
Original-commit: flang-compiler/f18@
c877a34694f041ab4d05f1d09c7105db10a90d41
Reviewed-on: https://github.com/flang-compiler/f18/pull/271
Tree-same-pre-rewrite: false
peter klausler [Thu, 31 Jan 2019 21:18:30 +0000 (13:18 -0800)]
[flang] fix f90_correct failure
Original-commit: flang-compiler/f18@
1d9dac8ab57a5f56770a204857abed254b13fbf3
Reviewed-on: https://github.com/flang-compiler/f18/pull/271
Tree-same-pre-rewrite: false
peter klausler [Thu, 31 Jan 2019 19:44:13 +0000 (11:44 -0800)]
[flang] Fix instantiation of PDT bindings
Original-commit: flang-compiler/f18@
8dcfe0c70b2b17d8c46c5e7659986c4bc7cd7762
Reviewed-on: https://github.com/flang-compiler/f18/pull/271
Tree-same-pre-rewrite: false
peter klausler [Thu, 31 Jan 2019 18:16:26 +0000 (10:16 -0800)]
[flang] add conversions to array constructor test
Original-commit: flang-compiler/f18@
881c195a265296aa865bfe35aff006aeec3b3f61
Reviewed-on: https://github.com/flang-compiler/f18/pull/271
Tree-same-pre-rewrite: false
peter klausler [Thu, 31 Jan 2019 17:58:40 +0000 (09:58 -0800)]
[flang] Address review comments, fix some f90_correct failures
Original-commit: flang-compiler/f18@
e468f8cd54f95b83acdcafd3e1909cef98293cd3
Reviewed-on: https://github.com/flang-compiler/f18/pull/271
Tree-same-pre-rewrite: false
peter klausler [Tue, 29 Jan 2019 22:31:47 +0000 (14:31 -0800)]
[flang] pass tests
Original-commit: flang-compiler/f18@
db22dc22946eae605a4adfeb5a5becdb5bf63560
Reviewed-on: https://github.com/flang-compiler/f18/pull/271
Tree-same-pre-rewrite: false
peter klausler [Tue, 29 Jan 2019 18:22:18 +0000 (10:22 -0800)]
[flang] array constructor folding with test
Original-commit: flang-compiler/f18@
37e7a8e666eae80d4d5485e8c9c59bfb23d08fa9
Reviewed-on: https://github.com/flang-compiler/f18/pull/271
Tree-same-pre-rewrite: false
peter klausler [Tue, 29 Jan 2019 00:56:50 +0000 (16:56 -0800)]
[flang] folding array constructors
Original-commit: flang-compiler/f18@
a4e045fc5a913c7c3814820bf662205cc7687f1e
Reviewed-on: https://github.com/flang-compiler/f18/pull/271
Tree-same-pre-rewrite: false
peter klausler [Mon, 28 Jan 2019 22:38:17 +0000 (14:38 -0800)]
[flang] support Constant arrays
Original-commit: flang-compiler/f18@
a92d8a404fc44d593890d79d59cf62630399d639
Reviewed-on: https://github.com/flang-compiler/f18/pull/271
Tree-same-pre-rewrite: false
peter klausler [Wed, 23 Jan 2019 00:30:32 +0000 (16:30 -0800)]
[flang] Run expression semantic analysis with rest of semantics.
checkpoint array constructor semantics work
checkpoint
array constructors of lengthless intrinsic types
checkpoint
Correct ambiguous substring refs misparsed as array elements
Original-commit: flang-compiler/f18@
2232549efe42a2ef97725a131ac642b9be9274f4
Reviewed-on: https://github.com/flang-compiler/f18/pull/271
Tree-same-pre-rewrite: false
Peter Klausler [Thu, 31 Jan 2019 17:56:28 +0000 (09:56 -0800)]
[flang] Merge pull request flang-compiler/f18#272 from flang-compiler/pmk-fix
Fix bugs flang-compiler/f18#269 & flang-compiler/f18#270
Original-commit: flang-compiler/f18@
f9aecb6330ec41dcc34adf86b137308d6356a4cf
Reviewed-on: https://github.com/flang-compiler/f18/pull/272
peter klausler [Wed, 30 Jan 2019 18:31:26 +0000 (10:31 -0800)]
[flang] Update fix based on comment
Original-commit: flang-compiler/f18@
52dfd3b5dcdd84e5146875a6afdd075fe4acd9d4
Reviewed-on: https://github.com/flang-compiler/f18/pull/272
peter klausler [Wed, 30 Jan 2019 00:15:35 +0000 (16:15 -0800)]
[flang] Fix bugs flang-compiler/f18#269 & flang-compiler/f18#270
Original-commit: flang-compiler/f18@
639816f3efa7907d07c724e15d13afa5d4fe7794
Reviewed-on: https://github.com/flang-compiler/f18/pull/272
Tree-same-pre-rewrite: false
Peter Klausler [Wed, 30 Jan 2019 17:55:05 +0000 (09:55 -0800)]
[flang] Merge pull request flang-compiler/f18#273 from flang-compiler/pmk-subnormal
Use IEEE-754 terminology better: subnormal, not denormal(ized)
Original-commit: flang-compiler/f18@
700613d423bb265a6c5962197318478e4ba161d2
Reviewed-on: https://github.com/flang-compiler/f18/pull/273
peter klausler [Wed, 30 Jan 2019 00:47:41 +0000 (16:47 -0800)]
[flang] Use IEEE-754 terminology better: subnormal, not denormal(ized)
Original-commit: flang-compiler/f18@
57b0ebb5580a57d4dae44565d74e7ab19b88662b
Reviewed-on: https://github.com/flang-compiler/f18/pull/273
jeanPerier [Mon, 28 Jan 2019 09:25:37 +0000 (01:25 -0800)]
[flang] Fixes issue flang-compiler/f18#267 (GetScalarConstantValue)
Merge pull request flang-compiler/f18#268 from flang-compiler/jpr0
Original-commit: flang-compiler/f18@
d29624b54245936cbe87885e6cfb1d674b8449ec
Jean Perier [Fri, 25 Jan 2019 11:24:31 +0000 (03:24 -0800)]
[flang] Cleaned folding test helper template
Original-commit: flang-compiler/f18@
b402c0a09caf079d2a0a44ac339894412c491e74
Jean Perier [Thu, 24 Jan 2019 17:49:00 +0000 (09:49 -0800)]
[flang] Add test related to issue flang-compiler/f18#267
Original-commit: flang-compiler/f18@
a9b2a05f7533546d5f791d5558017c45430e1077
Tree-same-pre-rewrite: false
Jean Perier [Thu, 24 Jan 2019 17:46:35 +0000 (09:46 -0800)]
[flang] Fix issue flang-compiler/f18#267 (GetScalarConstantValue)
Original-commit: flang-compiler/f18@
9fcbd09a51e935572e63bab6a5b30206375b24f6
Tree-same-pre-rewrite: false
jeanPerier [Thu, 24 Jan 2019 17:33:12 +0000 (09:33 -0800)]
[flang] Merge pull request flang-compiler/f18#227 from flang-compiler/jpr0
Implement CFI_set_pointer, CFI_section, CFI_select_part. Minor changes in other CFI funcs
Original-commit: flang-compiler/f18@
357f3d67da756c7b7542e893b9cfab4af393b740
Reviewed-on: https://github.com/flang-compiler/f18/pull/227
Jean Perier [Thu, 29 Nov 2018 21:17:53 +0000 (13:17 -0800)]
[flang] Removed unnecessary reinterpret_cast.
Original-commit: flang-compiler/f18@
dd08a7fd3c899aacf51c85fff57692cf16ce92a3
Reviewed-on: https://github.com/flang-compiler/f18/pull/227
Jean Perier [Wed, 28 Nov 2018 20:17:34 +0000 (12:17 -0800)]
[flang] Fix: CFI_type_char is now considered Fortran CHARACTER
Original-commit: flang-compiler/f18@
7c23573bd9630976daf9368913a4d7b71d1ffb3e
Reviewed-on: https://github.com/flang-compiler/f18/pull/227
Tree-same-pre-rewrite: false
Jean Perier [Wed, 28 Nov 2018 00:07:21 +0000 (16:07 -0800)]
[flang] Added nullptr check in CFI functions returning error codes
Original-commit: flang-compiler/f18@
5213d3a92119e509a173aa74abbe794a70b0c9aa
Reviewed-on: https://github.com/flang-compiler/f18/pull/227
Tree-same-pre-rewrite: false
Jean Perier [Tue, 27 Nov 2018 22:13:21 +0000 (14:13 -0800)]
[flang] Changed CFI_CDESC_T c++ macro and various other comment fixes
- CFI_CDESC_T can now be cast to CFI_cdesc_t without using
reinterpret_cast.
- Use {} initialization everywhere according to style guideline
- Avoid useless parentheses
- Do not use static storage when useless in tests.
- Reodered some loops that were confusing in tests
Original-commit: flang-compiler/f18@
d0ed631dfdabfb162e3518f7e950ea4f9853c71a
Reviewed-on: https://github.com/flang-compiler/f18/pull/227
Tree-same-pre-rewrite: false
Jean Perier [Mon, 26 Nov 2018 23:31:07 +0000 (15:31 -0800)]
[flang] editorial change after review
Original-commit: flang-compiler/f18@
92339ea11a09323cda461da0e69a52a006cf6df8
Reviewed-on: https://github.com/flang-compiler/f18/pull/227
Tree-same-pre-rewrite: false
Jean Perier [Mon, 19 Nov 2018 17:10:08 +0000 (09:10 -0800)]
[flang] fix review comments
Original-commit: flang-compiler/f18@
5d9ef043a63a7e9beac3af632ba51f85931742a6
Reviewed-on: https://github.com/flang-compiler/f18/pull/227
Tree-same-pre-rewrite: false
Jean Perier [Mon, 19 Nov 2018 16:54:58 +0000 (08:54 -0800)]
[flang] Comment typos correction
Original-commit: flang-compiler/f18@
107c10563656164de091b806bf5d31faecb503cd
Reviewed-on: https://github.com/flang-compiler/f18/pull/227
Tree-same-pre-rewrite: false
Jean Perier [Mon, 19 Nov 2018 15:50:30 +0000 (07:50 -0800)]
[flang] Set lower bounds to 0 in CFI_establish, CFI_select_part and CFI_setpointer
Original-commit: flang-compiler/f18@
65c67347d9530cce293f1f90089fb4e8186ccabc
Reviewed-on: https://github.com/flang-compiler/f18/pull/227
Tree-same-pre-rewrite: false
Jean Perier [Fri, 16 Nov 2018 16:00:41 +0000 (08:00 -0800)]
[flang] CFI_allocate: fixed CFI_type_char/cptr
Original-commit: flang-compiler/f18@
ba9274d3ee7e24c0b2be48c1ba32e9682cbc4f18
Reviewed-on: https://github.com/flang-compiler/f18/pull/227
Tree-same-pre-rewrite: false
Jean Perier [Fri, 16 Nov 2018 15:10:04 +0000 (07:10 -0800)]
[flang] CFI_set_pointer, CFI_section, CFI_select_part and tests
Original-commit: flang-compiler/f18@
e3830c5878d7dbcdcc2652ac5ab97ddca6be60a7
Reviewed-on: https://github.com/flang-compiler/f18/pull/227
Tree-same-pre-rewrite: false
Peter Klausler [Thu, 24 Jan 2019 00:32:04 +0000 (16:32 -0800)]
[flang] Merge pull request flang-compiler/f18#265 from flang-compiler/pmk0
Enable shared library build without dependence cycle between binaries
Original-commit: flang-compiler/f18@
bcd1a5f38baa0df58d044526a5fb21136e78e664
Reviewed-on: https://github.com/flang-compiler/f18/pull/265
peter klausler [Thu, 24 Jan 2019 00:31:17 +0000 (16:31 -0800)]
[flang] update copyright date
Original-commit: flang-compiler/f18@
c9dbc96042d4f73d6a8679f08a7eddfa4ddd6d98
Reviewed-on: https://github.com/flang-compiler/f18/pull/265
peter klausler [Wed, 23 Jan 2019 00:03:02 +0000 (16:03 -0800)]
[flang] tweak CMakeLists.txt options
Original-commit: flang-compiler/f18@
64ba0c0d6e55a1dadc949ede016edb1f39a6ee7c
Reviewed-on: https://github.com/flang-compiler/f18/pull/265
Tree-same-pre-rewrite: false
peter klausler [Sat, 19 Jan 2019 23:30:25 +0000 (15:30 -0800)]
[flang] Remove SHARED from add_library(), use cmake command line option instead
Original-commit: flang-compiler/f18@
6644c799a7dc583331bea9853700c2ba69bbab4e
Reviewed-on: https://github.com/flang-compiler/f18/pull/265
Tree-same-pre-rewrite: false
peter klausler [Sat, 19 Jan 2019 22:57:04 +0000 (14:57 -0800)]
[flang] Add SHARED to add_library() invocations so f18 libraries are always built shared.
Original-commit: flang-compiler/f18@
060ced04c74b8796c7621a29da86ee2051d3ccba
Reviewed-on: https://github.com/flang-compiler/f18/pull/265
Tree-same-pre-rewrite: false
peter klausler [Sat, 19 Jan 2019 22:38:31 +0000 (14:38 -0800)]
[flang] Enable building f18 as shared libraries
Original-commit: flang-compiler/f18@
4544d75af1b45e4c554a35327461311cff974884
Reviewed-on: https://github.com/flang-compiler/f18/pull/265
Tree-same-pre-rewrite: false
peter klausler [Fri, 18 Jan 2019 23:53:11 +0000 (15:53 -0800)]
[flang] Rearrange code to eliminate dependence cycles between f18 library binaries
Original-commit: flang-compiler/f18@
88651eecae9cf7d5ea698eabcb315b3f2f169485
Reviewed-on: https://github.com/flang-compiler/f18/pull/265
Tree-same-pre-rewrite: false
peter klausler [Fri, 18 Jan 2019 20:40:47 +0000 (12:40 -0800)]
[flang] Move default intrinsic type kinds from lib/semantics to lib/common
Original-commit: flang-compiler/f18@
887e72dd613f411808d1b9e9e7b64601a3b67af8
Reviewed-on: https://github.com/flang-compiler/f18/pull/265
Tree-same-pre-rewrite: false
Peter Klausler [Wed, 23 Jan 2019 00:24:58 +0000 (16:24 -0800)]
[flang] Merge pull request flang-compiler/f18#266 from flang-compiler/pmk-x86
Make x86 fp flag edge case behavior emulation conditional.
Original-commit: flang-compiler/f18@
f21c9427fcc8024c30ec70d0a2eb8926ad1bbe50
Reviewed-on: https://github.com/flang-compiler/f18/pull/266
peter klausler [Tue, 22 Jan 2019 19:13:44 +0000 (11:13 -0800)]
[flang] Make x86 fp behavior emulation conditional.
Original-commit: flang-compiler/f18@
0c77a634b328b310206ccb00d7f40fcc9178f121
Reviewed-on: https://github.com/flang-compiler/f18/pull/266
Peter Klausler [Tue, 22 Jan 2019 17:59:29 +0000 (09:59 -0800)]
[flang] Merge pull request flang-compiler/f18#264 from flang-compiler/pmk1
Fix crash reported by Jean in error recovery case
Original-commit: flang-compiler/f18@
e2117d367bc616f32639f1551db5f32fa5f6b49e
Reviewed-on: https://github.com/flang-compiler/f18/pull/264
peter klausler [Fri, 18 Jan 2019 19:47:16 +0000 (11:47 -0800)]
[flang] Fix crash reported by Jean in error recovery case
Original-commit: flang-compiler/f18@
33db1790be41cb7e905d4bd0acf90222ddaf27e1
Reviewed-on: https://github.com/flang-compiler/f18/pull/264
Peter Klausler [Fri, 18 Jan 2019 20:03:38 +0000 (12:03 -0800)]
[flang] Merge pull request flang-compiler/f18#260 from flang-compiler/pmk2
Complete parameterized derived type instantiation
Original-commit: flang-compiler/f18@
3ecceb30d7e408116078fa9c9c7a95ff810f4ba8
Reviewed-on: https://github.com/flang-compiler/f18/pull/260
peter klausler [Fri, 18 Jan 2019 18:45:07 +0000 (10:45 -0800)]
[flang] fix clang build warning
Original-commit: flang-compiler/f18@
799fe63779206c19a9717e84678546f592d3218c
Reviewed-on: https://github.com/flang-compiler/f18/pull/260
peter klausler [Fri, 18 Jan 2019 00:14:36 +0000 (16:14 -0800)]
[flang] done with merge
Original-commit: flang-compiler/f18@
9c63eb7a1a87bcd075938b4ec93a45ef5bd4c1bf
Reviewed-on: https://github.com/flang-compiler/f18/pull/260
Tree-same-pre-rewrite: false
peter klausler [Thu, 17 Jan 2019 21:52:10 +0000 (13:52 -0800)]
[flang] merge with master, implement a TODO with LEN on ASSOCIATE
Original-commit: flang-compiler/f18@
e4501c6fa4e9819dd34c58f6d462c1482ea2332e
Reviewed-on: https://github.com/flang-compiler/f18/pull/260
Tree-same-pre-rewrite: false