platform/upstream/llvm.git
6 years ago[flang] Merge pull request flang-compiler/f18#92 from ThePortlandGroup/pmk-runtime
Peter Klausler [Thu, 17 May 2018 18:41:12 +0000 (11:41 -0700)]
[flang] Merge pull request flang-compiler/f18#92 from ThePortlandGroup/pmk-runtime

Document and initiate development of run time descriptors.

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

6 years ago[flang] More descriptor work.
peter klausler [Thu, 17 May 2018 18:32:23 +0000 (11:32 -0700)]
[flang] More descriptor work.

Original-commit: flang-compiler/f18@269cb528764d7d8925ef499be2c906a71f0d0d52
Reviewed-on: https://github.com/flang-compiler/f18/pull/92

6 years ago[flang] Refine type bound define assignment.
peter klausler [Wed, 16 May 2018 23:57:43 +0000 (16:57 -0700)]
[flang] Refine type bound define assignment.

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

6 years ago[flang] Separate generic from specialized parts of derived types and their components.
peter klausler [Wed, 16 May 2018 23:17:09 +0000 (16:17 -0700)]
[flang] Separate generic from specialized parts of derived types and their components.

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

6 years ago[flang] rearrange some TODO comments
peter klausler [Wed, 16 May 2018 21:25:45 +0000 (14:25 -0700)]
[flang] rearrange some TODO comments

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

6 years ago[flang] more review comments
peter klausler [Wed, 16 May 2018 20:55:43 +0000 (13:55 -0700)]
[flang] more review comments

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

6 years ago[flang] more thinking about requirements for defined assignment &c.
peter klausler [Wed, 16 May 2018 20:50:04 +0000 (13:50 -0700)]
[flang] more thinking about requirements for defined assignment &c.

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

6 years ago[flang] review comments
peter klausler [Wed, 16 May 2018 20:49:37 +0000 (13:49 -0700)]
[flang] review comments

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

6 years ago[flang] Add a TODO.
peter klausler [Wed, 16 May 2018 18:32:24 +0000 (11:32 -0700)]
[flang] Add a TODO.

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

6 years ago[flang] Fix clang-only build warning, run clang-format.
peter klausler [Wed, 16 May 2018 17:31:35 +0000 (10:31 -0700)]
[flang] Fix clang-only build warning, run clang-format.

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

6 years ago[flang] Document and initiate development of run time descriptors.
peter klausler [Wed, 16 May 2018 17:22:33 +0000 (10:22 -0700)]
[flang] Document and initiate development of run time descriptors.

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

6 years ago[flang] Merge pull request flang-compiler/f18#90 from ThePortlandGroup/pmk5
Peter Klausler [Wed, 16 May 2018 17:09:46 +0000 (10:09 -0700)]
[flang] Merge pull request flang-compiler/f18#90 from ThePortlandGroup/pmk5

Fix issue flang-compiler/f18#89

Original-commit: flang-compiler/f18@119fa65b2cc0ff3bb57dd4a0b17c08b9ddbaffd4
Reviewed-on: https://github.com/flang-compiler/f18/pull/90

6 years ago[flang] clang-format
peter klausler [Wed, 16 May 2018 17:00:14 +0000 (10:00 -0700)]
[flang] clang-format

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

6 years ago[flang] Fine tuning of space recognition.
peter klausler [Wed, 16 May 2018 16:58:56 +0000 (09:58 -0700)]
[flang] Fine tuning of space recognition.

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

6 years ago[flang] Dodge bogus warning about unused anonymous variable in refactored code.
peter klausler [Tue, 15 May 2018 23:40:22 +0000 (16:40 -0700)]
[flang] Dodge bogus warning about unused anonymous variable in refactored code.

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

6 years ago[flang] Fix tokenization of signed-int-literal-constant, allow internal space.
peter klausler [Tue, 15 May 2018 23:37:47 +0000 (16:37 -0700)]
[flang] Fix tokenization of signed-int-literal-constant, allow internal space.

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

6 years ago[flang] Merge pull request flang-compiler/f18#91 from ThePortlandGroup/omppar
hsuauthai [Wed, 16 May 2018 16:53:43 +0000 (09:53 -0700)]
[flang] Merge pull request flang-compiler/f18#91 from ThePortlandGroup/omppar

Add OpenMP parallel directives and private/firstprivate clauses to pa…

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

6 years ago[flang] Modified directive names and clauses to reflect in OpenMP Spec.
Hongyon Suauthai [Wed, 16 May 2018 16:49:35 +0000 (09:49 -0700)]
[flang] Modified directive names and clauses to reflect in OpenMP Spec.

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

6 years ago[flang] Add OpenMP parallel directives and private/firstprivate clauses to parser.
Hongyon Suauthai [Wed, 16 May 2018 14:28:54 +0000 (07:28 -0700)]
[flang] Add OpenMP parallel directives and private/firstprivate clauses to parser.

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

6 years ago[flang] Merge pull request flang-compiler/f18#88 from ThePortlandGroup/tsk3
Tim Keith [Mon, 14 May 2018 21:32:22 +0000 (14:32 -0700)]
[flang] Merge pull request flang-compiler/f18#88 from ThePortlandGroup/tsk3

Name resolution on interface blocks.

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

6 years ago[flang] Refactor: make some methods out-of-line.
Tim Keith [Mon, 14 May 2018 21:26:39 +0000 (14:26 -0700)]
[flang] Refactor: make some methods out-of-line.

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

6 years ago[flang] Support interface blocks.
Tim Keith [Mon, 14 May 2018 20:51:13 +0000 (13:51 -0700)]
[flang] Support interface blocks.

Add subprogram symbols for each interface-body and set isInterface on
them. Create a symbol with GenericDetails for each generic interface
block and add interface specifications to the specific procedures of
the generic. InterfaceVisitor takes care of this.

Before processing the specification part of modules and subprograms,
collect the names of module subprograms and internal subprograms and add
them to the symbol table with SubprogramNameDetails. This allows us to
reference them from interface blocks in the specification part.
SubprogramNameDetails is converted to SubprogramDetails when the real
subprogram is visited.

This is achieved by setting subpNamesOnly_ and then walking the
ModuleSubprogramPart or InternalSubprogramPart. Creating the symbol and
scope for a module or subprogram now happens when the Module,
SubroutineSubprogram, or FunctionSubprogram node is encountered so
this can happen in the right order.

Add BeginSubprogram and EndSubprogram to handle the parts in common
between subprograms and interface specifications.

Add GenericSpec to type.h to represent all possible generic specs.
Only generic names are resolved so far.

Add tests for new error messages. Change resolve02.f90 to reflect the
new errors reported.

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

6 years ago[flang] Separate const and non-const operator* in Indirection
Tim Keith [Fri, 11 May 2018 17:32:00 +0000 (10:32 -0700)]
[flang] Separate const and non-const operator* in Indirection

Without this, Walk(const Indirection<T>...) can call a Walk function
with non-const T.

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

6 years ago[flang] Extract class SubprogramVisitor out of ResolveNamesVisitor.
Tim Keith [Fri, 4 May 2018 22:37:56 +0000 (15:37 -0700)]
[flang] Extract class SubprogramVisitor out of ResolveNamesVisitor.

This is just refactoring. SubprogramVisitor now contains the functionality
related to subprograms, including statement functions. This is preparation
for handling interface blocks.

Also, change MessageHandler to create the Messages object and return it
through an accessor rather than having it created outside and passed in.
This saves us from having to pass it up through the chain of constructors.

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

6 years ago[flang] Merge pull request flang-compiler/f18#87 from ThePortlandGroup/pmk4
Peter Klausler [Fri, 11 May 2018 21:30:44 +0000 (14:30 -0700)]
[flang] Merge pull request flang-compiler/f18#87 from ThePortlandGroup/pmk4

Quash extra spaces after macro replacement

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

6 years ago[flang] address review comment
peter klausler [Fri, 11 May 2018 21:23:18 +0000 (14:23 -0700)]
[flang] address review comment

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

6 years ago[flang] Document preprocessing more.
peter klausler [Fri, 11 May 2018 20:29:22 +0000 (13:29 -0700)]
[flang] Document preprocessing more.

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

6 years ago[flang] a little more refinement
peter klausler [Fri, 11 May 2018 19:54:49 +0000 (12:54 -0700)]
[flang] a little more refinement

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

6 years ago[flang] Clean up for merge.
peter klausler [Fri, 11 May 2018 19:44:56 +0000 (12:44 -0700)]
[flang] Clean up for merge.

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

6 years ago[flang] Remove blanks from macro-replaced text in fixed form source.
peter klausler [Fri, 11 May 2018 19:20:00 +0000 (12:20 -0700)]
[flang] Remove blanks from macro-replaced text in fixed form source.

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

6 years ago[flang] Implement proper swap() and operator=(&&) for some types that need them.
peter klausler [Fri, 11 May 2018 18:32:10 +0000 (11:32 -0700)]
[flang] Implement proper swap() and operator=(&&) for some types that need them.

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

6 years ago[flang] Quash multiple blanks when preprocessing.
peter klausler [Fri, 11 May 2018 18:15:20 +0000 (11:15 -0700)]
[flang] Quash multiple blanks when preprocessing.

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

6 years ago[flang] Merge pull request flang-compiler/f18#86 from ThePortlandGroup/pmk3
Peter Klausler [Thu, 10 May 2018 21:15:00 +0000 (14:15 -0700)]
[flang] Merge pull request flang-compiler/f18#86 from ThePortlandGroup/pmk3

Tweak compiler directive continuation line processing

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

6 years ago[flang] Tweak compiler directive continuation line processing to insert a space acros...
peter klausler [Thu, 10 May 2018 20:48:55 +0000 (13:48 -0700)]
[flang] Tweak compiler directive continuation line processing to insert a space across the line break when needed.

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

6 years ago[flang] Merge pull request flang-compiler/f18#85 from ThePortlandGroup/pmk2
Peter Klausler [Thu, 10 May 2018 17:04:35 +0000 (10:04 -0700)]
[flang] Merge pull request flang-compiler/f18#85 from ThePortlandGroup/pmk2

Fixes for compiler directive continuation lines

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

6 years ago[flang] Fix another bug found in test.
peter klausler [Wed, 9 May 2018 23:16:10 +0000 (16:16 -0700)]
[flang] Fix another bug found in test.

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

6 years ago[flang] fix previous changes after testing
peter klausler [Wed, 9 May 2018 23:06:57 +0000 (16:06 -0700)]
[flang] fix previous changes after testing

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

6 years ago[flang] Observe line length limit when unparsing BOZ literals.
peter klausler [Wed, 9 May 2018 22:48:17 +0000 (15:48 -0700)]
[flang] Observe line length limit when unparsing BOZ literals.

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

6 years ago[flang] Fix compiler directive continuation lines.
peter klausler [Wed, 9 May 2018 22:32:22 +0000 (15:32 -0700)]
[flang] Fix compiler directive continuation lines.

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

6 years ago[flang] Merge pull request flang-compiler/f18#84 from ThePortlandGroup/pmk1
Peter Klausler [Tue, 8 May 2018 20:17:44 +0000 (13:17 -0700)]
[flang] Merge pull request flang-compiler/f18#84 from ThePortlandGroup/pmk1

Build with g++ 8.1.0

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

6 years ago[flang] reformat for merge
peter klausler [Tue, 8 May 2018 20:15:13 +0000 (13:15 -0700)]
[flang] reformat for merge

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

6 years ago[flang] Keep message.cc buildable by g++ 7.2.
peter klausler [Tue, 8 May 2018 20:14:14 +0000 (13:14 -0700)]
[flang] Keep message.cc buildable by g++ 7.2.

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

6 years ago[flang] Update README.md, can build with clang 6.0 + g++ 8.1.0 headers.
peter klausler [Tue, 8 May 2018 19:20:56 +0000 (12:20 -0700)]
[flang] Update README.md, can build with clang 6.0 + g++ 8.1.0 headers.

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

6 years ago[flang] Update README with g++ 8.1.
peter klausler [Tue, 8 May 2018 18:01:47 +0000 (11:01 -0700)]
[flang] Update README with g++ 8.1.

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

6 years ago[flang] Build with g++ 8.1.0 compiler and headers.
peter klausler [Tue, 8 May 2018 17:32:58 +0000 (10:32 -0700)]
[flang] Build with g++ 8.1.0 compiler and headers.

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

6 years ago[flang] Copyediting of README.md.
peter klausler [Mon, 7 May 2018 21:39:36 +0000 (14:39 -0700)]
[flang] Copyediting of README.md.

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

6 years ago[flang] Merge pull request flang-compiler/f18#83 from ThePortlandGroup/pmk-msg
Peter Klausler [Mon, 7 May 2018 20:32:53 +0000 (13:32 -0700)]
[flang] Merge pull request flang-compiler/f18#83 from ThePortlandGroup/pmk-msg

Support attachments to messages

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

6 years ago[flang] Make sure that fixed form compiler directive line is not a continuation.
peter klausler [Mon, 7 May 2018 20:26:40 +0000 (13:26 -0700)]
[flang] Make sure that fixed form compiler directive line is not a continuation.

Original-commit: flang-compiler/f18@32994064f2a400a87e0dbe4aba1b0ae025a16293
Reviewed-on: https://github.com/flang-compiler/f18/pull/83

6 years ago[flang] Fix bug noticed in code review.
peter klausler [Mon, 7 May 2018 20:11:08 +0000 (13:11 -0700)]
[flang] Fix bug noticed in code review.

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

6 years ago[flang] Improve error messages on bad escaped characters.
peter klausler [Mon, 7 May 2018 19:57:08 +0000 (12:57 -0700)]
[flang] Improve error messages on bad escaped characters.

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

6 years ago[flang] fix bug that could lose nonstandard usage warning messages
peter klausler [Mon, 7 May 2018 19:37:10 +0000 (12:37 -0700)]
[flang] fix bug that could lose nonstandard usage warning messages

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

6 years ago[flang] Use attachments to messages in resolve-names.cc
peter klausler [Fri, 4 May 2018 22:40:40 +0000 (15:40 -0700)]
[flang] Use attachments to messages in resolve-names.cc

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

6 years ago[flang] Use attachment for context.
peter klausler [Fri, 4 May 2018 22:03:10 +0000 (15:03 -0700)]
[flang] Use attachment for context.

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

6 years ago[flang] Allow attachments to Messages.
peter klausler [Fri, 4 May 2018 21:39:29 +0000 (14:39 -0700)]
[flang] Allow attachments to Messages.

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

6 years ago[flang] More clean-up.
peter klausler [Fri, 4 May 2018 20:59:56 +0000 (13:59 -0700)]
[flang] More clean-up.

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

6 years ago[flang] Some initial clean-up in messages, use std::variant to make component possibi...
peter klausler [Fri, 4 May 2018 20:00:35 +0000 (13:00 -0700)]
[flang] Some initial clean-up in messages, use std::variant to make component possibilities clearer.

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

6 years ago[flang] Merge pull request flang-compiler/f18#80 from ThePortlandGroup/pmk-ptdump
Peter Klausler [Fri, 4 May 2018 17:43:14 +0000 (10:43 -0700)]
[flang] Merge pull request flang-compiler/f18#80 from ThePortlandGroup/pmk-ptdump

Clean up dump-parse-tree.h

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

6 years ago[flang] incorporate review comment
peter klausler [Fri, 4 May 2018 17:32:54 +0000 (10:32 -0700)]
[flang] incorporate review comment

Original-commit: flang-compiler/f18@15bb84470dd90d1425ca96c8d4d29cc247d44687
Reviewed-on: https://github.com/flang-compiler/f18/pull/80

6 years ago[flang] reformat
peter klausler [Thu, 3 May 2018 23:30:37 +0000 (16:30 -0700)]
[flang] reformat

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

6 years ago[flang] Clean up dump-parse-tree.h
peter klausler [Thu, 3 May 2018 23:20:22 +0000 (16:20 -0700)]
[flang] Clean up dump-parse-tree.h

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

6 years ago[flang] Merge pull request flang-compiler/f18#81 from ThePortlandGroup/pmk-nag
Peter Klausler [Fri, 4 May 2018 17:26:36 +0000 (10:26 -0700)]
[flang] Merge pull request flang-compiler/f18#81 from ThePortlandGroup/pmk-nag

Fixes to bugs found by NAG tests, and clangification of error message layout

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

6 years ago[flang] fix building with clang after merge
peter klausler [Fri, 4 May 2018 17:19:50 +0000 (10:19 -0700)]
[flang] fix building with clang after merge

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

6 years ago[flang] Do not sort messages by location for now.
peter klausler [Fri, 4 May 2018 16:41:33 +0000 (09:41 -0700)]
[flang] Do not sort messages by location for now.

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

6 years ago[flang] reformat for merge
peter klausler [Thu, 3 May 2018 23:47:00 +0000 (16:47 -0700)]
[flang] reformat for merge

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

6 years ago[flang] Improve error message location.
peter klausler [Thu, 3 May 2018 18:09:04 +0000 (11:09 -0700)]
[flang] Improve error message location.

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

6 years ago[flang] Add TODO comment.
peter klausler [Wed, 2 May 2018 23:55:14 +0000 (16:55 -0700)]
[flang] Add TODO comment.

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

6 years ago[flang] Fix preprocessor tokenization of .NE. style operators.
peter klausler [Wed, 2 May 2018 23:38:31 +0000 (16:38 -0700)]
[flang] Fix preprocessor tokenization of .NE. style operators.

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

6 years ago[flang] Allow conditional compilation directives to affect continuation lines (again).
peter klausler [Wed, 2 May 2018 23:09:12 +0000 (16:09 -0700)]
[flang] Allow conditional compilation directives to affect continuation lines (again).

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

6 years ago[flang] Ignore spaces in FORMAT specifications, even in free form.
peter klausler [Wed, 2 May 2018 22:16:53 +0000 (15:16 -0700)]
[flang] Ignore spaces in FORMAT specifications, even in free form.

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

6 years ago[flang] Fix two cosubscript parsing problems with lookahead.
peter klausler [Wed, 2 May 2018 21:05:13 +0000 (14:05 -0700)]
[flang] Fix two cosubscript parsing problems with lookahead.

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

6 years ago[flang] Fix comment recognition in print *, "..."!comment
peter klausler [Wed, 2 May 2018 20:25:03 +0000 (13:25 -0700)]
[flang] Fix comment recognition in print *, "..."!comment

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

6 years ago[flang] Make messages more like clang's.
peter klausler [Wed, 2 May 2018 19:07:49 +0000 (12:07 -0700)]
[flang] Make messages more like clang's.

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

6 years ago[flang] Clean up message output a little; remove unused APIs.
peter klausler [Wed, 2 May 2018 17:02:00 +0000 (10:02 -0700)]
[flang] Clean up message output a little; remove unused APIs.

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

6 years ago[flang] Don't process preprocessor directives amid continuation lines any more.
peter klausler [Tue, 1 May 2018 22:54:04 +0000 (15:54 -0700)]
[flang] Don't process preprocessor directives amid continuation lines any more.

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

6 years ago[flang] Allow $ and @ in defined operator names.
peter klausler [Tue, 1 May 2018 21:59:10 +0000 (14:59 -0700)]
[flang] Allow $ and @ in defined operator names.

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

6 years ago[flang] Merge pull request flang-compiler/f18#79 from ThePortlandGroup/tsk3
Tim Keith [Fri, 4 May 2018 14:24:35 +0000 (07:24 -0700)]
[flang] Merge pull request flang-compiler/f18#79 from ThePortlandGroup/tsk3

Implement USE statements.

Original-commit: flang-compiler/f18@053461f6de9f4d0c86cc96543915adabf1d16df3
Reviewed-on: https://github.com/flang-compiler/f18/pull/79

6 years ago[flang] Support for USE statements.
Tim Keith [Thu, 3 May 2018 22:57:56 +0000 (15:57 -0700)]
[flang] Support for USE statements.

When a USE statement is encountered, find the scope corresponding to the
module. This is now stored in the ModuleDetails of the module symbol.
useModuleScope_ tracks this while processing the USE. Currently only
modules defined in the same file work because we don't have module files.

At the end of a USE that isn't a use-only, add all public names that
were not renamed.

AddUse() handles recording of a USE by creating a local symbol with
UseDetails that tracks the use-symbol in the module and the location of
the USE (for error messages). If an ambiguous USE is detected, the
UseDetails are replaced by UseErrorDetails. This tracks the locations of
all the uses so that they can be referenced in a diagnostic.

Detect attempts to re-declare use-associated symbols as well as changing
their attributes (except for ASYNCHRONOUS and VOLATILE).

Add missing checks for access-stmt in scoping units other than modules.

Add tests for the new errors.

Reorganize the MessageHandler::Say() overloadings to prevent them from
becoming too numerous.

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

6 years ago[flang] resolve-names.cc reorganization and cleanup.
Tim Keith [Thu, 26 Apr 2018 02:58:42 +0000 (19:58 -0700)]
[flang] resolve-names.cc reorganization and cleanup.

Add ScopeHandle class to manage the stack of scopes and MakeSymbol(), which
makes a symbol in the current scope. Move the call to ApplyImplicitScopes()
into PopScope() as it must be done for each scope.

Add ModuleVisitor class to manage module-related resolution. Currently that
consists of beginning and ending modules and access statements. This is
preparation for further module work.

Replace references to parser::CharBlock with SourceName.

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

6 years ago[flang] Merge pull request flang-compiler/f18#78 from ThePortlandGroup/sch_llvm2
Stephane Chauveau [Fri, 4 May 2018 09:20:37 +0000 (11:20 +0200)]
[flang] Merge pull request flang-compiler/f18#78 from ThePortlandGroup/sch_llvm2

Add dependency to LLVM & Clang libraries (backport)

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

6 years ago[flang] misc changes in response to pul-request comments
Stephane Chauveau [Fri, 4 May 2018 09:18:34 +0000 (11:18 +0200)]
[flang] misc changes in response to pul-request comments

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

6 years ago[flang] fix typo in comment
Stephane Chauveau [Thu, 3 May 2018 15:30:02 +0000 (17:30 +0200)]
[flang] fix typo in comment

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

6 years ago[flang] Add missing underscore to private members
Stephane Chauveau [Thu, 3 May 2018 14:32:43 +0000 (16:32 +0200)]
[flang] Add missing underscore to private members

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

6 years ago[flang] Fix duplicate copyright message
Stephane Chauveau [Thu, 3 May 2018 14:26:17 +0000 (16:26 +0200)]
[flang] Fix duplicate copyright message

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

6 years ago[flang] Manual backport of sch_llvm branch
Stephane Chauveau [Thu, 3 May 2018 12:54:53 +0000 (14:54 +0200)]
[flang] Manual backport of sch_llvm branch

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

6 years ago[flang] Merge pull request flang-compiler/f18#77 from ThePortlandGroup/tsk4
Tim Keith [Wed, 2 May 2018 22:32:16 +0000 (15:32 -0700)]
[flang] Merge pull request flang-compiler/f18#77 from ThePortlandGroup/tsk4

Source code cleanup

Original-commit: flang-compiler/f18@63b5a0e133ce259d7a1690237ae2534f5c803505
Reviewed-on: https://github.com/flang-compiler/f18/pull/77

6 years ago[flang] Run clang-format on all .h and .cc files.
Tim Keith [Wed, 2 May 2018 21:06:02 +0000 (14:06 -0700)]
[flang] Run clang-format on all .h and .cc files.

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

6 years ago[flang] Normalize namespace definitions.
Tim Keith [Wed, 2 May 2018 20:48:12 +0000 (13:48 -0700)]
[flang] Normalize namespace definitions.

Replace `namespace Fortran { namespace parser { ... } }` with
`namespace Fortran::parser { ... }` and similarly for semantics.

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

6 years ago[flang] Merge pull request flang-compiler/f18#76 from ThePortlandGroup/sjs-os1
Steve Scalpone [Wed, 2 May 2018 18:05:34 +0000 (11:05 -0700)]
[flang] Merge pull request flang-compiler/f18#76 from ThePortlandGroup/sjs-os1

Remove unused code; rename dump-parse-tree

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

6 years ago[flang] Update CMakefiles and #include paths.
Steve Scalpone [Wed, 2 May 2018 16:21:03 +0000 (09:21 -0700)]
[flang] Update CMakefiles and #include paths.

Original-commit: flang-compiler/f18@1b7b8259b39760446f9aaee8b104cc1a8543f5dd
Reviewed-on: https://github.com/flang-compiler/f18/pull/76

6 years ago[flang] Removed unused files and declarations.
Steve Scalpone [Wed, 2 May 2018 16:15:33 +0000 (09:15 -0700)]
[flang] Removed unused files and declarations.
Renamed ParseTreeDump to dump-parse-tree.

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

6 years ago[flang] Merge pull request flang-compiler/f18#75 from ThePortlandGroup/tsk4
Tim Keith [Tue, 1 May 2018 21:44:40 +0000 (14:44 -0700)]
[flang] Merge pull request flang-compiler/f18#75 from ThePortlandGroup/tsk4

Cleanup

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

6 years ago[flang] Make include guards consistent.
Tim Keith [Tue, 1 May 2018 21:07:52 +0000 (14:07 -0700)]
[flang] Make include guards consistent.

The include guard symbol is `FORTRAN_$dir_$file_H_` where $dir is the
subdirectory of `lib` and $file is the basename of the header file.
Those names are mapped to uppercase and hyphens are replaced by
underscores.

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

6 years ago[flang] Remove unused files.
Tim Keith [Tue, 1 May 2018 20:29:10 +0000 (13:29 -0700)]
[flang] Remove unused files.

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

6 years ago[flang] Merge pull request flang-compiler/f18#74 from ThePortlandGroup/tsk4
Tim Keith [Tue, 1 May 2018 20:24:54 +0000 (13:24 -0700)]
[flang] Merge pull request flang-compiler/f18#74 from ThePortlandGroup/tsk4

Add copyright notices.

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

6 years ago[flang] Add copyright notices.
Tim Keith [Tue, 1 May 2018 19:50:34 +0000 (12:50 -0700)]
[flang] Add copyright notices.

For source files (C++, Fortran, CMake) add copyright and license.
For documentation files add just copyright.

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

6 years ago[flang] Merge pull request flang-compiler/f18#73 from ThePortlandGroup/pmk-scrub3
Peter Klausler [Fri, 27 Apr 2018 22:32:12 +0000 (15:32 -0700)]
[flang] Merge pull request flang-compiler/f18#73 from ThePortlandGroup/pmk-scrub3

More clean-up & build with Clang

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

6 years ago[flang] Clean out the PGI stuff from CMakeLists.txt.
peter klausler [Fri, 27 Apr 2018 22:03:28 +0000 (15:03 -0700)]
[flang] Clean out the PGI stuff from CMakeLists.txt.

Original-commit: flang-compiler/f18@806db179ce8f9437f301772712baf69b8f0e4135
Reviewed-on: https://github.com/flang-compiler/f18/pull/73

6 years ago[flang] Fix a static_assert and a message location bug in first().
peter klausler [Fri, 27 Apr 2018 20:37:51 +0000 (13:37 -0700)]
[flang] Fix a static_assert and a message location bug in first().

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

6 years ago[flang] silence a warning
peter klausler [Fri, 27 Apr 2018 19:43:16 +0000 (12:43 -0700)]
[flang] silence a warning

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

6 years ago[flang] More Clang work.
peter klausler [Fri, 27 Apr 2018 19:37:47 +0000 (12:37 -0700)]
[flang] More Clang work.

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