Commit graph

35 commits

Author SHA1 Message Date
Eric Schweitz
a12981c776 [flang] Fix for both issues 274 and 278
Original-commit: flang-compiler/f18@9bb54046c7
Reviewed-on: https://github.com/flang-compiler/f18/pull/280
2019-02-08 10:53:18 -08:00
Eric Schweitz
748860b684 [flang] Fixes infinite loop in tests
Original-commit: flang-compiler/f18@2fa96b7734
Reviewed-on: https://github.com/flang-compiler/f18/pull/279
2019-02-07 16:41:18 -08:00
Eric Schweitz
a67099adbf [flang] identifier conformity
Original-commit: flang-compiler/f18@7d6e28f699
Reviewed-on: https://github.com/flang-compiler/f18/pull/276
2019-02-05 10:27:32 -08:00
Eric Schweitz
5c5fda8680 [flang] Issue flang-compiler/f18#274 - add separate scopes for each procedure in the module
Original-commit: flang-compiler/f18@d8f6b66178
Reviewed-on: https://github.com/flang-compiler/f18/pull/276
Tree-same-pre-rewrite: false
2019-02-05 09:43:51 -08:00
peter klausler
e30ef0ec8d [flang] Roll up small tweaks to parser and semantics.
Original-commit: flang-compiler/f18@57d823a809
Reviewed-on: https://github.com/flang-compiler/f18/pull/254
2019-01-07 15:38:48 -08:00
peter klausler
ce7f9653c2 [flang] reflect review comment
Original-commit: flang-compiler/f18@6f26bfb905
Reviewed-on: https://github.com/flang-compiler/f18/pull/241
2018-12-10 10:12:11 -08:00
peter klausler
47d1d07b44 [flang] More precise locations for construct name errors; some refactoring
Original-commit: flang-compiler/f18@2f35605d20
Reviewed-on: https://github.com/flang-compiler/f18/pull/241
Tree-same-pre-rewrite: false
2018-12-07 16:39:22 -08:00
Jean Perier
f7e7cb349b [flang] Changed .clang-format so that it will not add a comment after the closing brace of each namespace. Removed all such previous comments from all .cc and .h files
Original-commit: flang-compiler/f18@aa7f55e15f
Reviewed-on: https://github.com/flang-compiler/f18/pull/217
2018-10-25 05:55:23 -07:00
Eric Schweitz
30c7c99d54 [flang] Add more constraint checking for DO CONCURRENT.
Add some more tests.

Original-commit: flang-compiler/f18@e65f755fe1
Reviewed-on: https://github.com/flang-compiler/f18/pull/196
Tree-same-pre-rewrite: false
2018-10-24 12:22:42 -07:00
Eric Schweitz
9c02ffeec6 [flang] rename sayLabel SayLabel
Original-commit: flang-compiler/f18@040af06134
Reviewed-on: https://github.com/flang-compiler/f18/pull/185
2018-10-24 11:03:49 -07:00
Eric Schweitz
0df55dace7 [flang] Tweak the error messages to not use "here" like gcc does.
Original-commit: flang-compiler/f18@cb5da3d4e4
Reviewed-on: https://github.com/flang-compiler/f18/pull/185
Tree-same-pre-rewrite: false
2018-10-24 11:03:49 -07:00
Eric Schweitz
2ced09610b [flang] Improved error messages:
Update the tests to reflect new message
Improved error messages to show both source and destination of mismatches.

Use CharBlock::size.

Original-commit: flang-compiler/f18@bf79d77d3c
Reviewed-on: https://github.com/flang-compiler/f18/pull/185
Tree-same-pre-rewrite: false
2018-10-24 11:03:49 -07:00
Eric Schweitz
09a84c4d7d [flang] Fix a bug with BLOCK DATA name matching
Original-commit: flang-compiler/f18@f0af26df12
Reviewed-on: https://github.com/flang-compiler/f18/pull/189
2018-09-19 15:01:38 -07:00
Tim Keith
f5e29b175e [flang] Add explicit '= default' for move constructor.
Original-commit: flang-compiler/f18@7007a488ba
Reviewed-on: https://github.com/flang-compiler/f18/pull/186
Tree-same-pre-rewrite: false
2018-09-15 15:05:59 -07:00
Tim Keith
7edb7ec69b [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@771d0e1293
Reviewed-on: https://github.com/flang-compiler/f18/pull/186
Tree-same-pre-rewrite: false
2018-09-14 15:04:50 -07:00
Eric Schweitz
9ea2010677 [flang] Convert some of the functions to longer names.
Original-commit: flang-compiler/f18@6cb59e916c
Reviewed-on: https://github.com/flang-compiler/f18/pull/184
2018-09-13 15:46:17 -07:00
Eric Schweitz
43da7a187e [flang] Remove incorrect error message
Original-commit: flang-compiler/f18@9ef54520df
Reviewed-on: https://github.com/flang-compiler/f18/pull/184
Tree-same-pre-rewrite: false
2018-09-13 15:46:17 -07:00
Eric Schweitz
b1938138a7 [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@5fe62f108c
Reviewed-on: https://github.com/flang-compiler/f18/pull/184
Tree-same-pre-rewrite: false
2018-09-13 15:46:17 -07:00
peter klausler
6c6234be9e [flang] clean up for review
Original-commit: flang-compiler/f18@d3d81b1e6f
Reviewed-on: https://github.com/flang-compiler/f18/pull/183
Tree-same-pre-rewrite: false
2018-09-12 16:29:20 -07:00
Eric Schweitz
dba93d3fbe [flang] Fixes the Label vs. IntLiteralConstant issue flang-compiler/f18#180
Original-commit: flang-compiler/f18@40387158dc
Reviewed-on: https://github.com/flang-compiler/f18/pull/181
Tree-same-pre-rewrite: false
2018-09-11 16:26:19 -07:00
Eric Schweitz
6e38e225a4 [flang] tweak Legality
Original-commit: flang-compiler/f18@19834c65d7
Reviewed-on: https://github.com/flang-compiler/f18/pull/170
2018-09-11 14:01:25 -07:00
Eric Schweitz
412393babb [flang] clang-format doesn't
Original-commit: flang-compiler/f18@0114db6ced
Reviewed-on: https://github.com/flang-compiler/f18/pull/170
Tree-same-pre-rewrite: false
2018-09-11 14:01:25 -07:00
Eric Schweitz
e12f6121b9 [flang] Remove the strict F18 checking flag. Always check that program is
strictly conforming to F18, but demote errors to warnings when the
Fortran is legal under pre-F18 standards. If the Fortran is illegal
under F18 _and_ previous standards, then emit an error.

Original-commit: flang-compiler/f18@6d1f37683a
Reviewed-on: https://github.com/flang-compiler/f18/pull/170
Tree-same-pre-rewrite: false
2018-09-11 14:01:25 -07:00
Eric Schweitz
6265aed20e [flang] convert name to lowercase
Original-commit: flang-compiler/f18@f591d31ab4
Reviewed-on: https://github.com/flang-compiler/f18/pull/170
Tree-same-pre-rewrite: false
2018-09-11 14:01:25 -07:00
Eric Schweitz
b3a87d4e27 [flang] More renaming
Original-commit: flang-compiler/f18@9ef9ef4479
Reviewed-on: https://github.com/flang-compiler/f18/pull/170
Tree-same-pre-rewrite: false
2018-09-11 14:01:25 -07:00
Eric Schweitz
facd02405f [flang] Fix a couple other spots clang-format missed
Original-commit: flang-compiler/f18@1a4b12e1b2
Reviewed-on: https://github.com/flang-compiler/f18/pull/170
Tree-same-pre-rewrite: false
2018-09-11 14:01:25 -07:00
Eric Schweitz
51a48e542a [flang] clang-format didn't clean up some of the code. delete std::make_pair call.
Original-commit: flang-compiler/f18@4defccc50d
Reviewed-on: https://github.com/flang-compiler/f18/pull/170
Tree-same-pre-rewrite: false
2018-09-11 14:01:25 -07:00
Eric Schweitz
20cc4d5134 [flang] Simplify some of the if-return-else-return expansions while possibly
keeping things readable.

Original-commit: flang-compiler/f18@55b7e18763
Reviewed-on: https://github.com/flang-compiler/f18/pull/170
Tree-same-pre-rewrite: false
2018-09-11 14:01:25 -07:00
Eric Schweitz
8ad03ecf87 [flang] Per review:
Change initializer lists to use curlies.
Change uses of std::tuple to PODs & add ctors per compiler complaining.

Original-commit: flang-compiler/f18@42c5cdcaab
Reviewed-on: https://github.com/flang-compiler/f18/pull/170
Tree-same-pre-rewrite: false
2018-09-11 14:01:25 -07:00
Eric Schweitz
38ec0d0fce [flang] More review comment actions.
Original-commit: flang-compiler/f18@eb7ab3452d
Reviewed-on: https://github.com/flang-compiler/f18/pull/170
Tree-same-pre-rewrite: false
2018-09-11 14:01:25 -07:00
Eric Schweitz
603353d2ef [flang] Changes for the latest round of syntax change requests per the review.
Original-commit: flang-compiler/f18@0df221aeda
Reviewed-on: https://github.com/flang-compiler/f18/pull/170
Tree-same-pre-rewrite: false
2018-09-11 14:01:25 -07:00
Eric Schweitz
715a1ed493 [flang] Changes per the review comments. The majority of the changes are simply
to rename identifiers to meet the project (not LLVM) coding standard.
Includes a home brew of FileCheck for testing.

Original-commit: flang-compiler/f18@bb15490cc0
Reviewed-on: https://github.com/flang-compiler/f18/pull/170
Tree-same-pre-rewrite: false
2018-09-11 14:01:25 -07:00
Eric Schweitz
7bdf04b695 [flang] Use is_same<> templates
Original-commit: flang-compiler/f18@a47f6bacf0
Reviewed-on: https://github.com/flang-compiler/f18/pull/170
Tree-same-pre-rewrite: false
2018-09-11 14:01:25 -07:00
Eric Schweitz
69dc2e446f [flang] Merge up to new Messages interface
Original-commit: flang-compiler/f18@ca45fdd1cb
Reviewed-on: https://github.com/flang-compiler/f18/pull/170
Tree-same-pre-rewrite: false
2018-09-11 14:01:25 -07:00
Eric Schweitz
df4575f6b9 [flang] Add label resolution design document, pass, and tests
Original-commit: flang-compiler/f18@e0d0df900c
Reviewed-on: https://github.com/flang-compiler/f18/pull/170
Tree-same-pre-rewrite: false
2018-09-11 14:01:25 -07:00