platform/upstream/llvm.git
5 years ago[flang] unit testing, better error messages
peter klausler [Fri, 12 Oct 2018 23:01:55 +0000 (16:01 -0700)]
[flang] unit testing, better error messages

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

5 years ago[flang] begin unit testing
peter klausler [Fri, 12 Oct 2018 00:01:31 +0000 (17:01 -0700)]
[flang] begin unit testing

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

5 years ago[flang] finish most intrinsic table entries
peter klausler [Thu, 11 Oct 2018 21:51:14 +0000 (14:51 -0700)]
[flang] finish most intrinsic table entries

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

5 years ago[flang] a few more intrinsics and some style guide comments
peter klausler [Wed, 10 Oct 2018 23:45:17 +0000 (16:45 -0700)]
[flang] a few more intrinsics and some style guide comments

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

5 years ago[flang] more intrinsics
peter klausler [Wed, 10 Oct 2018 17:48:12 +0000 (10:48 -0700)]
[flang] more intrinsics

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

5 years ago[flang] remove arg->intValue field
peter klausler [Tue, 9 Oct 2018 19:07:29 +0000 (12:07 -0700)]
[flang] remove arg->intValue field

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

5 years ago[flang] debug initial intrinsic table probes
peter klausler [Mon, 8 Oct 2018 22:35:19 +0000 (15:35 -0700)]
[flang] debug initial intrinsic table probes

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

5 years ago[flang] error messages
peter klausler [Fri, 5 Oct 2018 18:32:54 +0000 (11:32 -0700)]
[flang] error messages

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

5 years ago[flang] checkpoint
peter klausler [Fri, 5 Oct 2018 16:57:53 +0000 (09:57 -0700)]
[flang] checkpoint

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

5 years ago[flang] intrinsic pattern matching
peter klausler [Thu, 4 Oct 2018 20:43:33 +0000 (13:43 -0700)]
[flang] intrinsic pattern matching

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

5 years ago[flang] buildable checkpoint before merging with master
peter klausler [Mon, 1 Oct 2018 18:27:45 +0000 (11:27 -0700)]
[flang] buildable checkpoint before merging with master

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

5 years ago[flang] initial intrinsics table
peter klausler [Sat, 29 Sep 2018 00:02:11 +0000 (17:02 -0700)]
[flang] initial intrinsics table

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

5 years ago[flang] Merge pull request flang-compiler/f18#210 from flang-compiler/tsk2
Tim Keith [Fri, 12 Oct 2018 14:06:18 +0000 (07:06 -0700)]
[flang] Merge pull request flang-compiler/f18#210 from flang-compiler/tsk2

More name resolution

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

5 years ago[flang] More miscellaneous name resolution
Tim Keith [Wed, 10 Oct 2018 23:20:46 +0000 (16:20 -0700)]
[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@9a41bf37fd1f5ac3f1ec10f9e4f8945cb5ded1f5
Reviewed-on: https://github.com/flang-compiler/f18/pull/210

5 years ago[flang] Check conflicting construct names
Tim Keith [Tue, 25 Sep 2018 15:53:53 +0000 (08:53 -0700)]
[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@0ad79ff029f6f3001778e2fd6f00153906effec8
Reviewed-on: https://github.com/flang-compiler/f18/pull/210
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#209 from flang-compiler/pmk2
Peter Klausler [Wed, 10 Oct 2018 23:03:36 +0000 (16:03 -0700)]
[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@498df684cf9e166cc636e8cea758854b55f13941
Reviewed-on: https://github.com/flang-compiler/f18/pull/209

5 years ago[flang] Prep for review
peter klausler [Wed, 10 Oct 2018 22:27:17 +0000 (15:27 -0700)]
[flang] Prep for review

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

5 years ago[flang] Remove some obsolete casts now that Integer has a better constructor
peter klausler [Wed, 10 Oct 2018 21:40:32 +0000 (14:40 -0700)]
[flang] Remove some obsolete casts now that Integer has a better constructor

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

5 years ago[flang] Fix issue#202 by avoiding clang+BSD/Darwin header bug
peter klausler [Wed, 10 Oct 2018 21:29:35 +0000 (14:29 -0700)]
[flang] Fix issue#202 by avoiding clang+BSD/Darwin header bug

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

5 years ago[flang] Merge pull request flang-compiler/f18#208 from flang-compiler/pmk1
Peter Klausler [Wed, 10 Oct 2018 21:59:06 +0000 (14:59 -0700)]
[flang] Merge pull request flang-compiler/f18#208 from flang-compiler/pmk1

Removed obsolete comments and conversions

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

5 years ago[flang] Removed obsolete comments and conversions
Paul Henning [Wed, 10 Oct 2018 20:54:25 +0000 (14:54 -0600)]
[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@847b8a768417bb3ccfa5dd919364ac39880bbb5e
Reviewed-on: https://github.com/flang-compiler/f18/pull/208

5 years ago[flang] Merge pull request flang-compiler/f18#206 from flang-compiler/pmk1
Peter Klausler [Wed, 10 Oct 2018 21:07:56 +0000 (14:07 -0700)]
[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@6b7b477bbe50c32f4fb9ac642a0c8eb095aa4cd9
Reviewed-on: https://github.com/flang-compiler/f18/pull/206

5 years ago[flang] Make conversions between C++ integral types and Integer fully generic.
peter klausler [Wed, 10 Oct 2018 20:06:01 +0000 (13:06 -0700)]
[flang] Make conversions between C++ integral types and Integer fully generic.

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

5 years ago[flang] Merge pull request flang-compiler/f18#205 from flang-compiler/tsk8
Tim Keith [Wed, 10 Oct 2018 18:47:28 +0000 (11:47 -0700)]
[flang] Merge pull request flang-compiler/f18#205 from flang-compiler/tsk8

Use fundamental types in overloadings of Unparse.

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

5 years ago[flang] Use fundamental types in overloadings of Unparse.
Tim Keith [Wed, 10 Oct 2018 14:24:27 +0000 (07:24 -0700)]
[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@5576ed49a2ebe4bfae4a53772a6e0a0d98c18fa0
Reviewed-on: https://github.com/flang-compiler/f18/pull/205

5 years ago[flang] Merge pull request flang-compiler/f18#203 from flang-compiler/eas7
Eric Schweitz [Mon, 8 Oct 2018 18:23:19 +0000 (11:23 -0700)]
[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@93e68870530184fc0d7c0ce0584b956b0fbf373e
Reviewed-on: https://github.com/flang-compiler/f18/pull/203

5 years ago[flang] Build the label stack locally and thread the iterators explicitly rather
Eric Schweitz [Fri, 5 Oct 2018 20:59:43 +0000 (13:59 -0700)]
[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@ae2adeab345653d873a5f44b8fa2b2a4f3bd5d1b
Reviewed-on: https://github.com/flang-compiler/f18/pull/203

5 years ago[flang] Use move semantics directly to move the LoopControl object.
Eric Schweitz [Fri, 5 Oct 2018 18:10:47 +0000 (11:10 -0700)]
[flang] Use move semantics directly to move the LoopControl object.

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

5 years ago[flang] Merge pull request flang-compiler/f18#200 from flang-compiler/pmk3
Peter Klausler [Thu, 4 Oct 2018 22:49:47 +0000 (15:49 -0700)]
[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@5344ef9272f2f46702e96409c8d697b927542e20
Reviewed-on: https://github.com/flang-compiler/f18/pull/200

5 years ago[flang] Prep for review
peter klausler [Wed, 3 Oct 2018 17:31:37 +0000 (10:31 -0700)]
[flang] Prep for review

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

5 years ago[flang] Parse nonlabel DO within label DO better; add -fdebug-semantics; more testing
peter klausler [Tue, 2 Oct 2018 23:42:15 +0000 (16:42 -0700)]
[flang] Parse nonlabel DO within label DO better; add -fdebug-semantics; more testing

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

5 years ago[flang] rework non-block DO loop canonicalization
peter klausler [Tue, 2 Oct 2018 21:19:51 +0000 (14:19 -0700)]
[flang] rework non-block DO loop canonicalization

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

5 years ago[flang] add test for canonicalization of DOs
peter klausler [Tue, 2 Oct 2018 16:39:25 +0000 (09:39 -0700)]
[flang] add test for canonicalization of DOs

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

5 years ago[flang] Merge pull request flang-compiler/f18#201 from flang-compiler/eas8
Eric Schweitz [Thu, 4 Oct 2018 20:25:28 +0000 (13:25 -0700)]
[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@d021c00f9452ce91149339215afce6bf60029145
Reviewed-on: https://github.com/flang-compiler/f18/pull/201

5 years ago[flang] Add static to explicitly denote that some member functions do not access
Eric Schweitz [Thu, 4 Oct 2018 16:57:39 +0000 (09:57 -0700)]
[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@53df8087f456bf6d1cdee9ab4009ae8d77498831
Reviewed-on: https://github.com/flang-compiler/f18/pull/201

5 years ago[flang] Fix recursion bug so canondo04.f90 test passes.
Eric Schweitz [Thu, 4 Oct 2018 16:25:58 +0000 (09:25 -0700)]
[flang] Fix recursion bug so canondo04.f90 test passes.

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

5 years ago[flang] Merge pull request flang-compiler/f18#198 from flang-compiler/pmk2
Peter Klausler [Tue, 2 Oct 2018 17:15:54 +0000 (10:15 -0700)]
[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@760c0641949a06fc351904bdf89f3668f3647c2d
Reviewed-on: https://github.com/flang-compiler/f18/pull/198

5 years ago[flang] Correct the spelling of LOCAL_INIT clauses on DO CONCURRENT statements.
peter klausler [Mon, 1 Oct 2018 22:00:09 +0000 (15:00 -0700)]
[flang] Correct the spelling of LOCAL_INIT clauses on DO CONCURRENT statements.

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

5 years ago[flang] Merge pull request flang-compiler/f18#199 from flang-compiler/eas8
Eric Schweitz [Tue, 2 Oct 2018 16:52:11 +0000 (09:52 -0700)]
[flang] Merge pull request flang-compiler/f18#199 from flang-compiler/eas8

Review comments

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

5 years ago[flang] Review comments
Eric Schweitz [Tue, 2 Oct 2018 16:29:53 +0000 (09:29 -0700)]
[flang] Review comments

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

5 years ago[flang] Merge pull request flang-compiler/f18#197 from flang-compiler/pmk1
Peter Klausler [Tue, 2 Oct 2018 16:38:12 +0000 (09:38 -0700)]
[flang] Merge pull request flang-compiler/f18#197 from flang-compiler/pmk1

Resolve g++ 7.2 build problem

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

5 years ago[flang] Resolve g++ 7.2 build problem
peter klausler [Mon, 1 Oct 2018 21:36:31 +0000 (14:36 -0700)]
[flang] Resolve g++ 7.2 build problem

Original-commit: flang-compiler/f18@09859b2e9c53195c877b89a288ea8aac43cb1804
Reviewed-on: https://github.com/flang-compiler/f18/pull/197

5 years ago[flang] Merge pull request flang-compiler/f18#193 from flang-compiler/eas8
Eric Schweitz [Mon, 1 Oct 2018 16:28:49 +0000 (09:28 -0700)]
[flang] Merge pull request flang-compiler/f18#193 from flang-compiler/eas8

canonicalization of DO constructs

Original-commit: flang-compiler/f18@9842890ed4e712f8292e995d22841526ce92d2d4
Reviewed-on: https://github.com/flang-compiler/f18/pull/193

5 years ago[flang] Handle review comments
Eric Schweitz [Fri, 21 Sep 2018 18:12:02 +0000 (11:12 -0700)]
[flang] Handle review comments

Original-commit: flang-compiler/f18@9789d4d21ba1fa0ab60d8d50fcfd831ff596b317
Reviewed-on: https://github.com/flang-compiler/f18/pull/193

5 years ago[flang] Rename two member functions
Eric Schweitz [Fri, 21 Sep 2018 17:51:06 +0000 (10:51 -0700)]
[flang] Rename two member functions

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

5 years ago[flang] Fix the double end do condition. Translate a labelled end do into a
Eric Schweitz [Fri, 21 Sep 2018 15:22:41 +0000 (08:22 -0700)]
[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@bd611b9809be2dfd70ed310b3a13da7fc45c1742
Reviewed-on: https://github.com/flang-compiler/f18/pull/193
Tree-same-pre-rewrite: false

5 years ago[flang] canonicalize DO constructs
Eric Schweitz [Wed, 19 Sep 2018 21:26:02 +0000 (14:26 -0700)]
[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@2d93b2819cbfd436c1f4081c2c7480e6711e3b38
Reviewed-on: https://github.com/flang-compiler/f18/pull/193
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#195 from flang-compiler/pmk0
Peter Klausler [Wed, 26 Sep 2018 19:59:12 +0000 (12:59 -0700)]
[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@032be90fb0bcb1432cd9dba46f42744fcb3ddd8f
Reviewed-on: https://github.com/flang-compiler/f18/pull/195

5 years ago[flang] More documentation
peter klausler [Wed, 26 Sep 2018 19:58:43 +0000 (12:58 -0700)]
[flang] More documentation

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

5 years ago[flang] Improve documentation per review comments.
peter klausler [Wed, 26 Sep 2018 17:42:55 +0000 (10:42 -0700)]
[flang] Improve documentation per review comments.

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

5 years ago[flang] tweaks to intrinsics.md
peter klausler [Tue, 25 Sep 2018 23:59:41 +0000 (16:59 -0700)]
[flang] tweaks to intrinsics.md

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

5 years ago[flang] review
peter klausler [Tue, 25 Sep 2018 22:36:00 +0000 (15:36 -0700)]
[flang] review

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

5 years ago[flang] polish documentation of intrinsics
peter klausler [Tue, 25 Sep 2018 22:23:01 +0000 (15:23 -0700)]
[flang] polish documentation of intrinsics

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

5 years ago[flang] documentation
peter klausler [Tue, 25 Sep 2018 21:47:55 +0000 (14:47 -0700)]
[flang] documentation

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

5 years ago[flang] checkpoint
peter klausler [Tue, 25 Sep 2018 20:26:35 +0000 (13:26 -0700)]
[flang] checkpoint

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

5 years ago[flang] typed function references
peter klausler [Thu, 20 Sep 2018 19:34:29 +0000 (12:34 -0700)]
[flang] typed function references

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

5 years ago[flang] substrings and better rank checks
peter klausler [Wed, 19 Sep 2018 21:27:13 +0000 (14:27 -0700)]
[flang] substrings and better rank checks

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

5 years ago[flang] check C1002
peter klausler [Tue, 18 Sep 2018 18:59:25 +0000 (11:59 -0700)]
[flang] check C1002

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

5 years ago[flang] Use dynamic default REAL kind for conversions that were static
peter klausler [Tue, 18 Sep 2018 18:29:01 +0000 (11:29 -0700)]
[flang] Use dynamic default REAL kind for conversions that were static

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

5 years ago[flang] source provenances for expressions
peter klausler [Tue, 18 Sep 2018 16:34:59 +0000 (09:34 -0700)]
[flang] source provenances for expressions

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

5 years ago[flang] some clean-up
peter klausler [Mon, 17 Sep 2018 18:31:38 +0000 (11:31 -0700)]
[flang] some clean-up

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

5 years ago[flang] Changes that might fix MSVC build problems from sjs
peter klausler [Mon, 17 Sep 2018 17:07:25 +0000 (10:07 -0700)]
[flang] Changes that might fix MSVC build problems from sjs

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

5 years ago[flang] subscripts
peter klausler [Sat, 15 Sep 2018 00:01:55 +0000 (17:01 -0700)]
[flang] subscripts

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

5 years ago[flang] work on structure components
peter klausler [Fri, 14 Sep 2018 22:48:40 +0000 (15:48 -0700)]
[flang] work on structure components

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

5 years ago[flang] Merge pull request flang-compiler/f18#194 from flang-compiler/tsk2
Tim Keith [Mon, 24 Sep 2018 18:47:26 +0000 (11:47 -0700)]
[flang] Merge pull request flang-compiler/f18#194 from flang-compiler/tsk2

Fix issues flang-compiler/f18#188 and flang-compiler/f18#191.

Original-commit: flang-compiler/f18@5615949d28308ded5dea2aa62cd6013cad7e2ed8
Reviewed-on: https://github.com/flang-compiler/f18/pull/194

5 years ago[flang] Simplify handling of ProcDecl
Tim Keith [Mon, 24 Sep 2018 18:43:48 +0000 (11:43 -0700)]
[flang] Simplify handling of ProcDecl

DeclareProcEntity takes care of setting the Function or Subroutine flag
on the procedure entity, so it is not necessary in this function.

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

5 years ago[flang] Recognize complex-part-designator
Tim Keith [Mon, 24 Sep 2018 14:12:38 +0000 (07:12 -0700)]
[flang] Recognize complex-part-designator

The "%RE" or "%IM" is parsed as a structure-component.
If the base has type COMPLEX and the component name is one
of those, allow it without comment.

Note that the `parser::Name` for these components don't get
symbols filled in, so we still get a warning that they are
unresolved. We have to figure out how to deal with names
like this that we won't have symbols for.

Fixes flang-compiler/f18#188.

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

5 years ago[flang] Fix problems determining object/function/subroutine
Tim Keith [Sat, 22 Sep 2018 15:05:46 +0000 (08:05 -0700)]
[flang] Fix problems determining object/function/subroutine

Convert each Entity to ObjectEntity at the end of each scope.
Add `ConvertToObjectEntity()` to achieve this, similar to
`ConvertToProcEntity()`. Move them both up into `ScopeHandler`
because they need to be called from `PopScope()`.

In a proc-decl, only mark the proc as a function if it has a return type.
If no return type is declared, function vs. subroutine is determined by:
- for a module it is a subroutine (at end of specification-part)
- otherwise it is by usage

If an entity that could otherwise be a function is used as the base of a
structure component, that forces it to be an object. Because we have to
change it to an object entity at that point, the `base` in `FindComponent()`
can't be const, and that propagates to all of its callers.

Remove the name argument to `ApplyImplicitRules` as it is unneeded.

Fixes flang-compiler/f18#191.

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

5 years ago[flang] Merge pull request flang-compiler/f18#192 from flang-compiler/tsk2
Tim Keith [Fri, 21 Sep 2018 18:37:02 +0000 (11:37 -0700)]
[flang] Merge pull request flang-compiler/f18#192 from flang-compiler/tsk2

Fix problems with extended derived types

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

5 years ago[flang] Fix typo
Tim Keith [Thu, 20 Sep 2018 21:21:04 +0000 (14:21 -0700)]
[flang] Fix typo

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

5 years ago[flang] Fix problems with extended derived types
Tim Keith [Thu, 20 Sep 2018 21:08:59 +0000 (14:08 -0700)]
[flang] Fix problems with extended derived types

When looking for a component name in a derived type, also look in the
parent type. Before adding a component to a derived type, report an
error if it already has one with that name. Check that components are
accessible when they are accessed.

Add the "parent component" to derived types (i.e. a component with the
same name as the parent type). The symbol is marked with the
`ParentComp` flag so we can avoid writing it to `.mod` files.

Add calls to `add_occurrence()` so that those particular instances of
`parser::Name` get their symbol set.

Change `DeclareObjectEntity` and `DeclareProcEntity` to use `SourceName` as
the name passed in rather than `parser::Name`.

Fix some problems in `unparse-with-symbols.cc` on statements that both
define and reference names.

Fixes flang-compiler/f18#187.

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

5 years ago[flang] Merge pull request flang-compiler/f18#189 from flang-compiler/eas8
Eric Schweitz [Wed, 19 Sep 2018 22:07:36 +0000 (15:07 -0700)]
[flang] Merge pull request flang-compiler/f18#189 from flang-compiler/eas8

Fix a bug with BLOCK DATA name matching

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

5 years ago[flang] Fix a bug with BLOCK DATA name matching
Eric Schweitz [Wed, 19 Sep 2018 22:00:33 +0000 (15:00 -0700)]
[flang] Fix a bug with BLOCK DATA name matching

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

5 years ago[flang] Merge pull request flang-compiler/f18#186 from flang-compiler/tsk2
Tim Keith [Mon, 17 Sep 2018 18:15:28 +0000 (11:15 -0700)]
[flang] Merge pull request flang-compiler/f18#186 from flang-compiler/tsk2

Add top-level Semantics class

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

5 years ago[flang] Change how messages_ is handled in ResolveNameVisitor
Tim Keith [Mon, 17 Sep 2018 03:34:20 +0000 (20:34 -0700)]
[flang] Change how messages_ is handled in ResolveNameVisitor

Change messages_ back to a reference. At the end, move them out to Annex
to the main messages object. This eliminates the need for set_messages
and ensures that messages_ is properly initialized.

Original-commit: flang-compiler/f18@78bd74501ed9f76de14175452b39374a8fbf66a5
Reviewed-on: https://github.com/flang-compiler/f18/pull/186

5 years ago[flang] Add explicit '= default' for move constructor.
Tim Keith [Sat, 15 Sep 2018 22:05:59 +0000 (15:05 -0700)]
[flang] Add explicit '= default' for move constructor.

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

5 years ago[flang] Initialize directories_ directly rather than with setter.
Tim Keith [Fri, 14 Sep 2018 23:21:37 +0000 (16:21 -0700)]
[flang] Initialize directories_ directly rather than with setter.

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

5 years ago[flang] Add top-level Semantics class
Tim Keith [Fri, 14 Sep 2018 22:04:50 +0000 (15:04 -0700)]
[flang] Add top-level Semantics class

Refactor to create the Semantics class that is responsible for holding
state during semantics (the scope tree and messages) and managing the
logic of the various phases of semantic processing. Eliminate static
Scope::globalScope.

The messages generated during semantic processing are accumulated in a
Messages data member of Semantics so that individual phases don't need
to emit them to std::cerr. This is now done by the driver so that it has
control over where they go and eliminates other includes of iostream.
To do this, the messages object is passed in to the various semantics
operations.

Move DumpSymbols into semantics.cc: it doesn't belong in resolve-names.cc
and it depends on the global scope, so it's as good a place as any.
The call to RewriteParseTree is also moved to Semantics.

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

5 years ago[flang] Merge pull request flang-compiler/f18#184 from flang-compiler/eas5
Eric Schweitz [Thu, 13 Sep 2018 22:46:17 +0000 (15:46 -0700)]
[flang] Merge pull request flang-compiler/f18#184 from flang-compiler/eas5

Add semantics checking for END xxx statements.

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

5 years ago[flang] Convert some of the functions to longer names.
Eric Schweitz [Thu, 13 Sep 2018 22:44:33 +0000 (15:44 -0700)]
[flang] Convert some of the functions to longer names.

Original-commit: flang-compiler/f18@6cb59e916c26138e3e95b4edef7cfeadb40eae07
Reviewed-on: https://github.com/flang-compiler/f18/pull/184

5 years ago[flang] Remove incorrect error message
Eric Schweitz [Thu, 13 Sep 2018 22:34:34 +0000 (15:34 -0700)]
[flang] Remove incorrect error message

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

5 years ago[flang] Add semantics checking for END xxx statements.
Eric Schweitz [Thu, 13 Sep 2018 21:50:38 +0000 (14:50 -0700)]
[flang] Add semantics checking for END xxx statements.
Add a negative test for END xxx names.
Reverse the sequence of calls such that resolve-label is before
resolve-name.

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

5 years ago[flang] Merge pull request flang-compiler/f18#183 from flang-compiler/pmk0
Peter Klausler [Thu, 13 Sep 2018 18:30:07 +0000 (11:30 -0700)]
[flang] Merge pull request flang-compiler/f18#183 from flang-compiler/pmk0

Semantic analysis of expressions (work in progress)

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

5 years ago[flang] Resolve recent NAG failures better, more clean-up, ready for merge.
peter klausler [Thu, 13 Sep 2018 18:29:10 +0000 (11:29 -0700)]
[flang] Resolve recent NAG failures better, more clean-up, ready for merge.

Original-commit: flang-compiler/f18@5bc5a317f4c67c2525b0c9cd08b45ee3bd6dafc0
Reviewed-on: https://github.com/flang-compiler/f18/pull/183

5 years ago[flang] Fix recent regression on NAG tests found during pre-merge testing
peter klausler [Thu, 13 Sep 2018 17:29:44 +0000 (10:29 -0700)]
[flang] Fix recent regression on NAG tests found during pre-merge testing

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

5 years ago[flang] Repair CMakeLists.txt after accidentally clang-formatting it
peter klausler [Wed, 12 Sep 2018 23:37:28 +0000 (16:37 -0700)]
[flang] Repair CMakeLists.txt after accidentally clang-formatting it

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

5 years ago[flang] Add "explicit" to constructors, define Type<TypeCategory::Derived>
peter klausler [Wed, 12 Sep 2018 23:27:51 +0000 (16:27 -0700)]
[flang] Add "explicit" to constructors, define Type<TypeCategory::Derived>

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

5 years ago[flang] Merge with current master, address early review comments.
peter klausler [Wed, 12 Sep 2018 20:53:14 +0000 (13:53 -0700)]
[flang] Merge with current master, address early review comments.

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

5 years ago[flang] remove unused code
peter klausler [Wed, 12 Sep 2018 18:50:25 +0000 (11:50 -0700)]
[flang] remove unused code

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

5 years ago[flang] clean up for review
peter klausler [Wed, 12 Sep 2018 18:20:30 +0000 (11:20 -0700)]
[flang] clean up for review

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

5 years ago[flang] array references
peter klausler [Wed, 12 Sep 2018 00:06:44 +0000 (17:06 -0700)]
[flang] array references

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

5 years ago[flang] automate analysis of expression parse tree types that are wrappers/unions
peter klausler [Tue, 11 Sep 2018 18:13:40 +0000 (11:13 -0700)]
[flang] automate analysis of expression parse tree types that are wrappers/unions

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

5 years ago[flang] cleaning up TODOs
peter klausler [Fri, 7 Sep 2018 23:54:33 +0000 (16:54 -0700)]
[flang] cleaning up TODOs

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

5 years ago[flang] LOGICAL operations
peter klausler [Fri, 7 Sep 2018 22:25:10 +0000 (15:25 -0700)]
[flang] LOGICAL operations

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

5 years ago[flang] add left(), right(), and comments
peter klausler [Fri, 7 Sep 2018 17:33:32 +0000 (10:33 -0700)]
[flang] add left(), right(), and comments

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

5 years ago[flang] mixed Complex; removed BOZConstant in favor of converting in place
peter klausler [Thu, 6 Sep 2018 00:12:03 +0000 (17:12 -0700)]
[flang] mixed Complex; removed BOZConstant in favor of converting in place

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

5 years ago[flang] mixed z+i, z+r expressions
peter klausler [Tue, 4 Sep 2018 23:42:32 +0000 (16:42 -0700)]
[flang] mixed z+i, z+r expressions

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

5 years ago[flang] Finish typeless casting
peter klausler [Tue, 4 Sep 2018 21:20:48 +0000 (14:20 -0700)]
[flang] Finish typeless casting

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

5 years ago[flang] more operators
peter klausler [Fri, 31 Aug 2018 23:14:14 +0000 (16:14 -0700)]
[flang] more operators

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

5 years ago[flang] restructure work in progress in semantics/expression.cc; checkpoint before...
peter klausler [Fri, 31 Aug 2018 20:28:21 +0000 (13:28 -0700)]
[flang] restructure work in progress in semantics/expression.cc; checkpoint before finishing operators

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