Commit graph

469 commits

Author SHA1 Message Date
peter klausler
004852fc23 [flang] Add a TODO.
Original-commit: flang-compiler/f18@b9b929384b
Reviewed-on: https://github.com/flang-compiler/f18/pull/92
Tree-same-pre-rewrite: false
2018-05-16 11:32:24 -07:00
peter klausler
64ea1ff79d [flang] Fix clang-only build warning, run clang-format.
Original-commit: flang-compiler/f18@bbc6b25346
Reviewed-on: https://github.com/flang-compiler/f18/pull/92
Tree-same-pre-rewrite: false
2018-05-16 10:31:35 -07:00
peter klausler
6261c0935c [flang] Document and initiate development of run time descriptors.
Original-commit: flang-compiler/f18@79edea528f
Reviewed-on: https://github.com/flang-compiler/f18/pull/92
Tree-same-pre-rewrite: false
2018-05-16 10:22:33 -07:00
Peter Klausler
73b2a8eb23 [flang] Merge pull request flang-compiler/f18#90 from ThePortlandGroup/pmk5
Fix issue flang-compiler/f18#89

Original-commit: flang-compiler/f18@119fa65b2c
Reviewed-on: https://github.com/flang-compiler/f18/pull/90
2018-05-16 10:09:46 -07:00
peter klausler
adcfd4a0f5 [flang] clang-format
Original-commit: flang-compiler/f18@acb149dc7c
Reviewed-on: https://github.com/flang-compiler/f18/pull/90
2018-05-16 10:00:14 -07:00
peter klausler
7e2d19d5da [flang] Fine tuning of space recognition.
Original-commit: flang-compiler/f18@622befa9ca
Reviewed-on: https://github.com/flang-compiler/f18/pull/90
Tree-same-pre-rewrite: false
2018-05-16 09:59:43 -07:00
peter klausler
b010047266 [flang] Dodge bogus warning about unused anonymous variable in refactored code.
Original-commit: flang-compiler/f18@1d3cfe0038
Reviewed-on: https://github.com/flang-compiler/f18/pull/90
Tree-same-pre-rewrite: false
2018-05-16 09:59:42 -07:00
peter klausler
454f909cbc [flang] Fix tokenization of signed-int-literal-constant, allow internal space.
Original-commit: flang-compiler/f18@afa6425b48
Reviewed-on: https://github.com/flang-compiler/f18/pull/90
Tree-same-pre-rewrite: false
2018-05-16 09:59:41 -07:00
hsuauthai
51e63799fd [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@ba4eeb5a97
Reviewed-on: https://github.com/flang-compiler/f18/pull/91
2018-05-16 09:53:43 -07:00
Hongyon Suauthai
afac6ff43d [flang] Modified directive names and clauses to reflect in OpenMP Spec.
Original-commit: flang-compiler/f18@c2f756f478
Reviewed-on: https://github.com/flang-compiler/f18/pull/91
2018-05-16 09:49:35 -07:00
Hongyon Suauthai
6f7b4fa691 [flang] Add OpenMP parallel directives and private/firstprivate clauses to parser.
Original-commit: flang-compiler/f18@ea8abe45cc
Reviewed-on: https://github.com/flang-compiler/f18/pull/91
Tree-same-pre-rewrite: false
2018-05-16 07:28:54 -07:00
Tim Keith
4fdf2ff21f [flang] Merge pull request flang-compiler/f18#88 from ThePortlandGroup/tsk3
Name resolution on interface blocks.

Original-commit: flang-compiler/f18@a902406caa
Reviewed-on: https://github.com/flang-compiler/f18/pull/88
2018-05-14 14:32:22 -07:00
Tim Keith
5978ac9c40 [flang] Refactor: make some methods out-of-line.
Original-commit: flang-compiler/f18@d2d5457e46
Reviewed-on: https://github.com/flang-compiler/f18/pull/88
2018-05-14 14:26:39 -07:00
Tim Keith
4c99dc2a94 [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@03148b49dd
Reviewed-on: https://github.com/flang-compiler/f18/pull/88
Tree-same-pre-rewrite: false
2018-05-14 13:53:02 -07:00
Tim Keith
19507b91ce [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@8c98b0a9b9
Reviewed-on: https://github.com/flang-compiler/f18/pull/88
Tree-same-pre-rewrite: false
2018-05-14 13:53:02 -07:00
Tim Keith
3c1f2b9670 [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@f73cfa2fe9
Reviewed-on: https://github.com/flang-compiler/f18/pull/88
Tree-same-pre-rewrite: false
2018-05-14 13:53:02 -07:00
Peter Klausler
07db733268 [flang] Merge pull request flang-compiler/f18#87 from ThePortlandGroup/pmk4
Quash extra spaces after macro replacement

Original-commit: flang-compiler/f18@fd80d44803
Reviewed-on: https://github.com/flang-compiler/f18/pull/87
2018-05-11 14:30:44 -07:00
peter klausler
653238cdef [flang] address review comment
Original-commit: flang-compiler/f18@bd8a96cf70
Reviewed-on: https://github.com/flang-compiler/f18/pull/87
2018-05-11 14:23:18 -07:00
peter klausler
484a852cff [flang] Document preprocessing more.
Original-commit: flang-compiler/f18@93f7a0b011
Reviewed-on: https://github.com/flang-compiler/f18/pull/87
Tree-same-pre-rewrite: false
2018-05-11 13:29:22 -07:00
peter klausler
f651e74244 [flang] a little more refinement
Original-commit: flang-compiler/f18@5754d426e8
Reviewed-on: https://github.com/flang-compiler/f18/pull/87
Tree-same-pre-rewrite: false
2018-05-11 12:54:49 -07:00
peter klausler
42964c090c [flang] Clean up for merge.
Original-commit: flang-compiler/f18@608ef132c0
Reviewed-on: https://github.com/flang-compiler/f18/pull/87
Tree-same-pre-rewrite: false
2018-05-11 12:44:56 -07:00
peter klausler
ab723922bc [flang] Remove blanks from macro-replaced text in fixed form source.
Original-commit: flang-compiler/f18@c33dad2162
Reviewed-on: https://github.com/flang-compiler/f18/pull/87
Tree-same-pre-rewrite: false
2018-05-11 12:20:00 -07:00
peter klausler
926db8e9aa [flang] Implement proper swap() and operator=(&&) for some types that need them.
Original-commit: flang-compiler/f18@a9c53d8bb5
Reviewed-on: https://github.com/flang-compiler/f18/pull/87
Tree-same-pre-rewrite: false
2018-05-11 11:32:10 -07:00
peter klausler
f1840f1601 [flang] Quash multiple blanks when preprocessing.
Original-commit: flang-compiler/f18@d91680b469
Reviewed-on: https://github.com/flang-compiler/f18/pull/87
Tree-same-pre-rewrite: false
2018-05-11 11:15:20 -07:00
Peter Klausler
e13ee629f8 [flang] Merge pull request flang-compiler/f18#86 from ThePortlandGroup/pmk3
Tweak compiler directive continuation line processing

Original-commit: flang-compiler/f18@bbd5250db9
Reviewed-on: https://github.com/flang-compiler/f18/pull/86
2018-05-10 14:15:00 -07:00
peter klausler
46c53c74b5 [flang] Tweak compiler directive continuation line processing to insert a space across the line break when needed.
Original-commit: flang-compiler/f18@de3a4a01ec
Reviewed-on: https://github.com/flang-compiler/f18/pull/86
2018-05-10 13:48:55 -07:00
Peter Klausler
d351ec3fdc [flang] Merge pull request flang-compiler/f18#85 from ThePortlandGroup/pmk2
Fixes for compiler directive continuation lines

Original-commit: flang-compiler/f18@e4a5e129f5
Reviewed-on: https://github.com/flang-compiler/f18/pull/85
2018-05-10 10:04:35 -07:00
peter klausler
bef608aeb2 [flang] Fix another bug found in test.
Original-commit: flang-compiler/f18@7c5df7f3f8
Reviewed-on: https://github.com/flang-compiler/f18/pull/85
2018-05-09 16:16:10 -07:00
peter klausler
41aec2d65e [flang] fix previous changes after testing
Original-commit: flang-compiler/f18@c088704f13
Reviewed-on: https://github.com/flang-compiler/f18/pull/85
Tree-same-pre-rewrite: false
2018-05-09 16:06:57 -07:00
peter klausler
a726229c3a [flang] Observe line length limit when unparsing BOZ literals.
Original-commit: flang-compiler/f18@2c2e4035b6
Reviewed-on: https://github.com/flang-compiler/f18/pull/85
Tree-same-pre-rewrite: false
2018-05-09 15:48:17 -07:00
peter klausler
a1e4a80ae6 [flang] Fix compiler directive continuation lines.
Original-commit: flang-compiler/f18@f30e3b71f8
Reviewed-on: https://github.com/flang-compiler/f18/pull/85
Tree-same-pre-rewrite: false
2018-05-09 15:32:22 -07:00
Peter Klausler
1e73869524 [flang] Merge pull request flang-compiler/f18#84 from ThePortlandGroup/pmk1
Build with g++ 8.1.0

Original-commit: flang-compiler/f18@a1cd245ba2
Reviewed-on: https://github.com/flang-compiler/f18/pull/84
2018-05-08 13:17:44 -07:00
peter klausler
a7a8506ce6 [flang] reformat for merge
Original-commit: flang-compiler/f18@ca8f9611f5
Reviewed-on: https://github.com/flang-compiler/f18/pull/84
2018-05-08 13:15:13 -07:00
peter klausler
1e28daf2ab [flang] Keep message.cc buildable by g++ 7.2.
Original-commit: flang-compiler/f18@edd311972f
Reviewed-on: https://github.com/flang-compiler/f18/pull/84
Tree-same-pre-rewrite: false
2018-05-08 13:14:14 -07:00
peter klausler
29ab3bd5f2 [flang] Update README.md, can build with clang 6.0 + g++ 8.1.0 headers.
Original-commit: flang-compiler/f18@f57451d8d4
Reviewed-on: https://github.com/flang-compiler/f18/pull/84
Tree-same-pre-rewrite: false
2018-05-08 12:20:56 -07:00
peter klausler
c8415cec4d [flang] Update README with g++ 8.1.
Original-commit: flang-compiler/f18@a047f116da
Reviewed-on: https://github.com/flang-compiler/f18/pull/84
Tree-same-pre-rewrite: false
2018-05-08 11:01:47 -07:00
peter klausler
eef68291aa [flang] Build with g++ 8.1.0 compiler and headers.
Original-commit: flang-compiler/f18@53d80fc854
Reviewed-on: https://github.com/flang-compiler/f18/pull/84
Tree-same-pre-rewrite: false
2018-05-08 10:32:58 -07:00
peter klausler
1e036b2111 [flang] Copyediting of README.md.
Original-commit: flang-compiler/f18@32ffc711b6
Reviewed-on: https://github.com/flang-compiler/f18/pull/84
Tree-same-pre-rewrite: false
2018-05-07 14:39:36 -07:00
Peter Klausler
9a1e4ee82c [flang] Merge pull request flang-compiler/f18#83 from ThePortlandGroup/pmk-msg
Support attachments to messages

Original-commit: flang-compiler/f18@5cdace25f1
Reviewed-on: https://github.com/flang-compiler/f18/pull/83
2018-05-07 13:32:53 -07:00
peter klausler
e2d10c079b [flang] Make sure that fixed form compiler directive line is not a continuation.
Original-commit: flang-compiler/f18@32994064f2
Reviewed-on: https://github.com/flang-compiler/f18/pull/83
2018-05-07 13:26:40 -07:00
peter klausler
f76d2073de [flang] Fix bug noticed in code review.
Original-commit: flang-compiler/f18@7fc497064e
Reviewed-on: https://github.com/flang-compiler/f18/pull/83
Tree-same-pre-rewrite: false
2018-05-07 13:11:08 -07:00
peter klausler
fea41dc1e0 [flang] Improve error messages on bad escaped characters.
Original-commit: flang-compiler/f18@fb64849d6a
Reviewed-on: https://github.com/flang-compiler/f18/pull/83
Tree-same-pre-rewrite: false
2018-05-07 12:57:08 -07:00
peter klausler
4a56ad333f [flang] fix bug that could lose nonstandard usage warning messages
Original-commit: flang-compiler/f18@ff48aa95fd
Reviewed-on: https://github.com/flang-compiler/f18/pull/83
Tree-same-pre-rewrite: false
2018-05-07 12:37:10 -07:00
peter klausler
a6da97cb6f [flang] Use attachments to messages in resolve-names.cc
Original-commit: flang-compiler/f18@d24674f4ea
Reviewed-on: https://github.com/flang-compiler/f18/pull/83
Tree-same-pre-rewrite: false
2018-05-04 15:40:40 -07:00
peter klausler
bb7d39497d [flang] Use attachment for context.
Original-commit: flang-compiler/f18@e92cf73cf9
Reviewed-on: https://github.com/flang-compiler/f18/pull/83
Tree-same-pre-rewrite: false
2018-05-04 15:03:10 -07:00
peter klausler
04b8f48d86 [flang] Allow attachments to Messages.
Original-commit: flang-compiler/f18@08785977ce
Reviewed-on: https://github.com/flang-compiler/f18/pull/83
Tree-same-pre-rewrite: false
2018-05-04 14:39:29 -07:00
peter klausler
8f27198cd3 [flang] More clean-up.
Original-commit: flang-compiler/f18@ed60db3708
Reviewed-on: https://github.com/flang-compiler/f18/pull/83
Tree-same-pre-rewrite: false
2018-05-04 13:59:56 -07:00
peter klausler
b00fa16ce4 [flang] Some initial clean-up in messages, use std::variant to make component possibilities clearer.
Original-commit: flang-compiler/f18@9b7eeb2354
Reviewed-on: https://github.com/flang-compiler/f18/pull/83
Tree-same-pre-rewrite: false
2018-05-04 13:00:35 -07:00
Peter Klausler
785c31fd2f [flang] Merge pull request flang-compiler/f18#80 from ThePortlandGroup/pmk-ptdump
Clean up dump-parse-tree.h

Original-commit: flang-compiler/f18@c0e3940cb0
Reviewed-on: https://github.com/flang-compiler/f18/pull/80
2018-05-04 10:43:14 -07:00
peter klausler
67fc4f647f [flang] incorporate review comment
Original-commit: flang-compiler/f18@15bb84470d
Reviewed-on: https://github.com/flang-compiler/f18/pull/80
2018-05-04 10:32:54 -07:00