Eric Schweitz
4ebcf8b702
[flang] add std::move per review comments
...
Original-commit: flang-compiler/f18@0f3c1616ed
Reviewed-on: https://github.com/flang-compiler/f18/pull/399
2019-04-11 09:50:55 -07:00
Eric Schweitz
af375b2560
[flang] add QualifiedStmt class
...
Original-commit: flang-compiler/f18@6bc660c355
Reviewed-on: https://github.com/flang-compiler/f18/pull/399
Tree-same-pre-rewrite: false
2019-04-09 11:52:04 -07:00
psteinfeld
f6893e2409
[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@747858b7eb
Reviewed-on: https://github.com/flang-compiler/f18/pull/398
2019-04-10 13:13:27 -07:00
Peter Steinfeld
95d8de80fe
[flang] Changed the DO loop termination message to be different for the error
...
case.
Original-commit: flang-compiler/f18@51cf517cca
Reviewed-on: https://github.com/flang-compiler/f18/pull/398
2019-04-10 13:06:48 -07:00
Peter Steinfeld
5c7687bdbe
[flang] Removed erroneous reference to "obsolete" and fixed up the message
...
as per Peter Klauser's recommendation.
Original-commit: flang-compiler/f18@f4d6d7007d
Reviewed-on: https://github.com/flang-compiler/f18/pull/398
Tree-same-pre-rewrite: false
2019-04-10 11:40:52 -07:00
Peter Steinfeld
7272fb7834
[flang] Fixed up messages per comments from Peter Klausler.
...
Original-commit: flang-compiler/f18@4103ca4297
Reviewed-on: https://github.com/flang-compiler/f18/pull/398
Tree-same-pre-rewrite: false
2019-04-10 10:52:47 -07:00
Peter Steinfeld
259c540191
[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@0a9280eab1
Reviewed-on: https://github.com/flang-compiler/f18/pull/398
Tree-same-pre-rewrite: false
2019-04-10 09:50:27 -07:00
Peter Klausler
f02d8d3aed
[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@9e08bd4cec
Reviewed-on: https://github.com/flang-compiler/f18/pull/394
2019-04-10 09:28:06 -07:00
peter klausler
923c891111
[flang] Do not replace format with namelist if there is no unit (avoiding accidental language extension)
...
Original-commit: flang-compiler/f18@08562d9b86
Reviewed-on: https://github.com/flang-compiler/f18/pull/394
2019-04-10 08:52:46 -07:00
peter klausler
0e55f2463b
[flang] Rewrite read-stmt/write-stmt parse trees for misparsed namelist group names
...
Original-commit: flang-compiler/f18@e0f1b1c469
Reviewed-on: https://github.com/flang-compiler/f18/pull/394
Tree-same-pre-rewrite: false
2019-04-10 08:52:42 -07:00
Eric Schweitz
798e5544b0
[flang] Merge pull request flang-compiler/f18#393 from schweitzpgi/forward
...
Forwarding, etc.
Original-commit: flang-compiler/f18@0e587c9315
Reviewed-on: https://github.com/flang-compiler/f18/pull/393
2019-04-10 08:14:40 -07:00
Eric Schweitz
253f361152
[flang] make the ctor use special type deduction so members can be moved and
...
copied in the same call
Original-commit: flang-compiler/f18@d18e8391fc
Reviewed-on: https://github.com/flang-compiler/f18/pull/393
2019-04-09 11:36:42 -07:00
Eric Schweitz
2f64d464d5
[flang] fix forward references
...
Original-commit: flang-compiler/f18@4d8902887d
Reviewed-on: https://github.com/flang-compiler/f18/pull/393
Tree-same-pre-rewrite: false
2019-04-09 11:36:28 -07:00
Tim Keith
3f4a22f53a
[flang] Merge pull request flang-compiler/f18#395 from flang-compiler/tsk3
...
Fix source locations for some expressions
Original-commit: flang-compiler/f18@ac4fb9a1be
Reviewed-on: https://github.com/flang-compiler/f18/pull/395
2019-04-09 18:34:39 -07:00
Tim Keith
0671857b69
[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@e276f11f48
Reviewed-on: https://github.com/flang-compiler/f18/pull/395
2019-04-09 16:48:37 -07:00
Peter Klausler
90b8f222b8
[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@198b0cc572
Reviewed-on: https://github.com/flang-compiler/f18/pull/390
2019-04-09 14:06:45 -07:00
peter klausler
4950dfa04e
[flang] Redo without macros
...
Original-commit: flang-compiler/f18@8d955cfb3b
Reviewed-on: https://github.com/flang-compiler/f18/pull/390
2019-04-09 13:29:40 -07:00
peter klausler
3230a2f3ce
[flang] fix bug found in testing
...
Original-commit: flang-compiler/f18@297ad78510
Reviewed-on: https://github.com/flang-compiler/f18/pull/390
Tree-same-pre-rewrite: false
2019-04-08 16:57:30 -07:00
peter klausler
8057a2ce32
[flang] Lots of debugging and refinement
...
Original-commit: flang-compiler/f18@1c3c30b540
Reviewed-on: https://github.com/flang-compiler/f18/pull/390
Tree-same-pre-rewrite: false
2019-04-08 16:16:55 -07:00
peter klausler
17c4ae070b
[flang] Revert that reversion. Move semantics work just fine.
...
Original-commit: flang-compiler/f18@72bd8e7b03
Reviewed-on: https://github.com/flang-compiler/f18/pull/390
Tree-same-pre-rewrite: false
2019-04-08 14:29:47 -07:00
peter klausler
d0e7775431
[flang] Revert to forwarding on variadic messaging APIs
...
Original-commit: flang-compiler/f18@d2e464eb15
Reviewed-on: https://github.com/flang-compiler/f18/pull/390
Tree-same-pre-rewrite: false
2019-04-08 14:29:47 -07:00
peter klausler
84f7c4a658
[flang] Fix comment
...
Original-commit: flang-compiler/f18@d1345ca4fc
Reviewed-on: https://github.com/flang-compiler/f18/pull/390
Tree-same-pre-rewrite: false
2019-04-08 14:29:46 -07:00
peter klausler
dc9c3d1c46
[flang] Fix bug#389, prevent std::move() on forwarded lvalue references
...
Original-commit: flang-compiler/f18@9d61c091ad
Reviewed-on: https://github.com/flang-compiler/f18/pull/390
Tree-same-pre-rewrite: false
2019-04-08 14:29:45 -07:00
Steve Scalpone
1e8670bb4e
[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@a2f19b6563
Reviewed-on: https://github.com/flang-compiler/f18/pull/388
2019-04-08 22:46:27 +02:00
Steve Scalpone
9fbc37abf7
[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@17780c40d7
Reviewed-on: https://github.com/flang-compiler/f18/pull/388
2019-04-08 00:26:10 -07:00
Steve Scalpone
37a53df82c
[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@b7199219fb
Reviewed-on: https://github.com/flang-compiler/f18/pull/388
Tree-same-pre-rewrite: false
2019-04-07 11:29:48 -07:00
Eric Schweitz
d48ac531b9
[flang] Merge pull request flang-compiler/f18#385 from schweitzpgi/fir3
...
fix some bugs with use of std::move
Original-commit: flang-compiler/f18@5569e8ede2
Reviewed-on: https://github.com/flang-compiler/f18/pull/385
2019-04-08 13:11:11 -07:00
Eric Schweitz
3151250d43
[flang] more fine-tuning of mixin classes to get lightweight constructors,
...
handle copies and moves, etc.
Original-commit: flang-compiler/f18@72a776b4c1
Reviewed-on: https://github.com/flang-compiler/f18/pull/385
2019-04-08 12:57:46 -07:00
Eric Schweitz
dbd8533e39
[flang] use std::forward, avoid std::move usage bugs
...
Original-commit: flang-compiler/f18@0d66bc2439
Reviewed-on: https://github.com/flang-compiler/f18/pull/385
Tree-same-pre-rewrite: false
2019-04-05 11:17:42 -07:00
Eric Schweitz
02faca4bb5
[flang] anchor virtual dtor
...
Original-commit: flang-compiler/f18@7121ccecb2
Reviewed-on: https://github.com/flang-compiler/f18/pull/385
Tree-same-pre-rewrite: false
2019-04-05 11:17:27 -07:00
Tim Keith
f0db68c952
[flang] Merge pull request flang-compiler/f18#387 from flang-compiler/tsk3
...
Update the grammar with team-value
Original-commit: flang-compiler/f18@b8e95dcd1d
Reviewed-on: https://github.com/flang-compiler/f18/pull/387
2019-04-08 10:37:08 -07:00
Tim Keith
1599d09041
[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@9071f0a352
Reviewed-on: https://github.com/flang-compiler/f18/pull/387
2019-04-06 11:17:07 -07:00
Peter Klausler
ce69b801d1
[flang] Merge pull request flang-compiler/f18#386 from flang-compiler/pmk-sjs-reshape-bug
...
Shape analysis
Original-commit: flang-compiler/f18@47fc2c4b2c
Reviewed-on: https://github.com/flang-compiler/f18/pull/386
2019-04-05 15:57:29 -07:00
peter klausler
94d0b8fb0a
[flang] Address review comments
...
Original-commit: flang-compiler/f18@20cef2db45
Reviewed-on: https://github.com/flang-compiler/f18/pull/386
2019-04-05 15:19:13 -07:00
peter klausler
130e166a6e
[flang] Remove hash from expected module file output
...
Original-commit: flang-compiler/f18@8da47c44d2
Reviewed-on: https://github.com/flang-compiler/f18/pull/386
Tree-same-pre-rewrite: false
2019-04-05 13:09:02 -07:00
peter klausler
5c3197fa0b
[flang] Fix implied DO folding with negative strides, add test
...
Original-commit: flang-compiler/f18@2e14b76041
Reviewed-on: https://github.com/flang-compiler/f18/pull/386
Tree-same-pre-rewrite: false
2019-04-05 12:58:19 -07:00
peter klausler
f0a19461ea
[flang] Remove a needless Indirection
...
Original-commit: flang-compiler/f18@eb637232b1
Reviewed-on: https://github.com/flang-compiler/f18/pull/386
Tree-same-pre-rewrite: false
2019-04-05 12:56:13 -07:00
peter klausler
2e2389c46d
[flang] More folding of SIZE()
...
Original-commit: flang-compiler/f18@23f62fea1d
Reviewed-on: https://github.com/flang-compiler/f18/pull/386
Tree-same-pre-rewrite: false
2019-04-05 12:56:12 -07:00
peter klausler
28184c4a49
[flang] Simplify expression visitor usage
...
Original-commit: flang-compiler/f18@9ab121d6a6
Reviewed-on: https://github.com/flang-compiler/f18/pull/386
Tree-same-pre-rewrite: false
2019-04-05 12:56:09 -07:00
peter klausler
c49f7da3f2
[flang] complete GetShape, compile
...
Original-commit: flang-compiler/f18@ff124f69a9
Reviewed-on: https://github.com/flang-compiler/f18/pull/386
Tree-same-pre-rewrite: false
2019-04-05 12:56:06 -07:00
peter klausler
b65572d5a0
[flang] fix original failure (reshape intrinsic argument check)
...
Original-commit: flang-compiler/f18@8bba330b32
Reviewed-on: https://github.com/flang-compiler/f18/pull/386
Tree-same-pre-rewrite: false
2019-04-05 12:56:04 -07:00
peter klausler
e08a2b7b22
[flang] clean up CoarrayRef
...
Original-commit: flang-compiler/f18@41bef37c7c
Reviewed-on: https://github.com/flang-compiler/f18/pull/386
Tree-same-pre-rewrite: false
2019-04-05 12:56:03 -07:00
peter klausler
47f8713854
[flang] Begin shape analysis
...
Original-commit: flang-compiler/f18@888166c97e
Reviewed-on: https://github.com/flang-compiler/f18/pull/386
Tree-same-pre-rewrite: false
2019-04-05 12:56:00 -07:00
Tim Keith
89a219488c
[flang] Merge pull request flang-compiler/f18#384 from flang-compiler/tsk4
...
Support coarrays in name resolution
Original-commit: flang-compiler/f18@877846f63c
Reviewed-on: https://github.com/flang-compiler/f18/pull/384
2019-04-05 11:22:36 -07:00
Tim Keith
bc140ed13c
[flang] Address review comments.
...
Change AnalyzeArraySpec and AnalyzeCoarraySpec to return resulting
ArraySpec by value.
Original-commit: flang-compiler/f18@0ae38143e5
Reviewed-on: https://github.com/flang-compiler/f18/pull/384
2019-04-04 16:32:37 -07:00
Tim Keith
b7efa8b77b
[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@9d2482c40c
Reviewed-on: https://github.com/flang-compiler/f18/pull/384
Tree-same-pre-rewrite: false
2019-04-04 14:47:59 -07:00
psteinfeld
924c38356c
[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@f28eb106fd
2019-04-04 10:52:24 -07:00
psteinfeld
f0fa0e5299
[flang] Update OptionComparison.md
...
Original-commit: flang-compiler/f18@8beda1f14e
2019-04-04 10:48:44 -07:00
psteinfeld
fd7b35de94
[flang] Update OptionComparison.md
...
Original-commit: flang-compiler/f18@78e1fce92d
Tree-same-pre-rewrite: false
2019-04-03 10:24:47 -07:00
Tim Keith
40d79cda9f
[flang] Merge pull request flang-compiler/f18#380 from flang-compiler/tsk3
...
Pointer assignment bounds, section subscript, substring
Original-commit: flang-compiler/f18@1165a7c57f
Reviewed-on: https://github.com/flang-compiler/f18/pull/380
2019-04-03 09:54:38 -07:00