platform/upstream/llvm.git
5 years ago[flang] Merge pull request flang-compiler/f18#394 from flang-compiler/pmk-nml
Peter Klausler [Wed, 10 Apr 2019 16:28:06 +0000 (09:28 -0700)]
[flang] Merge pull request flang-compiler/f18#394 from flang-compiler/pmk-nml

Rewrite read-stmt/write-stmt parse trees for misparsed namelist group…

Original-commit: flang-compiler/f18@9e08bd4cec2afe5921a7687a2e27e199c49db8b9
Reviewed-on: https://github.com/flang-compiler/f18/pull/394

5 years ago[flang] Do not replace format with namelist if there is no unit (avoiding accidental...
peter klausler [Wed, 10 Apr 2019 00:14:29 +0000 (17:14 -0700)]
[flang] Do not replace format with namelist if there is no unit (avoiding accidental language extension)

Original-commit: flang-compiler/f18@08562d9b861bf6cb2d7e262b5f47fa58ca686134
Reviewed-on: https://github.com/flang-compiler/f18/pull/394

5 years ago[flang] Rewrite read-stmt/write-stmt parse trees for misparsed namelist group names
peter klausler [Tue, 9 Apr 2019 23:36:29 +0000 (16:36 -0700)]
[flang] Rewrite read-stmt/write-stmt parse trees for misparsed namelist group names

Original-commit: flang-compiler/f18@e0f1b1c469eab3242748e5edbf0f163d750348e5
Reviewed-on: https://github.com/flang-compiler/f18/pull/394
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#393 from schweitzpgi/forward
Eric Schweitz [Wed, 10 Apr 2019 15:14:40 +0000 (08:14 -0700)]
[flang] Merge pull request flang-compiler/f18#393 from schweitzpgi/forward

Forwarding, etc.

Original-commit: flang-compiler/f18@0e587c931578d3490f9bc597a4387509acd072f9
Reviewed-on: https://github.com/flang-compiler/f18/pull/393

5 years ago[flang] make the ctor use special type deduction so members can be moved and
Eric Schweitz [Tue, 9 Apr 2019 18:03:33 +0000 (11:03 -0700)]
[flang] make the ctor use special type deduction so members can be moved and
copied in the same call

Original-commit: flang-compiler/f18@d18e8391fc9def0cf0abc54bb3bb1b68a0779764
Reviewed-on: https://github.com/flang-compiler/f18/pull/393

5 years ago[flang] fix forward references
Eric Schweitz [Tue, 9 Apr 2019 16:21:21 +0000 (09:21 -0700)]
[flang] fix forward references

Original-commit: flang-compiler/f18@4d8902887df0cb4266a8bafc2e10529502a47f06
Reviewed-on: https://github.com/flang-compiler/f18/pull/393
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#395 from flang-compiler/tsk3
Tim Keith [Wed, 10 Apr 2019 01:34:39 +0000 (18:34 -0700)]
[flang] Merge pull request flang-compiler/f18#395 from flang-compiler/tsk3

Fix source locations for some expressions

Original-commit: flang-compiler/f18@ac4fb9a1bece3f01f3308fb2e7afc6e083f20d73
Reviewed-on: https://github.com/flang-compiler/f18/pull/395

5 years ago[flang] Fix source locations for some expressions
Tim Keith [Tue, 9 Apr 2019 23:46:36 +0000 (16:46 -0700)]
[flang] Fix source locations for some expressions

When expressions are parsed iteratively they weren't getting the correct
source positions. For example, when parsing an `add-operand` as a sequence
of `mult-operand`s separated by `mult-op`.

This shows up when we report an error message referring to this kind
of expression:
```
t.f90:1:11: error: Expected a LOGICAL expression
  if (i * j * k) then
            ^^^
```

The fix is to remember the location of the first operand and then
for each sub-expression (`i * j` and `i * j * k` in this example)
extend its location back to include that first operand.

Original-commit: flang-compiler/f18@e276f11f48f116fa090cf72bcb73199a44d030c3
Reviewed-on: https://github.com/flang-compiler/f18/pull/395

5 years ago[flang] Merge pull request flang-compiler/f18#390 from flang-compiler/pmk-389
Peter Klausler [Tue, 9 Apr 2019 21:06:45 +0000 (14:06 -0700)]
[flang] Merge pull request flang-compiler/f18#390 from flang-compiler/pmk-389

Fix bug#389, prevent std::move() on forwarded lvalue references

Original-commit: flang-compiler/f18@198b0cc5728a8bad2c7d65eefd800c80f4f0595b
Reviewed-on: https://github.com/flang-compiler/f18/pull/390

5 years ago[flang] Redo without macros
peter klausler [Tue, 9 Apr 2019 20:29:40 +0000 (13:29 -0700)]
[flang] Redo without macros

Original-commit: flang-compiler/f18@8d955cfb3b6ac05066af34f574a76dd1bcd20d88
Reviewed-on: https://github.com/flang-compiler/f18/pull/390

5 years ago[flang] fix bug found in testing
peter klausler [Mon, 8 Apr 2019 23:57:30 +0000 (16:57 -0700)]
[flang] fix bug found in testing

Original-commit: flang-compiler/f18@297ad78510e82f44a123c408561d7782c62f7bd2
Reviewed-on: https://github.com/flang-compiler/f18/pull/390
Tree-same-pre-rewrite: false

5 years ago[flang] Lots of debugging and refinement
peter klausler [Mon, 8 Apr 2019 23:16:55 +0000 (16:16 -0700)]
[flang] Lots of debugging and refinement

Original-commit: flang-compiler/f18@1c3c30b5401ff04550d2289b25bafe6229a4a2cc
Reviewed-on: https://github.com/flang-compiler/f18/pull/390
Tree-same-pre-rewrite: false

5 years ago[flang] Revert that reversion. Move semantics work just fine.
peter klausler [Mon, 8 Apr 2019 20:53:10 +0000 (13:53 -0700)]
[flang] Revert that reversion.  Move semantics work just fine.

Original-commit: flang-compiler/f18@72bd8e7b03011b6e96efa40ed269c5bdfc8d955d
Reviewed-on: https://github.com/flang-compiler/f18/pull/390
Tree-same-pre-rewrite: false

5 years ago[flang] Revert to forwarding on variadic messaging APIs
peter klausler [Mon, 8 Apr 2019 19:54:16 +0000 (12:54 -0700)]
[flang] Revert to forwarding on variadic messaging APIs

Original-commit: flang-compiler/f18@d2e464eb15ef9debf675a7eb262ac1e007b56b17
Reviewed-on: https://github.com/flang-compiler/f18/pull/390
Tree-same-pre-rewrite: false

5 years ago[flang] Fix comment
peter klausler [Mon, 8 Apr 2019 19:31:57 +0000 (12:31 -0700)]
[flang] Fix comment

Original-commit: flang-compiler/f18@d1345ca4fc45ee7445b211942b4c9cfef847b3fb
Reviewed-on: https://github.com/flang-compiler/f18/pull/390
Tree-same-pre-rewrite: false

5 years ago[flang] Fix bug#389, prevent std::move() on forwarded lvalue references
peter klausler [Mon, 8 Apr 2019 19:29:11 +0000 (12:29 -0700)]
[flang] Fix bug#389, prevent std::move() on forwarded lvalue references

Original-commit: flang-compiler/f18@9d61c091ad3843056741b0bd4791cec1ac7a583e
Reviewed-on: https://github.com/flang-compiler/f18/pull/390
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#388 from flang-compiler/check-nullify
Steve Scalpone [Mon, 8 Apr 2019 20:46:27 +0000 (22:46 +0200)]
[flang] Merge pull request flang-compiler/f18#388 from flang-compiler/check-nullify

Check semantic constraints for the nullify statement.

Original-commit: flang-compiler/f18@a2f19b65636f2a6858252a229664767a6e475310
Reviewed-on: https://github.com/flang-compiler/f18/pull/388

5 years ago[flang] Use structureComponent.component.symbol directly instead of getting
Steve Scalpone [Mon, 8 Apr 2019 07:26:10 +0000 (00:26 -0700)]
[flang] Use structureComponent.component.symbol directly instead of getting
the symbol from the result of expression analysis.  (This opens the
door to moving structure component semantic checking to expression
analysis.)

Also, improve error messages, remove unused include files, and add
copyright headers to test files.

Original-commit: flang-compiler/f18@17780c40d7380db9760e972dcc52724838cd89d8
Reviewed-on: https://github.com/flang-compiler/f18/pull/388

5 years ago[flang] Check semantic contraints for the nullify statement. The full
Steve Scalpone [Sun, 7 Apr 2019 18:29:48 +0000 (11:29 -0700)]
[flang] Check semantic contraints for the nullify statement. The full
legality check is up to the user; however, some checks could
be done at compile time and others at runtime.  We choose to
skip any checking at compile time because it would not be
complete.

Note the instantiation of ExtractDataRef in expressions.cc.
This instantiation satifies the reference in check-nullify.cc
because expression.h just has a declaration of ExtractDataRef
instead of the definition.

Original-commit: flang-compiler/f18@b7199219fbf9e833be6e745d498e99936c2e68b2
Reviewed-on: https://github.com/flang-compiler/f18/pull/388
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#385 from schweitzpgi/fir3
Eric Schweitz [Mon, 8 Apr 2019 20:11:11 +0000 (13:11 -0700)]
[flang] Merge pull request flang-compiler/f18#385 from schweitzpgi/fir3

fix some bugs with use of std::move

Original-commit: flang-compiler/f18@5569e8ede27196c38fb1a4ae9f11f8b649b629a1
Reviewed-on: https://github.com/flang-compiler/f18/pull/385

5 years ago[flang] more fine-tuning of mixin classes to get lightweight constructors,
Eric Schweitz [Mon, 8 Apr 2019 19:54:14 +0000 (12:54 -0700)]
[flang] more fine-tuning of mixin classes to get lightweight constructors,
handle copies and moves, etc.

Original-commit: flang-compiler/f18@72a776b4c10f5b09a51df03e1afa7ada5a8aae31
Reviewed-on: https://github.com/flang-compiler/f18/pull/385

5 years ago[flang] use std::forward, avoid std::move usage bugs
Eric Schweitz [Fri, 5 Apr 2019 17:08:19 +0000 (10:08 -0700)]
[flang] use std::forward, avoid std::move usage bugs

Original-commit: flang-compiler/f18@0d66bc243919a46a518067c59881e82e32552f62
Reviewed-on: https://github.com/flang-compiler/f18/pull/385
Tree-same-pre-rewrite: false

5 years ago[flang] anchor virtual dtor
Eric Schweitz [Fri, 5 Apr 2019 16:13:51 +0000 (09:13 -0700)]
[flang] anchor virtual dtor

Original-commit: flang-compiler/f18@7121ccecb2960383d3273fd38e5b5642758df808
Reviewed-on: https://github.com/flang-compiler/f18/pull/385
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#387 from flang-compiler/tsk3
Tim Keith [Mon, 8 Apr 2019 17:37:08 +0000 (10:37 -0700)]
[flang] Merge pull request flang-compiler/f18#387 from flang-compiler/tsk3

Update the grammar with team-value

Original-commit: flang-compiler/f18@b8e95dcd1d08f31a109d05ea9a161b89a4eef4fc
Reviewed-on: https://github.com/flang-compiler/f18/pull/387

5 years ago[flang] Update the grammar with team-value
Tim Keith [Sat, 6 Apr 2019 18:17:07 +0000 (11:17 -0700)]
[flang] Update the grammar with team-value

Everywhere we had `team-variable` except for the FORM TEAM statement is
now `team-value`, according to the N2162 draft standard. The grammar
and parse tree are updated to reflect that.

The addition of the production for `team-value` caused productions
R1177-R1181 to have their numbers increased by one.

Original-commit: flang-compiler/f18@9071f0a35240f3451032b0abb077451182ace6ec
Reviewed-on: https://github.com/flang-compiler/f18/pull/387

5 years ago[flang] Merge pull request flang-compiler/f18#386 from flang-compiler/pmk-sjs-reshape-bug
Peter Klausler [Fri, 5 Apr 2019 22:57:29 +0000 (15:57 -0700)]
[flang] Merge pull request flang-compiler/f18#386 from flang-compiler/pmk-sjs-reshape-bug

Shape analysis

Original-commit: flang-compiler/f18@47fc2c4b2cfc55663ac6d87bf7e203770d954854
Reviewed-on: https://github.com/flang-compiler/f18/pull/386

5 years ago[flang] Address review comments
peter klausler [Fri, 5 Apr 2019 22:19:13 +0000 (15:19 -0700)]
[flang] Address review comments

Original-commit: flang-compiler/f18@20cef2db45dc113eff30bcc9a565398213fcf417
Reviewed-on: https://github.com/flang-compiler/f18/pull/386

5 years ago[flang] Remove hash from expected module file output
peter klausler [Fri, 5 Apr 2019 20:09:02 +0000 (13:09 -0700)]
[flang] Remove hash from expected module file output

Original-commit: flang-compiler/f18@8da47c44d2dff3a887df029241fbdf15d734c329
Reviewed-on: https://github.com/flang-compiler/f18/pull/386
Tree-same-pre-rewrite: false

5 years ago[flang] Fix implied DO folding with negative strides, add test
peter klausler [Fri, 5 Apr 2019 19:54:19 +0000 (12:54 -0700)]
[flang] Fix implied DO folding with negative strides, add test

Original-commit: flang-compiler/f18@2e14b76041c79f5861fb2f912a93572130e08d17
Reviewed-on: https://github.com/flang-compiler/f18/pull/386
Tree-same-pre-rewrite: false

5 years ago[flang] Remove a needless Indirection
peter klausler [Fri, 5 Apr 2019 18:38:10 +0000 (11:38 -0700)]
[flang] Remove a needless Indirection

Original-commit: flang-compiler/f18@eb637232b19059563d5540a454d3392002de1ed8
Reviewed-on: https://github.com/flang-compiler/f18/pull/386
Tree-same-pre-rewrite: false

5 years ago[flang] More folding of SIZE()
peter klausler [Fri, 5 Apr 2019 00:10:07 +0000 (17:10 -0700)]
[flang] More folding of SIZE()

Original-commit: flang-compiler/f18@23f62fea1d076311bc4fd63d7b749fbb8423763c
Reviewed-on: https://github.com/flang-compiler/f18/pull/386
Tree-same-pre-rewrite: false

5 years ago[flang] Simplify expression visitor usage
peter klausler [Thu, 4 Apr 2019 20:58:46 +0000 (13:58 -0700)]
[flang] Simplify expression visitor usage

Original-commit: flang-compiler/f18@9ab121d6a6dc96b12042a242e5b4eec903455990
Reviewed-on: https://github.com/flang-compiler/f18/pull/386
Tree-same-pre-rewrite: false

5 years ago[flang] complete GetShape, compile
peter klausler [Thu, 4 Apr 2019 20:12:21 +0000 (13:12 -0700)]
[flang] complete GetShape, compile

Original-commit: flang-compiler/f18@ff124f69a9c4a23f51004b332736fbb1f47c431a
Reviewed-on: https://github.com/flang-compiler/f18/pull/386
Tree-same-pre-rewrite: false

5 years ago[flang] fix original failure (reshape intrinsic argument check)
peter klausler [Wed, 3 Apr 2019 23:04:13 +0000 (16:04 -0700)]
[flang] fix original failure (reshape intrinsic argument check)

Original-commit: flang-compiler/f18@8bba330b32d928a5cf5d581d139c0cec02294b58
Reviewed-on: https://github.com/flang-compiler/f18/pull/386
Tree-same-pre-rewrite: false

5 years ago[flang] clean up CoarrayRef
peter klausler [Wed, 3 Apr 2019 19:57:24 +0000 (12:57 -0700)]
[flang] clean up CoarrayRef

Original-commit: flang-compiler/f18@41bef37c7c859ae87ebe56f730cb43703c58da25
Reviewed-on: https://github.com/flang-compiler/f18/pull/386
Tree-same-pre-rewrite: false

5 years ago[flang] Begin shape analysis
peter klausler [Mon, 1 Apr 2019 22:22:45 +0000 (15:22 -0700)]
[flang] Begin shape analysis

Original-commit: flang-compiler/f18@888166c97e83a244e183aac95e7a706b8d154ab9
Reviewed-on: https://github.com/flang-compiler/f18/pull/386
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#384 from flang-compiler/tsk4
Tim Keith [Fri, 5 Apr 2019 18:22:36 +0000 (11:22 -0700)]
[flang] Merge pull request flang-compiler/f18#384 from flang-compiler/tsk4

Support coarrays in name resolution

Original-commit: flang-compiler/f18@877846f63c4ca3d306491859af332f96b1e46109
Reviewed-on: https://github.com/flang-compiler/f18/pull/384

5 years ago[flang] Address review comments.
Tim Keith [Thu, 4 Apr 2019 23:32:37 +0000 (16:32 -0700)]
[flang] Address review comments.

Change AnalyzeArraySpec and AnalyzeCoarraySpec to return resulting
ArraySpec by value.

Original-commit: flang-compiler/f18@0ae38143e530f867a7aa4392bfa09345c28ad7e3
Reviewed-on: https://github.com/flang-compiler/f18/pull/384

5 years ago[flang] Support coarrays in name resolution
Tim Keith [Thu, 4 Apr 2019 21:46:40 +0000 (14:46 -0700)]
[flang] Support coarrays in name resolution

A coarray is represented as a `Symbol` with `ObjectEntityDetails` that
has a non-empty coshape. The coshape is represented using the same type
(`ArrayShape`) as the shape is, so the fact that it is a coshape is
determined from context.

Move code for analyzing shapes to `resolve-names-utils.cc` and
generalize it for coshapes.

In `symbol.cc` add dumping of coshapes. Simplify some of the functions
by adding some `Dump*` functions to handle common cases.

In `mod-file.cc` generalize the code for writing shapes to also write
coshapes. Fix a bug in `PutShapeSpec()`.

Original-commit: flang-compiler/f18@9d2482c40c78cad55701a9cbc52a2294cae94d44
Reviewed-on: https://github.com/flang-compiler/f18/pull/384
Tree-same-pre-rewrite: false

5 years ago[flang] Fix document based on input from Kiran and Tim, mostly about Flang.
psteinfeld [Thu, 4 Apr 2019 17:52:24 +0000 (10:52 -0700)]
[flang] Fix document based on input from Kiran and Tim, mostly about Flang.

Update OptionComparison.md based on feedback from Kiran.

Original-commit: flang-compiler/f18@f28eb106fdf7bbb5a5ea2481ffc438752e6251e9

5 years ago[flang] Update OptionComparison.md
psteinfeld [Thu, 4 Apr 2019 17:48:44 +0000 (10:48 -0700)]
[flang] Update OptionComparison.md

Original-commit: flang-compiler/f18@8beda1f14eab6293f6465c08e3a531d685c7ab62

5 years ago[flang] Update OptionComparison.md
psteinfeld [Wed, 3 Apr 2019 17:24:47 +0000 (10:24 -0700)]
[flang] Update OptionComparison.md

Original-commit: flang-compiler/f18@78e1fce92d162a964fc6f48a26367fef421b805b
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#380 from flang-compiler/tsk3
Tim Keith [Wed, 3 Apr 2019 16:54:38 +0000 (09:54 -0700)]
[flang] Merge pull request flang-compiler/f18#380 from flang-compiler/tsk3

Pointer assignment bounds, section subscript, substring

Original-commit: flang-compiler/f18@1165a7c57fac13294e72666da51e5dcf8af9f252
Reviewed-on: https://github.com/flang-compiler/f18/pull/380

5 years ago[flang] Pointer assignment bounds, section subscript, substring
Tim Keith [Tue, 2 Apr 2019 22:36:20 +0000 (15:36 -0700)]
[flang] Pointer assignment bounds, section subscript, substring

Resolve bounds in pointer assignment.
Remove TODOs for section-subscript and substring range.
Add tests that verify they are done.

Original-commit: flang-compiler/f18@dc2dd85a9a2b08ca906fd53d11faa2886863d4c4
Reviewed-on: https://github.com/flang-compiler/f18/pull/380

5 years ago[flang] Fix doc typo
jeanPerier [Wed, 3 Apr 2019 08:41:04 +0000 (01:41 -0700)]
[flang] Fix doc typo

Merge pull request flang-compiler/f18#382 from flang-compiler/jeanPerier-typo-fix

Original-commit: flang-compiler/f18@101145787fa936899f015a8c2036b13dc81857b8

5 years ago[flang] Fix doc typo
jeanPerier [Wed, 3 Apr 2019 08:26:46 +0000 (10:26 +0200)]
[flang] Fix doc typo

Original-commit: flang-compiler/f18@c571a3faf39da3530bea6a5a910b7a4cc377d815

5 years ago[flang] Merge pull request flang-compiler/f18#379 from flang-compiler/options
psteinfeld [Wed, 3 Apr 2019 02:10:08 +0000 (19:10 -0700)]
[flang] Merge pull request flang-compiler/f18#379 from flang-compiler/options

Options comparison document

Original-commit: flang-compiler/f18@05b0f1dd837bbf167e7a10a9e38e13f618dd800b
Reviewed-on: https://github.com/flang-compiler/f18/pull/379

5 years ago[flang] Update OptionComparison.md
psteinfeld [Tue, 2 Apr 2019 21:29:01 +0000 (14:29 -0700)]
[flang] Update OptionComparison.md

Original-commit: flang-compiler/f18@27c77d164f415ebf928763270403c2d19aac55ad
Reviewed-on: https://github.com/flang-compiler/f18/pull/379

5 years ago[flang] Update OptionComparison.md
psteinfeld [Tue, 2 Apr 2019 18:57:45 +0000 (11:57 -0700)]
[flang] Update OptionComparison.md

Original-commit: flang-compiler/f18@9926fc91458bfcd55795a7e0768aaaf8a5651994
Reviewed-on: https://github.com/flang-compiler/f18/pull/379
Tree-same-pre-rewrite: false

5 years ago[flang] Fixed an encoding error
psteinfeld [Tue, 2 Apr 2019 18:24:04 +0000 (11:24 -0700)]
[flang] Fixed an encoding error

Original-commit: flang-compiler/f18@0f9eff1bb00532bfc647a5370ba1207485915a63
Reviewed-on: https://github.com/flang-compiler/f18/pull/379
Tree-same-pre-rewrite: false

5 years ago[flang] Description of command line options for Fortran compilers.
psteinfeld [Tue, 2 Apr 2019 18:03:00 +0000 (11:03 -0700)]
[flang] Description of command line options for Fortran compilers.

Original-commit: flang-compiler/f18@f170466bb99892d5c0bd09fcf624b0ecacbdfb83
Reviewed-on: https://github.com/flang-compiler/f18/pull/379
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#375 from flang-compiler/if-stmt-2
Steve Scalpone [Tue, 2 Apr 2019 23:39:37 +0000 (16:39 -0700)]
[flang] Merge pull request flang-compiler/f18#375 from flang-compiler/if-stmt-2

Remove unused variable in check-if-stmt.cc

Original-commit: flang-compiler/f18@274d66bcb048a49fd23fb587349f9603dd0907e3
Reviewed-on: https://github.com/flang-compiler/f18/pull/375

5 years ago[flang] Remove unused variable in check-if-stmt.cc
Steve Scalpone [Tue, 2 Apr 2019 04:28:16 +0000 (21:28 -0700)]
[flang] Remove unused variable in check-if-stmt.cc

Original-commit: flang-compiler/f18@520751311d5791341112ffa3a9b7e0fba90440b3
Reviewed-on: https://github.com/flang-compiler/f18/pull/375

5 years ago[flang] Merge pull request flang-compiler/f18#378 from flang-compiler/pmk-fix376
Peter Klausler [Tue, 2 Apr 2019 19:21:52 +0000 (12:21 -0700)]
[flang] Merge pull request flang-compiler/f18#378 from flang-compiler/pmk-fix376

Fix bugs flang-compiler/f18#376, flang-compiler/f18#377

Original-commit: flang-compiler/f18@89ef8f927070408b71fc0c8c6558043ce510870b
Reviewed-on: https://github.com/flang-compiler/f18/pull/378

5 years ago[flang] Address comments, clean up warnings
peter klausler [Tue, 2 Apr 2019 18:56:19 +0000 (11:56 -0700)]
[flang] Address comments, clean up warnings

Original-commit: flang-compiler/f18@a5eeeb4430825020e14141c0d51d1bb7160546e5
Reviewed-on: https://github.com/flang-compiler/f18/pull/378

5 years ago[flang] Also fix bug#377
peter klausler [Tue, 2 Apr 2019 18:02:30 +0000 (11:02 -0700)]
[flang] Also fix bug#377

Original-commit: flang-compiler/f18@56631cf5e10a5f7f2909d8b83ede72b21d986348
Reviewed-on: https://github.com/flang-compiler/f18/pull/378
Tree-same-pre-rewrite: false

5 years ago[flang] Clean up and prep for review
peter klausler [Tue, 2 Apr 2019 17:58:26 +0000 (10:58 -0700)]
[flang] Clean up and prep for review

Original-commit: flang-compiler/f18@3f96c673e06b630050f8082d9ba019a0ba4ed21b
Reviewed-on: https://github.com/flang-compiler/f18/pull/378
Tree-same-pre-rewrite: false

5 years ago[flang] Fix bug flang-compiler/f18#376, internal error when correcting misparse of...
peter klausler [Tue, 2 Apr 2019 17:34:45 +0000 (10:34 -0700)]
[flang] Fix bug flang-compiler/f18#376, internal error when correcting misparse of structure constructor

Original-commit: flang-compiler/f18@f18a94ef9690c412907c733ac08be6736ea4eaad
Reviewed-on: https://github.com/flang-compiler/f18/pull/378
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#368 from flang-compiler/tsk4b
Tim Keith [Tue, 2 Apr 2019 17:55:16 +0000 (10:55 -0700)]
[flang] Merge pull request flang-compiler/f18#368 from flang-compiler/tsk4b

Rework .mod file writing for subprogram interfaces

Original-commit: flang-compiler/f18@807824cb512f73d0bbcd8c94985c99185735fa72
Reviewed-on: https://github.com/flang-compiler/f18/pull/368

5 years ago[flang] Fix test
Tim Keith [Mon, 1 Apr 2019 14:15:03 +0000 (07:15 -0700)]
[flang] Fix test

A sequence type must have a component.

Original-commit: flang-compiler/f18@937b3eaf068651a8fb07e45348ef119b0e420b70
Reviewed-on: https://github.com/flang-compiler/f18/pull/368

5 years ago[flang] Rework .mod file writing for subprogram interfaces
Tim Keith [Fri, 29 Mar 2019 22:04:17 +0000 (15:04 -0700)]
[flang] Rework .mod file writing for subprogram interfaces

A subprogram interface in a `.mod` file requires all of the symbols
needed to declare the function return value and dummy arguments.
Some of those were missing.

`SubprogramSymbolCollector` recursively discovers all such symbols,
including symbols used in type parameters, array bounds, character
lengths, parent types.

Common blocks require special handling: If any of the symbols that
are need appear in a common block, we have to include that common block
and all other symbols in it. To make that easier to figure out, add the
`commonBlock` property to `ObjectEntityDetails` to map the entity to
the common block it is in, if any.

Original-commit: flang-compiler/f18@08709f8e88c3b37bdf8461f34340dc345dfbb085
Reviewed-on: https://github.com/flang-compiler/f18/pull/368
Tree-same-pre-rewrite: false

5 years ago[flang] Resolve LHS in pointer assignment
Tim Keith [Tue, 19 Mar 2019 22:30:25 +0000 (15:30 -0700)]
[flang] Resolve LHS in pointer assignment

Original-commit: flang-compiler/f18@9a3525275cb8b25c6be80635a40d182b73042ea4
Reviewed-on: https://github.com/flang-compiler/f18/pull/368
Tree-same-pre-rewrite: false

5 years ago[flang] Dump function return attributes
Tim Keith [Wed, 20 Mar 2019 20:52:33 +0000 (13:52 -0700)]
[flang] Dump function return attributes

Also, change SubprogramDetails::result_ from `std::optional<Symbol *>`
to `Symbol *`. We don't need two levels of optional-ness.

Original-commit: flang-compiler/f18@db3b874946dc9b139009d7e10832edb2a076a7bc
Reviewed-on: https://github.com/flang-compiler/f18/pull/368
Tree-same-pre-rewrite: false

5 years ago[flang] Don't add inherited procedures to generic binding
Tim Keith [Thu, 21 Mar 2019 00:00:26 +0000 (17:00 -0700)]
[flang] Don't add inherited procedures to generic binding

In this example:
```
  type t1
  contains
    procedure, nopass :: s1
    generic :: foo => s1
  end type
  type, extends(t1) :: t2
  contains
    procedure, nopass :: s2
    generic :: foo => s2
  end type
```

The GenericBindingDetails for foo in t2 include both s1 and s2 as
specific procs. There is no way to distinguish between the binding in
the current type and the binding that was inherited. In particular,
the .mod file will have a binding for s1 in t2, so it won't match the
original source (for exampke, see the old version of modfile14.f90).

Original-commit: flang-compiler/f18@4e2c6be5cbdc5d31c41f0e44b85985b4fb69210d
Reviewed-on: https://github.com/flang-compiler/f18/pull/368
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#370 from flang-compiler/pmk-fix363
Peter Klausler [Tue, 2 Apr 2019 16:26:05 +0000 (09:26 -0700)]
[flang] Merge pull request flang-compiler/f18#370 from flang-compiler/pmk-fix363

Fix flang-compiler/f18#363: Adjust member function names in integer.h to avoid confusion.

Original-commit: flang-compiler/f18@bdd750f742eafde96054e438731137e80673d5aa
Reviewed-on: https://github.com/flang-compiler/f18/pull/370

5 years ago[flang] Adjust member function names in integer.h to avoid confusion.
peter klausler [Mon, 1 Apr 2019 17:43:42 +0000 (10:43 -0700)]
[flang] Adjust member function names in integer.h to avoid confusion.

Original-commit: flang-compiler/f18@56dba8fa0897294b1a6f59348938312c0dff3e7b
Reviewed-on: https://github.com/flang-compiler/f18/pull/370

5 years ago[flang] Merge pull request flang-compiler/f18#373 from flang-compiler/pmk-source
Peter Klausler [Mon, 1 Apr 2019 23:49:59 +0000 (16:49 -0700)]
[flang] Merge pull request flang-compiler/f18#373 from flang-compiler/pmk-source

Fix flang-compiler/f18#358: Define and use UnlabeledStatement<> for if & forall

Original-commit: flang-compiler/f18@7c76ba5158cdbbe4461d15ecffbf754e7172667c
Reviewed-on: https://github.com/flang-compiler/f18/pull/373

5 years ago[flang] some debugging after more testing
peter klausler [Mon, 1 Apr 2019 23:15:47 +0000 (16:15 -0700)]
[flang] some debugging after more testing

Original-commit: flang-compiler/f18@005b841dd1140a809fb8123ed5b02048b8e1a4d3
Reviewed-on: https://github.com/flang-compiler/f18/pull/373

5 years ago[flang] Use source location in IF statement checks.
peter klausler [Mon, 1 Apr 2019 23:00:19 +0000 (16:00 -0700)]
[flang] Use source location in IF statement checks.

Original-commit: flang-compiler/f18@9e08746e2b4487bddf2e4b3580cdea4568fa5d53
Reviewed-on: https://github.com/flang-compiler/f18/pull/373
Tree-same-pre-rewrite: false

5 years ago[flang] Fix typo
peter klausler [Mon, 1 Apr 2019 22:57:07 +0000 (15:57 -0700)]
[flang] Fix typo

Original-commit: flang-compiler/f18@c5b05009df4562f79fc0e219c73ec6123b9982c1
Reviewed-on: https://github.com/flang-compiler/f18/pull/373
Tree-same-pre-rewrite: false

5 years ago[flang] Fix typo
peter klausler [Mon, 1 Apr 2019 22:55:31 +0000 (15:55 -0700)]
[flang] Fix typo

Original-commit: flang-compiler/f18@6be309300e329487f39c546e6d07ae7dc82d1ac0
Reviewed-on: https://github.com/flang-compiler/f18/pull/373
Tree-same-pre-rewrite: false

5 years ago[flang] Define and use UnlabeledStatement<> for if & forall
peter klausler [Mon, 1 Apr 2019 22:52:49 +0000 (15:52 -0700)]
[flang] Define and use UnlabeledStatement<> for if & forall

Original-commit: flang-compiler/f18@028e6aba6cd0ca40533401fcd4bab38e94f1f43a
Reviewed-on: https://github.com/flang-compiler/f18/pull/373
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#372 from flang-compiler/tsk3
Tim Keith [Mon, 1 Apr 2019 23:21:44 +0000 (16:21 -0700)]
[flang] Merge pull request flang-compiler/f18#372 from flang-compiler/tsk3

Name resolution bug fixes

Original-commit: flang-compiler/f18@74c994e9a5b90daedff591891d60ba83601505db
Reviewed-on: https://github.com/flang-compiler/f18/pull/372

5 years ago[flang] Name resolution bug fixes
Tim Keith [Mon, 1 Apr 2019 20:08:57 +0000 (13:08 -0700)]
[flang] Name resolution bug fixes

Fix a but where a derived type was not use-associated correctly
due to missing call to `GetUltimate()`.

Fix a bug with access statement, generic interface, and derived
type all with the same name.

Remove some TODOs that have been done.

Original-commit: flang-compiler/f18@4ba2b64c6d291d04691891535da96f425dda2338
Reviewed-on: https://github.com/flang-compiler/f18/pull/372

5 years ago[flang] Merge pull request flang-compiler/f18#371 from flang-compiler/pmk-parens
Peter Klausler [Mon, 1 Apr 2019 22:20:18 +0000 (15:20 -0700)]
[flang] Merge pull request flang-compiler/f18#371 from flang-compiler/pmk-parens

Fix flang-compiler/f18#350: insert parens into formatted expressions only when required

Original-commit: flang-compiler/f18@24fd62850cbb3e50aa8185bc61d2683e723810f8
Reviewed-on: https://github.com/flang-compiler/f18/pull/371

5 years ago[flang] Revert to AsFortran in module file output.
peter klausler [Mon, 1 Apr 2019 22:02:23 +0000 (15:02 -0700)]
[flang] Revert to AsFortran in module file output.

Original-commit: flang-compiler/f18@3dc7f685d177788f8f13d97d7e03aa00720f4730
Reviewed-on: https://github.com/flang-compiler/f18/pull/371

5 years ago[flang] Use operator<< in test.
peter klausler [Mon, 1 Apr 2019 20:03:26 +0000 (13:03 -0700)]
[flang] Use operator<< in test.

Original-commit: flang-compiler/f18@e3f321e9f0a1995b82b33de2911ca8a1754b8e91
Reviewed-on: https://github.com/flang-compiler/f18/pull/371
Tree-same-pre-rewrite: false

5 years ago[flang] Logical operation precedence
peter klausler [Mon, 1 Apr 2019 20:01:42 +0000 (13:01 -0700)]
[flang] Logical operation precedence

Original-commit: flang-compiler/f18@060bc39fb4f42a9ac82b05a0603d62a2bdc3cb30
Reviewed-on: https://github.com/flang-compiler/f18/pull/371
Tree-same-pre-rewrite: false

5 years ago[flang] Pass tests
peter klausler [Mon, 1 Apr 2019 19:30:08 +0000 (12:30 -0700)]
[flang] Pass tests

Original-commit: flang-compiler/f18@ffb057f262c63e877f5bebc9604f795804bc1042
Reviewed-on: https://github.com/flang-compiler/f18/pull/371
Tree-same-pre-rewrite: false

5 years ago[flang] work in progress
peter klausler [Mon, 1 Apr 2019 17:54:22 +0000 (10:54 -0700)]
[flang] work in progress

Original-commit: flang-compiler/f18@33ea8e506a114350d4c587ed14c6f5dacbd5379a
Reviewed-on: https://github.com/flang-compiler/f18/pull/371
Tree-same-pre-rewrite: false

5 years ago[flang] Move some AsFortran() implementations into new formatting.cc; use precedence...
peter klausler [Wed, 27 Mar 2019 22:27:33 +0000 (15:27 -0700)]
[flang] Move some AsFortran() implementations into new formatting.cc; use precedence for parentheses

Original-commit: flang-compiler/f18@2b5fa051df3c8e183349388181e66e085385396e
Reviewed-on: https://github.com/flang-compiler/f18/pull/371
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#352 from flang-compiler/pmk-parsing
Peter Klausler [Mon, 1 Apr 2019 17:49:45 +0000 (10:49 -0700)]
[flang] Merge pull request flang-compiler/f18#352 from flang-compiler/pmk-parsing

Fix some parsing issues found by Steve

Original-commit: flang-compiler/f18@683766f7f512f5ea5d9b4c15ea71c6d82aada93c
Reviewed-on: https://github.com/flang-compiler/f18/pull/352

5 years ago[flang] Add extension edit descriptors to the unparser.
peter klausler [Fri, 22 Mar 2019 23:37:17 +0000 (16:37 -0700)]
[flang] Add extension edit descriptors to the unparser.

Original-commit: flang-compiler/f18@74e09e249a0e99059cd4d0fd89deadd2bc82b5a0
Reviewed-on: https://github.com/flang-compiler/f18/pull/352

5 years ago[flang] Support CONVERT= and DISPOSE= on INQUIRE
peter klausler [Fri, 22 Mar 2019 22:08:16 +0000 (15:08 -0700)]
[flang] Support CONVERT= and DISPOSE= on INQUIRE

Original-commit: flang-compiler/f18@fbedd32376eb71d289177cfe127d1d4835a51a61
Reviewed-on: https://github.com/flang-compiler/f18/pull/352
Tree-same-pre-rewrite: false

5 years ago[flang] Check int literals for overflow when kind is known.
peter klausler [Fri, 22 Mar 2019 21:27:18 +0000 (14:27 -0700)]
[flang] Check int literals for overflow when kind is known.

improve test

Original-commit: flang-compiler/f18@09ce783cd30e6d70829d0b5596fe8f3e0f88c64f
Reviewed-on: https://github.com/flang-compiler/f18/pull/352
Tree-same-pre-rewrite: false

5 years ago[flang] Allow dollar and backslash formats
peter klausler [Thu, 21 Mar 2019 23:47:51 +0000 (16:47 -0700)]
[flang] Allow dollar and backslash formats

Original-commit: flang-compiler/f18@4d8d6e599eab130a9026c53f404a7036d4410c47
Reviewed-on: https://github.com/flang-compiler/f18/pull/352
Tree-same-pre-rewrite: false

5 years ago[flang] Allow multiple associations on legacy POINTER declaration
peter klausler [Thu, 21 Mar 2019 23:29:50 +0000 (16:29 -0700)]
[flang] Allow multiple associations on legacy POINTER declaration

fix that fix

Original-commit: flang-compiler/f18@f096b73842cc0d443517a1075b3a31dd9ed8fdca
Reviewed-on: https://github.com/flang-compiler/f18/pull/352
Tree-same-pre-rewrite: false

5 years ago[flang] Update documentation to reflect current intrinsic procedure support in f18
jeanPerier [Mon, 1 Apr 2019 08:44:51 +0000 (01:44 -0700)]
[flang] Update documentation to reflect current intrinsic procedure support in f18

Merge pull request flang-compiler/f18#366 from flang-compiler/jpr0

Original-commit: flang-compiler/f18@0f310c8a8cf48ea61990ffa3ebcf2e15b8e7e73d

5 years ago[flang] Address review comment
Jean Perier [Mon, 1 Apr 2019 08:39:19 +0000 (01:39 -0700)]
[flang] Address review comment

Original-commit: flang-compiler/f18@1e3b3b457d5128b6a2419c6fac8e8e4f8a8bfb28

5 years ago[flang] Update documentation with status of intrinsic procedure support in f18
Jean Perier [Fri, 29 Mar 2019 15:48:39 +0000 (08:48 -0700)]
[flang] Update documentation with status of intrinsic procedure support in f18

Original-commit: flang-compiler/f18@aa12037a5b923cbcafd04430a8436900077c6f78
Tree-same-pre-rewrite: false

5 years ago[flang] Remove useless dummy return statements
Jean Perier [Fri, 29 Mar 2019 11:30:35 +0000 (04:30 -0700)]
[flang] Remove useless dummy return statements

I first added these because I had issues with return type deduction
in lambdas, but they are actually useless when the return type is
specified in the lambda signature.

Original-commit: flang-compiler/f18@5bcbbd8bdcef2e5c34edbfa755572e74514551fe
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#365 from flang-compiler/do2
psteinfeld [Fri, 29 Mar 2019 15:48:24 +0000 (08:48 -0700)]
[flang] Merge pull request flang-compiler/f18#365 from flang-compiler/do2

Fix semantics test for "DO".

Original-commit: flang-compiler/f18@62794b980ec1ba1c681a84d8533fe9df5a9ea68b
Reviewed-on: https://github.com/flang-compiler/f18/pull/365

5 years ago[flang] This test fails when the directory in which test tests are run contains a...
Peter Steinfeld [Fri, 29 Mar 2019 00:17:30 +0000 (17:17 -0700)]
[flang] This test fails when the directory in which test tests are run contains a path that matches the pattern "do *[1-9]".  In my case, I had a directory called "do1".  The "*" is not necessary in the pattern.  Now the test passes unless the directory contains a " ".

Original-commit: flang-compiler/f18@462f15e4e7c1e6a2c266700e4548f67ba9b32ca9
Reviewed-on: https://github.com/flang-compiler/f18/pull/365

5 years ago[flang] Fix F18 scalar integer power algorithm
jeanPerier [Fri, 29 Mar 2019 09:24:55 +0000 (02:24 -0700)]
[flang] Fix F18 scalar integer power algorithm

Merge pull request flang-compiler/f18#362 from flang-compiler/jpr1

Original-commit: flang-compiler/f18@9f3f42fbadabfd7841478ce872fa232be601b2d2

5 years ago[flang] Fix F18 scalar integer power algorithm
Jean Perier [Thu, 28 Mar 2019 15:18:42 +0000 (08:18 -0700)]
[flang] Fix F18 scalar integer power algorithm

Original-commit: flang-compiler/f18@f0609e7ace60d6272285eda9d57e4052632b0e3c

5 years ago[flang] Fix compilation issues of PR flang-compiler/f18#292
jeanPerier [Fri, 29 Mar 2019 09:24:19 +0000 (02:24 -0700)]
[flang] Fix compilation issues of PR flang-compiler/f18#292

Merge pull request flang-compiler/f18#361 from flang-compiler/jpr0

Original-commit: flang-compiler/f18@37252adf0ec6f9968c2ff8e1f720459d89f55b6a

5 years ago[flang] Add todo for bessel function default support
Jean Perier [Fri, 29 Mar 2019 08:41:26 +0000 (01:41 -0700)]
[flang] Add todo for bessel function default support

Original-commit: flang-compiler/f18@3842e7f5acda4bb35cf6ac235250f1ba4adee504

5 years ago[flang] Fix compilation failure on PowerPC
Jean Perier [Thu, 28 Mar 2019 13:53:52 +0000 (06:53 -0700)]
[flang] Fix compilation failure on PowerPC

Original-commit: flang-compiler/f18@f79f4973b62c378fea2de71eb002b235c53a7c28
Tree-same-pre-rewrite: false

5 years ago[flang] Remove non standard use of bessel C functions
Jean Perier [Thu, 28 Mar 2019 11:25:13 +0000 (04:25 -0700)]
[flang] Remove non standard use of bessel C functions

Original-commit: flang-compiler/f18@a40559372a6c7476eb999ecdb2b9bee681ad4122
Tree-same-pre-rewrite: false

5 years ago[flang] Silence GCC 8.1 spurious warning
Jean Perier [Thu, 28 Mar 2019 09:34:32 +0000 (02:34 -0700)]
[flang] Silence GCC 8.1 spurious warning

Original-commit: flang-compiler/f18@69e05d0632cd9722767ce4c945a614a29917ec92
Tree-same-pre-rewrite: false