peter klausler [Tue, 29 May 2018 19:42:21 +0000 (12:42 -0700)]
[flang] add fixed-point.h
Original-commit: flang-compiler/f18@
21c85a5c21aa15ad2a29ea9f2af2bf5357d2f3c6
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Sat, 19 May 2018 00:11:04 +0000 (17:11 -0700)]
[flang] begin work
Original-commit: flang-compiler/f18@
82e434bf5966afa6e86a24a4de69d1ab537eb607
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
Peter Klausler [Thu, 14 Jun 2018 20:50:06 +0000 (13:50 -0700)]
[flang] Merge pull request flang-compiler/f18#103 from ThePortlandGroup/pmk-issue98
Issue 98, better error recovery for specification-part
Original-commit: flang-compiler/f18@
0239a080e0a387aeb0a45e750c82c230d6a1b7c1
Reviewed-on: https://github.com/flang-compiler/f18/pull/103
peter klausler [Thu, 14 Jun 2018 17:13:40 +0000 (10:13 -0700)]
[flang] Issue 98, better error recovery for specification-part
Original-commit: flang-compiler/f18@
0b0812a82b15decf430de2c3ca991623cf53e5e2
Reviewed-on: https://github.com/flang-compiler/f18/pull/103
Peter Klausler [Thu, 14 Jun 2018 17:17:04 +0000 (10:17 -0700)]
[flang] Merge pull request flang-compiler/f18#102 from ThePortlandGroup/pmk-omp-fix
Allow tab in fixed form compiler directives. Reformat C++.
Original-commit: flang-compiler/f18@
1b7519b5a8209a1cb0504fbfcd3d3b124aa2be3a
Reviewed-on: https://github.com/flang-compiler/f18/pull/102
peter klausler [Thu, 14 Jun 2018 16:35:38 +0000 (09:35 -0700)]
[flang] Allow tab in fixed form compiler directives. Reformat C++.
Original-commit: flang-compiler/f18@
59ba17cb2478bd0b0f4ed6084c424677c7b46371
Reviewed-on: https://github.com/flang-compiler/f18/pull/102
Tim Keith [Wed, 13 Jun 2018 16:58:34 +0000 (09:58 -0700)]
[flang] Merge pull request flang-compiler/f18#100 from ThePortlandGroup/tsk5
Remove extraneous Pre/Post for ProcedureDeclarationStmt
Original-commit: flang-compiler/f18@
c7cf8c09b91da4bbea14092a3107fc5904312e1c
Reviewed-on: https://github.com/flang-compiler/f18/pull/100
Tim Keith [Wed, 13 Jun 2018 00:46:41 +0000 (17:46 -0700)]
[flang] Remove extraneous Pre/Post for ProcedureDeclarationStmt
clang give a compilation error on resolve-names.cc because there are
two overloadings of Pre(ProcedureDeclarationStmt) available in
ResolveNamesVisitor. One is defined in DeclTypeSpecVisitor and the other
in DeclarationVisitor. They are both brought in to ResolveNamesVisitor
via `using` statements.
The one in DeclarationVisitor is the one that is supposed to be called.
The other should have been removed when this one was added. This is the
one that gcc chooses to call, so this doesn't change any behavior.
The same applies to the Post method as well.
Original-commit: flang-compiler/f18@
872f8faf96164a01f18100fc1942f68523be6d76
Reviewed-on: https://github.com/flang-compiler/f18/pull/100
Tim Keith [Tue, 12 Jun 2018 14:06:11 +0000 (07:06 -0700)]
[flang] Merge pull request flang-compiler/f18#99 from ThePortlandGroup/tsk7
Add Dump() routines for debugging.
Original-commit: flang-compiler/f18@
cf7d2785aa5064708b0f67e897a850df26f927e8
Reviewed-on: https://github.com/flang-compiler/f18/pull/99
Tim Keith [Mon, 11 Jun 2018 22:40:31 +0000 (15:40 -0700)]
[flang] Add Dump() routines for debugging.
Add Dump() routines based on operator<< for the type so that they are
easy to call from the debugger. Overload for both pointer and reference
types and for dumping to std::cerr or a specific ostream.
Original-commit: flang-compiler/f18@
ec6676eff04a0b231f7f5f3e1e2486f2c93e2810
Reviewed-on: https://github.com/flang-compiler/f18/pull/99
Tim Keith [Wed, 6 Jun 2018 18:43:12 +0000 (11:43 -0700)]
[flang] Merge pull request flang-compiler/f18#97 from ThePortlandGroup/tsk5
Process procedure declarations and derived types.
Original-commit: flang-compiler/f18@
d356b3b7c46ffd89c02761241a7d5589acd2b0cd
Reviewed-on: https://github.com/flang-compiler/f18/pull/97
Tim Keith [Wed, 6 Jun 2018 18:41:42 +0000 (11:41 -0700)]
[flang] Address review comments.
Replace operator=(Symbol) and operator=(DeclTypeSpec) with set_symbol()
and set_type() to make it clearer. Eliminate the move constructor as it
is not needed. Make all but the accessor functions out-of-line.
Change HasExplicitType() to NeedsExplicitType(), reversing its sense.
HasExplicitType() returned true for symbols that didn't have or need an
explicit type, which was confusing.
Original-commit: flang-compiler/f18@
ada13ac6a32145fe260d78cb0e736998e5eabd15
Reviewed-on: https://github.com/flang-compiler/f18/pull/97
Tim Keith [Tue, 5 Jun 2018 19:18:35 +0000 (12:18 -0700)]
[flang] Process procedure declarations and derived types.
Add ObjectEntityDetails and ProcEntityDetails to distinguish between an
entity from an object-decl and one from a proc-decl. When we don't know,
it stays as EntityDetails until it is resolved. DeclareEntity() in
DeclarationVisitor creates this kind of symbol.
Add flags to Symbol as a convenient place for boolean flags common to
many kinds of symbols. Use it to mark symbols known to be functions or
subroutines so that we can report errors when they are used incorrectly.
Improve handling of EXTERNAL statement.
Handle ProcDecl nodes and add symbols for them.
Partial processing of derived types. Data component declarations are
processed and added to the derived type. Define TypeBoundProc and
TypeBoundGeneric in type.h. Procedure components, type-bound procedures,
etc. are not handled yet and nothing is done with the derived type once
it is created. Eliminate DerivedTypeDefBuilder in favor of just setting
fields in derivedTypeData_.
Add GetDeclTypeSpec to go with BeginDeclTypeSpec and EndDeclTypeSpec, to
avoid directly access the private variable.
Add tests in resolve20.f90 for errors related to procedure declarations.
Add missing copyrights to other tests.
Original-commit: flang-compiler/f18@
40e65c14656a1c60eae5a8fdfbdcab062ad6f1d2
Reviewed-on: https://github.com/flang-compiler/f18/pull/97
Tree-same-pre-rewrite: false
Tim Keith [Wed, 30 May 2018 21:49:40 +0000 (14:49 -0700)]
[flang] Add MessageHandler::Say2.
This handles the common case of an error message referring to
a name, and an attached message referring to another name.
For example, reporting an error where a name is already declared
and mentioning the previous declaration.
Original-commit: flang-compiler/f18@
901b50dcf2860c5fcd5f94f0198981fe871d6716
Reviewed-on: https://github.com/flang-compiler/f18/pull/97
Tree-same-pre-rewrite: false
Tim Keith [Wed, 30 May 2018 21:11:45 +0000 (14:11 -0700)]
[flang] Extract DeclarationVisitor from ResolveNamesVisitor
The is a refactoring to move all handling of declarations from
ResolveNamesVisitor to a new class. No function change.
Original-commit: flang-compiler/f18@
2a5589ab969421b1723c63105fe6922941ec1096
Reviewed-on: https://github.com/flang-compiler/f18/pull/97
Tree-same-pre-rewrite: false
hsuauthai [Fri, 1 Jun 2018 22:08:09 +0000 (15:08 -0700)]
[flang] Merge pull request flang-compiler/f18#96 from ThePortlandGroup/omppar
Omppar
Original-commit: flang-compiler/f18@
8c259b93004558b74ae9c771e319c18ab86ea409
Reviewed-on: https://github.com/flang-compiler/f18/pull/96
Hongyon Suauthai [Fri, 1 Jun 2018 21:36:51 +0000 (14:36 -0700)]
[flang] Fix comment in openmp-grammar.h. Fix unparse of reduction operator.
Original-commit: flang-compiler/f18@
f6a7a03492525bcdf31e61f3a71e28cbe5818e95
Reviewed-on: https://github.com/flang-compiler/f18/pull/96
Hongyon Suauthai [Fri, 1 Jun 2018 18:54:43 +0000 (11:54 -0700)]
[flang] Remove unintended change.
Original-commit: flang-compiler/f18@
a545cd5de4f16accf7862df0f9c895cede7b432f
Reviewed-on: https://github.com/flang-compiler/f18/pull/96
Tree-same-pre-rewrite: false
Hongyon Suauthai [Fri, 1 Jun 2018 18:47:24 +0000 (11:47 -0700)]
[flang] Fix space in issue unparse.cc between directive and its first clause.
Original-commit: flang-compiler/f18@
d9478c1a59050e59b14bf57d5e62c88c71bbe58a
Reviewed-on: https://github.com/flang-compiler/f18/pull/96
Tree-same-pre-rewrite: false
Hongyon Suauthai [Fri, 1 Jun 2018 18:15:32 +0000 (11:15 -0700)]
[flang] update unparsing openmp directives and clauses.
Original-commit: flang-compiler/f18@
76121cda6c29404c232453f7302ac39eb0f9dbce
Reviewed-on: https://github.com/flang-compiler/f18/pull/96
Tree-same-pre-rewrite: false
Hongyon Suauthai [Fri, 1 Jun 2018 17:40:13 +0000 (10:40 -0700)]
[flang] Update unparse.cc and move declarative directives for now.
Original-commit: flang-compiler/f18@
d79503f98ffc1f1975533e0a9ec94f0cbeb5b9fd
Reviewed-on: https://github.com/flang-compiler/f18/pull/96
Tree-same-pre-rewrite: false
Hongyon Suauthai [Thu, 31 May 2018 14:38:15 +0000 (07:38 -0700)]
[flang] add more clauses, declarative directives, standalone directives, and directives enclosing do loop.
Original-commit: flang-compiler/f18@
483a54b0c890a550165e985f1ae10c4ab9c5ac79
Reviewed-on: https://github.com/flang-compiler/f18/pull/96
Tree-same-pre-rewrite: false
Tim Keith [Wed, 23 May 2018 00:00:10 +0000 (17:00 -0700)]
[flang] Merge pull request flang-compiler/f18#95 from ThePortlandGroup/tsk3
Improvements to generics.
Original-commit: flang-compiler/f18@
4d1664206f76c4f7f749113e09a0173fe4eb64f9
Reviewed-on: https://github.com/flang-compiler/f18/pull/95
Tim Keith [Tue, 22 May 2018 23:12:56 +0000 (16:12 -0700)]
[flang] Improvements to generics.
When a generic or specific procedure is use-associated, make a copy of
it in the current scope (replacing the symbol that has UseDetails) so
that we can make changes to it. This permits a generic to be defined in
one module and extended with more specific procedures in another.
When a specific procedure has the same name as its generic, it can't be
stored directly in the scope because that is indexed by name and the
generic is already there. So instead we store the specific in the
GenericDetails of the generic symbol.
Enforce the rule that a generic and a procedure can only have the same
name if the procedure is one of the specifics of the generic.
Refactorings done is support of this change:
- Add FindSymbol() and EraseSymbol() as helpers to find or erase a
symbol in the current scope. Make use of FindSymbol() where appropriate.
- Add SayAlreadyDeclared() to report a common error.
Original-commit: flang-compiler/f18@
be479b988772c942a473cb0453b906ed51cea498
Reviewed-on: https://github.com/flang-compiler/f18/pull/95
Steve Scalpone [Fri, 18 May 2018 20:06:22 +0000 (13:06 -0700)]
[flang] Create LICENSE
We expect to adopt the llvm.org license in the near future.
Original-commit: flang-compiler/f18@
a1a01e949b389db784127f9ccbddaad460335c3a
Steve Scalpone [Fri, 18 May 2018 20:02:58 +0000 (13:02 -0700)]
[flang] Update build instructions (flang-compiler/f18#94)
* Update build instructions
Add an overview and update the build instructions for f18.
Original-commit: flang-compiler/f18@
a60060cfe110cbb32705408b42755d03f69e3302
Reviewed-on: https://github.com/flang-compiler/f18/pull/94
Tim Keith [Thu, 17 May 2018 21:17:11 +0000 (14:17 -0700)]
[flang] Merge pull request flang-compiler/f18#93 from ThePortlandGroup/tsk3
Clean up; fix assert and crashes
Original-commit: flang-compiler/f18@
1e91e792921023ee2f78a918c3d3229773ea2124
Reviewed-on: https://github.com/flang-compiler/f18/pull/93
Tim Keith [Thu, 17 May 2018 21:16:15 +0000 (14:16 -0700)]
[flang] Address review comments.
Original-commit: flang-compiler/f18@
5361f3c810ad6e161006f43fb8759e36e9497591
Reviewed-on: https://github.com/flang-compiler/f18/pull/93
Tim Keith [Thu, 17 May 2018 20:06:38 +0000 (13:06 -0700)]
[flang] Clean up; fix assert and crashes
This is the result of running `f18 -fdebug-resolve-names` on a bunch of
Fortran source and fixing the resulting assertion errors and segmentation
faults.
Most of the problems were with encountering attributes, array specs, or
declaration type specs when we weren't prepared to handle them. Those
were fixed by adding calls to {Begin,End}DeclTypeSpec and {Begin,End}Decl
when encountering certain nodes, though the real work for those nodes is
still to be done.
Extract some common functionality into PostAttrSpec and CheckUseError.
Add missing XOR to GenericSpec.
Original-commit: flang-compiler/f18@
3c0ff7ded4b3f5512a03e994edd8a0d5074e1149
Reviewed-on: https://github.com/flang-compiler/f18/pull/93
Tree-same-pre-rewrite: false
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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