Commit graph

983 commits

Author SHA1 Message Date
peter klausler f7f2a73a43 [flang] remove arg->intValue field
Original-commit: flang-compiler/f18@721dc92022
Reviewed-on: https://github.com/flang-compiler/f18/pull/212
Tree-same-pre-rewrite: false
2018-10-12 16:02:35 -07:00
peter klausler a62636f634 [flang] debug initial intrinsic table probes
Original-commit: flang-compiler/f18@dce9a1e173
Reviewed-on: https://github.com/flang-compiler/f18/pull/212
Tree-same-pre-rewrite: false
2018-10-12 16:02:34 -07:00
peter klausler cb308d32a1 [flang] error messages
Original-commit: flang-compiler/f18@392a733073
Reviewed-on: https://github.com/flang-compiler/f18/pull/212
Tree-same-pre-rewrite: false
2018-10-12 16:02:33 -07:00
peter klausler 75a32097fd [flang] checkpoint
Original-commit: flang-compiler/f18@e103152671
Reviewed-on: https://github.com/flang-compiler/f18/pull/212
Tree-same-pre-rewrite: false
2018-10-12 16:02:31 -07:00
peter klausler a70f596719 [flang] intrinsic pattern matching
Original-commit: flang-compiler/f18@ca0ee1660a
Reviewed-on: https://github.com/flang-compiler/f18/pull/212
Tree-same-pre-rewrite: false
2018-10-12 16:02:30 -07:00
peter klausler b22d494357 [flang] buildable checkpoint before merging with master
Original-commit: flang-compiler/f18@78c5b8c411
Reviewed-on: https://github.com/flang-compiler/f18/pull/212
Tree-same-pre-rewrite: false
2018-10-12 16:02:29 -07:00
peter klausler 42b33da129 [flang] initial intrinsics table
Original-commit: flang-compiler/f18@8b5c3adf88
Reviewed-on: https://github.com/flang-compiler/f18/pull/212
Tree-same-pre-rewrite: false
2018-10-12 16:02:28 -07:00
Tim Keith 241301dc79 [flang] Merge pull request flang-compiler/f18#210 from flang-compiler/tsk2
More name resolution

Original-commit: flang-compiler/f18@f54c7b8759
Reviewed-on: https://github.com/flang-compiler/f18/pull/210
2018-10-12 07:06:18 -07:00
Tim Keith edf9eec265 [flang] More miscellaneous name resolution
Resolve the index name in a FORALL, DO, or DO CONCURRENT.

Handle pointer-stmt. Add DeclareUnknownEntity() to declare an entity
that is not yet know to be an object or procedure. This is used in the
EntityDecl and PointerDecl cases.

When an array element assignment is mistakenly parsed as a statement
function, ensure the index names are resolved.

Detect erroneous use-association with local name that matches the name
of the containing subprogram.

Cleanup: Eliminate GetVariableName() and CheckImplicitSymbol() in favor
of using the Resolve* functions consistently. Add ResolveName() to do
what CheckImplicitSymbol() used to do.

Disable warnings about unresolved names for some categories of
constructs that are not yet implemented: common blocks, namelist
statements, etc. These will be turned back on when they are implemented.

Original-commit: flang-compiler/f18@9a41bf37fd
Reviewed-on: https://github.com/flang-compiler/f18/pull/210
2018-10-10 16:20:46 -07:00
Tim Keith 7db04a4c05 [flang] Check conflicting construct names
Check that construct names don't conflict with other construct names or
entities in the same scoping unit.

This requires adding symbols for them. MiscDetails was added for cases
like this where we don't need to save much information about the symbol.
References to construct names are recorded too, so those names are now
expected to be resolved and no longer are exceptions in rewrite-parse-tree.cc

Checking that construct names match is still done in resolve-labels.cc.

Original-commit: flang-compiler/f18@0ad79ff029
Reviewed-on: https://github.com/flang-compiler/f18/pull/210
Tree-same-pre-rewrite: false
2018-10-10 16:05:00 -07:00
Peter Klausler aec96aeaf1 [flang] Merge pull request flang-compiler/f18#209 from flang-compiler/pmk2
Undef HUGE for issue#202, remove some obsolete casts, clean up a little

Original-commit: flang-compiler/f18@498df684cf
Reviewed-on: https://github.com/flang-compiler/f18/pull/209
2018-10-10 16:03:36 -07:00
peter klausler 884d9057d0 [flang] Prep for review
Original-commit: flang-compiler/f18@a9439ee83c
Reviewed-on: https://github.com/flang-compiler/f18/pull/209
2018-10-10 15:27:17 -07:00
peter klausler fa671ab542 [flang] Remove some obsolete casts now that Integer has a better constructor
Original-commit: flang-compiler/f18@f9a4a8bdda
Reviewed-on: https://github.com/flang-compiler/f18/pull/209
Tree-same-pre-rewrite: false
2018-10-10 15:01:12 -07:00
peter klausler a10f6000b0 [flang] Fix issue#202 by avoiding clang+BSD/Darwin header bug
Original-commit: flang-compiler/f18@1bdefe528a
Reviewed-on: https://github.com/flang-compiler/f18/pull/209
Tree-same-pre-rewrite: false
2018-10-10 15:01:10 -07:00
Peter Klausler 36b8c86de9 [flang] Merge pull request flang-compiler/f18#208 from flang-compiler/pmk1
Removed obsolete comments and conversions

Original-commit: flang-compiler/f18@4bd13039b3
Reviewed-on: https://github.com/flang-compiler/f18/pull/208
2018-10-10 14:59:06 -07:00
Paul Henning 3712060d2e [flang] Removed obsolete comments and conversions
The addition of a more robust Integer constructor for POD types has
made some comments and static_cast expressions obsolete.

Original-commit: flang-compiler/f18@847b8a7684
Reviewed-on: https://github.com/flang-compiler/f18/pull/208
2018-10-10 14:43:21 -07:00
Peter Klausler 7daeaede56 [flang] Merge pull request flang-compiler/f18#206 from flang-compiler/pmk1
Make conversions between C++ integral types and Integer fully generic.

Original-commit: flang-compiler/f18@6b7b477bbe
Reviewed-on: https://github.com/flang-compiler/f18/pull/206
2018-10-10 14:07:56 -07:00
peter klausler 4bdb76af0b [flang] Make conversions between C++ integral types and Integer fully generic.
Original-commit: flang-compiler/f18@bf753a183d
Reviewed-on: https://github.com/flang-compiler/f18/pull/206
2018-10-10 13:21:46 -07:00
Tim Keith cfff2b18b1 [flang] Merge pull request flang-compiler/f18#205 from flang-compiler/tsk8
Use fundamental types in overloadings of Unparse.

Original-commit: flang-compiler/f18@bd7a03a690
Reviewed-on: https://github.com/flang-compiler/f18/pull/205
2018-10-10 11:47:28 -07:00
Tim Keith 03435d981d [flang] Use fundamental types in overloadings of Unparse.
Different systems map std::size_t, string::size_type, etc. to different
fundamental types. To ensure they are all covered, make the overloadings
of Unparse for integer types use only fundamental types.

This fixes compilations problems on Darwin and *BSD systems.

Original-commit: flang-compiler/f18@5576ed49a2
Reviewed-on: https://github.com/flang-compiler/f18/pull/205
2018-10-10 07:24:27 -07:00
Eric Schweitz 56508e973c [flang] Merge pull request flang-compiler/f18#203 from flang-compiler/eas7
do a little polishing on the DO loop canonicalization code

Original-commit: flang-compiler/f18@93e6887053
Reviewed-on: https://github.com/flang-compiler/f18/pull/203
2018-10-08 11:23:19 -07:00
Eric Schweitz ee7b4dafde [flang] Build the label stack locally and thread the iterators explicitly rather
than as implied state within the Mutator object.

Original-commit: flang-compiler/f18@ae2adeab34
Reviewed-on: https://github.com/flang-compiler/f18/pull/203
2018-10-05 13:59:43 -07:00
Eric Schweitz 98ed7d037b [flang] Use move semantics directly to move the LoopControl object.
Original-commit: flang-compiler/f18@7d646b42bb
Reviewed-on: https://github.com/flang-compiler/f18/pull/203
Tree-same-pre-rewrite: false
2018-10-05 11:10:47 -07:00
Peter Klausler 325bd62ec7 [flang] Merge pull request flang-compiler/f18#200 from flang-compiler/pmk3
Add a test, a flag, a fix, and a parse tree visitor tweak.

Original-commit: flang-compiler/f18@5344ef9272
Reviewed-on: https://github.com/flang-compiler/f18/pull/200
2018-10-04 15:49:47 -07:00
peter klausler b64a39e1ea [flang] Prep for review
Original-commit: flang-compiler/f18@e86eae005e
Reviewed-on: https://github.com/flang-compiler/f18/pull/200
2018-10-04 13:55:51 -07:00
peter klausler 7e87d5a297 [flang] Parse nonlabel DO within label DO better; add -fdebug-semantics; more testing
Original-commit: flang-compiler/f18@2825a45956
Reviewed-on: https://github.com/flang-compiler/f18/pull/200
Tree-same-pre-rewrite: false
2018-10-04 13:54:07 -07:00
peter klausler 4d6885346e [flang] rework non-block DO loop canonicalization
Original-commit: flang-compiler/f18@50574936f2
Reviewed-on: https://github.com/flang-compiler/f18/pull/200
Tree-same-pre-rewrite: false
2018-10-04 13:52:42 -07:00
peter klausler 2df6a9638b [flang] add test for canonicalization of DOs
Original-commit: flang-compiler/f18@aa40c6c7ae
Reviewed-on: https://github.com/flang-compiler/f18/pull/200
Tree-same-pre-rewrite: false
2018-10-04 13:50:54 -07:00
Eric Schweitz cafc70f4f0 [flang] Merge pull request flang-compiler/f18#201 from flang-compiler/eas8
Fix recursion bug so canondo04.f90 test passes.

Original-commit: flang-compiler/f18@d021c00f94
Reviewed-on: https://github.com/flang-compiler/f18/pull/201
2018-10-04 13:25:28 -07:00
Eric Schweitz f5286c19b6 [flang] Add static to explicitly denote that some member functions do not access
the object's state; it is explicitly passed instead.

Original-commit: flang-compiler/f18@53df8087f4
Reviewed-on: https://github.com/flang-compiler/f18/pull/201
2018-10-04 09:57:39 -07:00
Eric Schweitz c06e78ae16 [flang] Fix recursion bug so canondo04.f90 test passes.
Original-commit: flang-compiler/f18@49510ff01f
Reviewed-on: https://github.com/flang-compiler/f18/pull/201
Tree-same-pre-rewrite: false
2018-10-04 09:41:29 -07:00
Peter Klausler cfc1f982a8 [flang] Merge pull request flang-compiler/f18#198 from flang-compiler/pmk2
Correct the spelling of LOCAL_INIT clauses on DO CONCURRENT statements.

Original-commit: flang-compiler/f18@760c064194
Reviewed-on: https://github.com/flang-compiler/f18/pull/198
2018-10-02 10:15:54 -07:00
peter klausler c71aecb787 [flang] Correct the spelling of LOCAL_INIT clauses on DO CONCURRENT statements.
Original-commit: flang-compiler/f18@bfc869ad5f
Reviewed-on: https://github.com/flang-compiler/f18/pull/198
2018-10-02 10:03:37 -07:00
Eric Schweitz ded0a3b715 [flang] Merge pull request flang-compiler/f18#199 from flang-compiler/eas8
Review comments

Original-commit: flang-compiler/f18@ab700cf73e
Reviewed-on: https://github.com/flang-compiler/f18/pull/199
2018-10-02 09:52:11 -07:00
Eric Schweitz c105c9432a [flang] Review comments
Original-commit: flang-compiler/f18@fa5daf35ba
Reviewed-on: https://github.com/flang-compiler/f18/pull/199
2018-10-02 09:29:53 -07:00
Peter Klausler 8dfb172b1a [flang] Merge pull request flang-compiler/f18#197 from flang-compiler/pmk1
Resolve g++ 7.2 build problem

Original-commit: flang-compiler/f18@2a4e1d86bc
Reviewed-on: https://github.com/flang-compiler/f18/pull/197
2018-10-02 09:38:12 -07:00
peter klausler 7b141b62df [flang] Resolve g++ 7.2 build problem
Original-commit: flang-compiler/f18@09859b2e9c
Reviewed-on: https://github.com/flang-compiler/f18/pull/197
2018-10-01 14:36:31 -07:00
Eric Schweitz 96bf625cad [flang] Merge pull request flang-compiler/f18#193 from flang-compiler/eas8
canonicalization of DO constructs

Original-commit: flang-compiler/f18@9842890ed4
Reviewed-on: https://github.com/flang-compiler/f18/pull/193
2018-10-01 09:28:49 -07:00
Eric Schweitz 1c2dc51cc0 [flang] Handle review comments
Original-commit: flang-compiler/f18@9789d4d21b
Reviewed-on: https://github.com/flang-compiler/f18/pull/193
2018-09-21 11:12:02 -07:00
Eric Schweitz d14c38fbe7 [flang] Rename two member functions
Original-commit: flang-compiler/f18@c953185c9f
Reviewed-on: https://github.com/flang-compiler/f18/pull/193
Tree-same-pre-rewrite: false
2018-09-21 10:51:06 -07:00
Eric Schweitz 8b45686de6 [flang] Fix the double end do condition. Translate a labelled end do into a
continue and preserve the label for control flow.

Original-commit: flang-compiler/f18@bd611b9809
Reviewed-on: https://github.com/flang-compiler/f18/pull/193
Tree-same-pre-rewrite: false
2018-09-21 08:22:41 -07:00
Eric Schweitz 4972485598 [flang] canonicalize DO constructs
Fix a bug with BLOCK DATA name matching
Add tests and finish up DO loop canonicalization

Original-commit: flang-compiler/f18@2d93b2819c
Reviewed-on: https://github.com/flang-compiler/f18/pull/193
Tree-same-pre-rewrite: false
2018-09-20 16:14:58 -07:00
Peter Klausler 507ba5c3a1 [flang] Merge pull request flang-compiler/f18#195 from flang-compiler/pmk0
Categorize Fortran intrinsic procedures (and some more work on expressions)

Original-commit: flang-compiler/f18@032be90fb0
Reviewed-on: https://github.com/flang-compiler/f18/pull/195
2018-09-26 12:59:12 -07:00
peter klausler 42d17f21eb [flang] More documentation
Original-commit: flang-compiler/f18@7fd40e8598
Reviewed-on: https://github.com/flang-compiler/f18/pull/195
2018-09-26 12:58:43 -07:00
peter klausler bab1f67b5f [flang] Improve documentation per review comments.
Original-commit: flang-compiler/f18@5a8bbbe511
Reviewed-on: https://github.com/flang-compiler/f18/pull/195
Tree-same-pre-rewrite: false
2018-09-26 10:42:55 -07:00
peter klausler 370c44ad76 [flang] tweaks to intrinsics.md
Original-commit: flang-compiler/f18@ad44f28825
Reviewed-on: https://github.com/flang-compiler/f18/pull/195
Tree-same-pre-rewrite: false
2018-09-25 16:59:41 -07:00
peter klausler 970e746c2e [flang] review
Original-commit: flang-compiler/f18@d7bb34ae2b
Reviewed-on: https://github.com/flang-compiler/f18/pull/195
Tree-same-pre-rewrite: false
2018-09-25 15:36:00 -07:00
peter klausler e7c5a470bd [flang] polish documentation of intrinsics
Original-commit: flang-compiler/f18@9f9424c996
Reviewed-on: https://github.com/flang-compiler/f18/pull/195
Tree-same-pre-rewrite: false
2018-09-25 15:24:06 -07:00
peter klausler 9849cf5844 [flang] documentation
Original-commit: flang-compiler/f18@452760d706
Reviewed-on: https://github.com/flang-compiler/f18/pull/195
Tree-same-pre-rewrite: false
2018-09-25 15:24:05 -07:00
peter klausler 3cecff6a05 [flang] checkpoint
Original-commit: flang-compiler/f18@960ae495fd
Reviewed-on: https://github.com/flang-compiler/f18/pull/195
Tree-same-pre-rewrite: false
2018-09-25 15:24:04 -07:00