platform/upstream/llvm.git
5 years ago[flang] Avoid copying scope. Improve readability.
Steve Scalpone [Mon, 15 Apr 2019 16:41:27 +0000 (09:41 -0700)]
[flang] Avoid copying scope. Improve readability.

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

5 years ago[flang] Scope is only ever set to the address of a Scope,
Steve Scalpone [Mon, 15 Apr 2019 05:16:09 +0000 (22:16 -0700)]
[flang] Scope is only ever set to the address of a Scope,
so it can never be null. The condition should be
scope->kind() != Scope::Kind::Global.
And clang-format.

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

5 years ago[flang] Implement semantic checks for return and alt-return.
Steve Scalpone [Sun, 14 Apr 2019 03:58:25 +0000 (20:58 -0700)]
[flang] Implement semantic checks for return and alt-return.

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

5 years ago[flang] Merge pull request flang-compiler/f18#413 from flang-compiler/pmk-no-scope...
Peter Klausler [Mon, 15 Apr 2019 17:40:35 +0000 (10:40 -0700)]
[flang] Merge pull request flang-compiler/f18#413 from flang-compiler/pmk-no-scope-copy-constr

Delete the default copy constructor for Scope.

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

5 years ago[flang] Delete the default copy constructor for Scope.
peter klausler [Mon, 15 Apr 2019 17:12:26 +0000 (10:12 -0700)]
[flang] Delete the default copy constructor for Scope.

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

5 years ago[flang] Merge pull request flang-compiler/f18#406 from flang-compiler/pmk-fix-expr...
Peter Klausler [Mon, 15 Apr 2019 17:29:41 +0000 (10:29 -0700)]
[flang] Merge pull request flang-compiler/f18#406 from flang-compiler/pmk-fix-expr-constraints

Reactivate tree-driven expression constraint checking

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

5 years ago[flang] Fix clang warning that crept into codebase over weekend
peter klausler [Mon, 15 Apr 2019 17:09:22 +0000 (10:09 -0700)]
[flang] Fix clang warning that crept into codebase over weekend

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

5 years ago[flang] reformatting
peter klausler [Mon, 15 Apr 2019 16:44:54 +0000 (09:44 -0700)]
[flang] reformatting

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

5 years ago[flang] pass all tests
peter klausler [Fri, 12 Apr 2019 23:50:58 +0000 (16:50 -0700)]
[flang] pass all tests

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

5 years ago[flang] Ensure no failed expression analyses without fatal errors.
peter klausler [Fri, 12 Apr 2019 18:43:03 +0000 (11:43 -0700)]
[flang] Ensure no failed expression analyses without fatal errors.

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

5 years ago[flang] Capitalize INTEGER in error messages
peter klausler [Fri, 12 Apr 2019 17:49:22 +0000 (10:49 -0700)]
[flang] Capitalize INTEGER in error messages

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

5 years ago[flang] Finish up
peter klausler [Fri, 12 Apr 2019 17:20:42 +0000 (10:20 -0700)]
[flang] Finish up

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

5 years ago[flang] Split doconcurrent04.f90 test into one with expression checks and one for...
peter klausler [Fri, 12 Apr 2019 00:25:43 +0000 (17:25 -0700)]
[flang] Split doconcurrent04.f90 test into one with expression checks and one for later semantics pass.

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

5 years ago[flang] Reactivate tree-driven constraint checking on expressions.
peter klausler [Fri, 12 Apr 2019 00:22:16 +0000 (17:22 -0700)]
[flang] Reactivate tree-driven constraint checking on expressions.

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

5 years ago[flang] Merge pull request flang-compiler/f18#409 from flang-compiler/klausler-patch-1
Peter Klausler [Mon, 15 Apr 2019 16:39:33 +0000 (09:39 -0700)]
[flang] Merge pull request flang-compiler/f18#409 from flang-compiler/klausler-patch-1

Update FortranForCProgrammers.md

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

5 years ago[flang] Update FortranForCProgrammers.md
Peter Klausler [Fri, 12 Apr 2019 18:26:36 +0000 (11:26 -0700)]
[flang] Update FortranForCProgrammers.md

Clean up grammar and fix errata.

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

5 years ago[flang] Merge pull request flang-compiler/f18#397 from pawosm-arm/ftz-aarch64
Steve Scalpone [Mon, 15 Apr 2019 08:16:29 +0000 (01:16 -0700)]
[flang] Merge pull request flang-compiler/f18#397 from pawosm-arm/ftz-aarch64

AArch64: Set flushing mode for subnormals on glibc and bionic based systems

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

5 years ago[flang] AArch64: Set flushing mode for subnormals on glibc and bionic based systems
Paul Osmialowski [Wed, 10 Apr 2019 11:38:36 +0000 (12:38 +0100)]
[flang] AArch64: Set flushing mode for subnormals on glibc and bionic based systems

Signed-off-by: Paul Osmialowski <pawel.osmialowski@arm.com>
Original-commit: flang-compiler/f18@4881e3a91c34671a38ef410a771cd8e0e7a62e10
Reviewed-on: https://github.com/flang-compiler/f18/pull/397

5 years ago[flang] Merge pull request flang-compiler/f18#410 from flang-compiler/tsk6
Tim Keith [Sat, 13 Apr 2019 18:10:18 +0000 (11:10 -0700)]
[flang] Merge pull request flang-compiler/f18#410 from flang-compiler/tsk6

Remove ObjectName alternative from Designator

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

5 years ago[flang] Remove ObjectName alternative from Designator
Tim Keith [Fri, 12 Apr 2019 23:30:03 +0000 (16:30 -0700)]
[flang] Remove ObjectName alternative from Designator

A simple name in a `Designator` is always parsed as a `DataRef`, not
an `ObjectName`. So remove that alternative.

`StmtFunctionStmt::ConvertToAssignment` was creating a `Designator` with
that alternative: change it to do the same thing as the parser.

Add `GetSimpleName` utility functions to check if an `Expr` or `Variable`
represents a simple name. Many of the places that checked for `ObjectName`
in `Designator` are trying to do that.

Clean up includes and forward declarations in `tools.h`.

Original-commit: flang-compiler/f18@97d44de7b146aee601caa0bc529f7af8a6be001e
Reviewed-on: https://github.com/flang-compiler/f18/pull/410

5 years ago[flang] Merge pull request flang-compiler/f18#408 from schweitzpgi/qualtype
Eric Schweitz [Fri, 12 Apr 2019 17:52:01 +0000 (10:52 -0700)]
[flang] Merge pull request flang-compiler/f18#408 from schweitzpgi/qualtype

various code cleanups from QualifiedSmt reviews

Original-commit: flang-compiler/f18@71c5859d077ca8fdfeb246f15ab65139c67da702
Reviewed-on: https://github.com/flang-compiler/f18/pull/408

5 years ago[flang] tweak comment
Eric Schweitz [Fri, 12 Apr 2019 17:22:09 +0000 (10:22 -0700)]
[flang] tweak comment

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

5 years ago[flang] handle review comment: make ctor private
Eric Schweitz [Fri, 12 Apr 2019 17:19:41 +0000 (10:19 -0700)]
[flang] handle review comment: make ctor private

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

5 years ago[flang] various code cleanups from QualifiedType reviews
Eric Schweitz [Thu, 11 Apr 2019 19:04:18 +0000 (12:04 -0700)]
[flang] various code cleanups from QualifiedType reviews

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

5 years ago[flang] Merge pull request flang-compiler/f18#405 from flang-compiler/tsk-include...
Tim Keith [Fri, 12 Apr 2019 15:03:18 +0000 (08:03 -0700)]
[flang] Merge pull request flang-compiler/f18#405 from flang-compiler/tsk-include-cleanup

Clean up includes

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

5 years ago[flang] Clean up includes
Tim Keith [Thu, 11 Apr 2019 23:12:10 +0000 (16:12 -0700)]
[flang] Clean up includes

indirection.h: Doesn't need ../common because it is in common.

expression.h: ../lib is the wrong path but the includes are needed.
They were probably coming in indirectly through other includes.

token-parsers.h: Include was not needed and parser shouldn't have
dependency on evaluate.

Original-commit: flang-compiler/f18@86f6b0023d8a72fd7ccf32b1754b5544b52d22ba
Reviewed-on: https://github.com/flang-compiler/f18/pull/405

5 years ago[flang] Merge pull request flang-compiler/f18#404 from flang-compiler/sjs-cleanup
Steve Scalpone [Thu, 11 Apr 2019 23:21:38 +0000 (16:21 -0700)]
[flang] Merge pull request flang-compiler/f18#404 from flang-compiler/sjs-cleanup

Misc code cleanup.

Original-commit: flang-compiler/f18@034c1317e6341c9abb14dda3f1614b7ceaba500a
Reviewed-on: https://github.com/flang-compiler/f18/pull/404

5 years ago[flang] Cleanup -- Remove unnecessary inline keyword,
Steve Scalpone [Thu, 11 Apr 2019 22:20:14 +0000 (15:20 -0700)]
[flang] Cleanup -- Remove unnecessary inline keyword,
remove unnecessary (void) casts when ignoring
return values, call context_.Say() directly
instead of via messages(), and fix up some
formatting issues using clang-format.

Original-commit: flang-compiler/f18@68e5c02541e1c74abc48327a97291dc2aee530bb
Reviewed-on: https://github.com/flang-compiler/f18/pull/404

5 years ago[flang] Merge pull request flang-compiler/f18#400 from flang-compiler/ps1-392
psteinfeld [Thu, 11 Apr 2019 22:35:44 +0000 (15:35 -0700)]
[flang] Merge pull request flang-compiler/f18#400 from flang-compiler/ps1-392

Removed unused parameter and tweaked the error message one more time.

Original-commit: flang-compiler/f18@2d20bc549c441c243b6085fe821d2eefd6594f39
Reviewed-on: https://github.com/flang-compiler/f18/pull/400

5 years ago[flang] Hopefully the last fixup of messages that appear for bad termination
Peter Steinfeld [Thu, 11 Apr 2019 18:28:49 +0000 (11:28 -0700)]
[flang] Hopefully the last fixup of messages that appear for bad termination
of a DO loop.

Original-commit: flang-compiler/f18@23f7471f3a8490b348d3ca0871c7c377e3173b6d
Reviewed-on: https://github.com/flang-compiler/f18/pull/400

5 years ago[flang] My last change neglected to include the change to the message.
Peter Steinfeld [Wed, 10 Apr 2019 22:13:56 +0000 (15:13 -0700)]
[flang] My last change neglected to include the change to the message.

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

5 years ago[flang] Removed unused parameter and tweaked the error message one more time.
Peter Steinfeld [Wed, 10 Apr 2019 22:08:12 +0000 (15:08 -0700)]
[flang] Removed unused parameter and tweaked the error message one more time.

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

5 years ago[flang] Merge pull request flang-compiler/f18#401 from flang-compiler/check-deallocate
Steve Scalpone [Thu, 11 Apr 2019 21:37:49 +0000 (14:37 -0700)]
[flang] Merge pull request flang-compiler/f18#401 from flang-compiler/check-deallocate

Implement semantic checks for DEALLOCATE statements.

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

5 years ago[flang] Simply use context_.Say. Update test with duplicate dealloc opts.
Steve Scalpone [Thu, 11 Apr 2019 16:39:32 +0000 (09:39 -0700)]
[flang] Simply use context_.Say. Update test with duplicate dealloc opts.

Original-commit: flang-compiler/f18@61b7461552e69be3dde1059f597bd5140d50da8c
Reviewed-on: https://github.com/flang-compiler/f18/pull/401

5 years ago[flang] Correct constraint numbers. Fix spelling error. Run clang-format.
Steve Scalpone [Thu, 11 Apr 2019 11:16:14 +0000 (04:16 -0700)]
[flang] Correct constraint numbers. Fix spelling error. Run clang-format.

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

5 years ago[flang] Implement semantic checks for DEALLOCATE statements.
Steve Scalpone [Thu, 11 Apr 2019 05:17:44 +0000 (22:17 -0700)]
[flang] Implement semantic checks for DEALLOCATE statements.
The parser checks for duplicate dealloc-opts and expr
analysis checks that dealloc-opts are the right type.

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

5 years ago[flang] Merge pull request flang-compiler/f18#399 from schweitzpgi/qualtype
Eric Schweitz [Thu, 11 Apr 2019 16:55:23 +0000 (09:55 -0700)]
[flang] Merge pull request flang-compiler/f18#399 from schweitzpgi/qualtype

add QualifiedStmt class

Original-commit: flang-compiler/f18@984f9d7a297352d03a04adacb50d02b8fef61676
Reviewed-on: https://github.com/flang-compiler/f18/pull/399

5 years ago[flang] add std::move per review comments
Eric Schweitz [Thu, 11 Apr 2019 16:50:55 +0000 (09:50 -0700)]
[flang] add std::move per review comments

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

5 years ago[flang] add QualifiedStmt class
Eric Schweitz [Fri, 5 Apr 2019 19:22:08 +0000 (12:22 -0700)]
[flang] add QualifiedStmt class

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

5 years ago[flang] Merge pull request flang-compiler/f18#398 from flang-compiler/ps-392
psteinfeld [Wed, 10 Apr 2019 20:13:27 +0000 (13:13 -0700)]
[flang] Merge pull request flang-compiler/f18#398 from flang-compiler/ps-392

Fix issue 392, improve the error message when a DO loop is terminated by something other than
END DO or CONTINUE

Original-commit: flang-compiler/f18@747858b7eba7fab93f2351410ed1717e3d4f9db9
Reviewed-on: https://github.com/flang-compiler/f18/pull/398

5 years ago[flang] Changed the DO loop termination message to be different for the error
Peter Steinfeld [Wed, 10 Apr 2019 20:06:48 +0000 (13:06 -0700)]
[flang] Changed the DO loop termination message to be different for the error
case.

Original-commit: flang-compiler/f18@51cf517ccaff65d56277a0d316a512c99839787d
Reviewed-on: https://github.com/flang-compiler/f18/pull/398

5 years ago[flang] Removed erroneous reference to "obsolete" and fixed up the message
Peter Steinfeld [Wed, 10 Apr 2019 18:40:52 +0000 (11:40 -0700)]
[flang] Removed erroneous reference to "obsolete" and fixed up the message
as per Peter Klauser's recommendation.

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

5 years ago[flang] Fixed up messages per comments from Peter Klausler.
Peter Steinfeld [Wed, 10 Apr 2019 17:52:47 +0000 (10:52 -0700)]
[flang] Fixed up messages per comments from Peter Klausler.

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

5 years ago[flang] Fix issue 392, improve the error message when a DO loop is
Peter Steinfeld [Wed, 10 Apr 2019 16:45:41 +0000 (09:45 -0700)]
[flang] Fix issue 392, improve the error message when a DO loop is
terminated by a statement other than END DO or CONTINUE.

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

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