peter klausler
3ed22efb75
[flang] silence a warning
...
Original-commit: flang-compiler/f18@dc91727ac4
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-27 12:43:16 -07:00
peter klausler
9702fcaf97
[flang] More Clang work.
...
Original-commit: flang-compiler/f18@7ff98ad778
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-27 12:37:47 -07:00
peter klausler
3fd2c17cf2
[flang] Use libc++ with clang.
...
Original-commit: flang-compiler/f18@d81b8d87f8
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-26 17:03:54 -07:00
peter klausler
b9ee2fc6ae
[flang] Use first() to define operator|| when compiling with clang.
...
Original-commit: flang-compiler/f18@7bf98d683c
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-26 16:52:11 -07:00
peter klausler
c3e406eb27
[flang] Remove excess space at end of line.
...
Original-commit: flang-compiler/f18@900dc4e254
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-26 16:27:07 -07:00
peter klausler
dd57a6e695
[flang] Refine CMakeLists.txt tweaks.
...
Original-commit: flang-compiler/f18@b40c68f9ab
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-26 16:16:01 -07:00
peter klausler
ba4ee64c9d
[flang] Package clang build settings.
...
Original-commit: flang-compiler/f18@775b42598d
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-26 16:03:01 -07:00
peter klausler
022a91b637
[flang] Patches to permit building with Clang without notes or warnings.
...
Original-commit: flang-compiler/f18@0e74b10603
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-26 15:44:29 -07:00
peter klausler
8fa4baa5e8
[flang] Use first() more.
...
Original-commit: flang-compiler/f18@a2f2fdf869
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-25 14:16:15 -07:00
peter klausler
6a0acd8505
[flang] Implement first(...) as attempt at a faster set of alternatives.
...
Original-commit: flang-compiler/f18@9f6a26cee6
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-25 14:16:15 -07:00
peter klausler
9e94216abe
[flang] Attempt to build f18 with clang.
...
Original-commit: flang-compiler/f18@0480837234
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-25 14:16:15 -07:00
peter klausler
016fa9cf17
[flang] Attempt to build f18 with clang.
...
Original-commit: flang-compiler/f18@86fec97e41
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-25 14:16:14 -07:00
peter klausler
66c98ee4ca
[flang] Resolve an old TODO by flattening a std::optional<std::optional<>>.
...
Original-commit: flang-compiler/f18@05f47831fc
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-25 14:16:14 -07:00
peter klausler
69e3842d60
[flang] Resolve old TODO about needless Indirection<>.
...
Original-commit: flang-compiler/f18@5f289209c4
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-25 14:16:12 -07:00
Tim Keith
0ceb4abf1a
[flang] Merge pull request flang-compiler/f18#70 from ThePortlandGroup/tsk2
...
Initial support for name resolution in modules.
Original-commit: flang-compiler/f18@1c318fe9f7
Reviewed-on: https://github.com/flang-compiler/f18/pull/70
2018-04-25 12:52:06 -07:00
Tim Keith
5b7fb2aa3a
[flang] Improve comment.
...
Original-commit: flang-compiler/f18@270514a30b
Reviewed-on: https://github.com/flang-compiler/f18/pull/70
2018-04-25 11:49:29 -07:00
Tim Keith
dd0f1ff81d
[flang] Remove unnecessary defaults in switches.
...
Original-commit: flang-compiler/f18@f4835e3831
Reviewed-on: https://github.com/flang-compiler/f18/pull/70
Tree-same-pre-rewrite: false
2018-04-25 11:44:12 -07:00
Tim Keith
cb37c3625a
[flang] Non-fatal error for repeated access spec
...
When an access statement repeats the same attribute, make it a non-fatal
diagnostic. Also, include the previous specification in the message.
resolve11.f90 now illustrates both cases, fatal and non-fatal.
Original-commit: flang-compiler/f18@1f567c740a
Reviewed-on: https://github.com/flang-compiler/f18/pull/70
Tree-same-pre-rewrite: false
2018-04-25 10:46:39 -07:00
Tim Keith
94fa0fd890
[flang] Initial support for name resolution in modules.
...
Recognize modules and open and close the corresponding scope.
Handle PUBLIC and PRIVATE statements and set the corresponding
attributes on entity declarations in the module.
Refactoring (no functional changes): Make CheckImplicitSymbol() and
GetVariableName() overloadings private and out-of-line.
Add missing option to f18 help.
Original-commit: flang-compiler/f18@d01cacca63
Reviewed-on: https://github.com/flang-compiler/f18/pull/70
Tree-same-pre-rewrite: false
2018-04-24 17:07:15 -07:00
Peter Klausler
1e3af84738
[flang] Merge pull request flang-compiler/f18#69 from ThePortlandGroup/pmk3
...
Make `construct<T>(...)` calls span more accurate source ranges.
Original-commit: flang-compiler/f18@e332daec7a
Reviewed-on: https://github.com/flang-compiler/f18/pull/69
2018-04-24 16:34:01 -07:00
peter klausler
e1ac262cc0
[flang] Remove dead code, reformat.
...
Original-commit: flang-compiler/f18@c87fdd8cd9
Reviewed-on: https://github.com/flang-compiler/f18/pull/69
2018-04-24 16:27:01 -07:00
peter klausler
2a61c691e8
[flang] Reformat.
...
Original-commit: flang-compiler/f18@047de95439
Reviewed-on: https://github.com/flang-compiler/f18/pull/69
Tree-same-pre-rewrite: false
2018-04-24 15:26:50 -07:00
peter klausler
29a6c1a83c
[flang] Allow construct<T>("TOKEN"_tok)" with unvalued parser argument.
...
Original-commit: flang-compiler/f18@19d2a4a849
Reviewed-on: https://github.com/flang-compiler/f18/pull/69
Tree-same-pre-rewrite: false
2018-04-24 15:02:41 -07:00
peter klausler
817163f9f5
[flang] Add constructIf<>(); complete pass over grammar.
...
Original-commit: flang-compiler/f18@4d5b4055bd
Reviewed-on: https://github.com/flang-compiler/f18/pull/69
Tree-same-pre-rewrite: false
2018-04-24 12:41:34 -07:00
peter klausler
fb1397ba57
[flang] Adjust productions in grammar.h so that construct<> invocations span what they cover (more to come)
...
Original-commit: flang-compiler/f18@ba5c2368d1
Reviewed-on: https://github.com/flang-compiler/f18/pull/69
Tree-same-pre-rewrite: false
2018-04-24 12:41:33 -07:00
Tim Keith
4859bf7db8
[flang] Merge pull request flang-compiler/f18#67 from ThePortlandGroup/tsk3
...
Create Message instances with provenance range.
Original-commit: flang-compiler/f18@6e473cd029
Reviewed-on: https://github.com/flang-compiler/f18/pull/67
2018-04-24 12:30:09 -07:00
Tim Keith
511af19d41
[flang] Create Message instances with provenance range.
...
This allows the message to point to the full name or statement
rather than just the first character.
Original-commit: flang-compiler/f18@9cf41b1335
Reviewed-on: https://github.com/flang-compiler/f18/pull/67
2018-04-23 16:18:48 -07:00
Peter Klausler
82fd470b91
[flang] Merge pull request flang-compiler/f18#68 from ThePortlandGroup/pmk-scrub2
...
Remove needless empty braces from construct<>() calls.
Original-commit: flang-compiler/f18@d7609befe6
Reviewed-on: https://github.com/flang-compiler/f18/pull/68
2018-04-24 10:45:23 -07:00
peter klausler
925cadcddc
[flang] Remove needless empty braces from construct<>() calls.
...
Original-commit: flang-compiler/f18@f9c4a27034
Reviewed-on: https://github.com/flang-compiler/f18/pull/68
2018-04-23 16:53:16 -07:00
Peter Klausler
758fb308ef
[flang] Merge pull request flang-compiler/f18#66 from ThePortlandGroup/pmk-scrub
...
Code clean-up & provenance ranges on messages
Original-commit: flang-compiler/f18@fd50389e44
Reviewed-on: https://github.com/flang-compiler/f18/pull/66
2018-04-23 15:54:38 -07:00
peter klausler
64e64e6747
[flang] Delete more dead code.
...
Original-commit: flang-compiler/f18@e38e411ccf
Reviewed-on: https://github.com/flang-compiler/f18/pull/66
2018-04-23 15:44:30 -07:00
peter klausler
e42168a903
[flang] Remove dead code.
...
Original-commit: flang-compiler/f18@a85e16c704
Reviewed-on: https://github.com/flang-compiler/f18/pull/66
Tree-same-pre-rewrite: false
2018-04-23 15:44:29 -07:00
peter klausler
e6b1f1f45e
[flang] Use ranges of provenances in messages.
...
Original-commit: flang-compiler/f18@67d4f878a4
Reviewed-on: https://github.com/flang-compiler/f18/pull/66
Tree-same-pre-rewrite: false
2018-04-23 15:44:29 -07:00
peter klausler
d3c1a08e68
[flang] Extend Message representation to cover ranges.
...
Original-commit: flang-compiler/f18@314819c87f
Reviewed-on: https://github.com/flang-compiler/f18/pull/66
Tree-same-pre-rewrite: false
2018-04-23 15:44:28 -07:00
peter klausler
30f337a36d
[flang] Finish cleaning up debug-parser.
...
Original-commit: flang-compiler/f18@0ef551025a
Reviewed-on: https://github.com/flang-compiler/f18/pull/66
Tree-same-pre-rewrite: false
2018-04-23 15:44:28 -07:00
peter klausler
cc589b2e8e
[flang] Split debug-parser.h, put code into debug-parser.cc.
...
Original-commit: flang-compiler/f18@b34d15ef6d
Reviewed-on: https://github.com/flang-compiler/f18/pull/66
Tree-same-pre-rewrite: false
2018-04-23 15:44:27 -07:00
peter klausler
d2306759fc
[flang] Finish moving user state action parsers into user-state.{h,cc}.
...
Original-commit: flang-compiler/f18@79c8a4cefe
Reviewed-on: https://github.com/flang-compiler/f18/pull/66
Tree-same-pre-rewrite: false
2018-04-23 15:44:27 -07:00
peter klausler
4412cb03c4
[flang] More clean-up.
...
Original-commit: flang-compiler/f18@96dda92286
Reviewed-on: https://github.com/flang-compiler/f18/pull/66
Tree-same-pre-rewrite: false
2018-04-23 15:44:26 -07:00
peter klausler
8800ae5e08
[flang] Begin moving UserState action parsers into user-state.{h,cc}.
...
Original-commit: flang-compiler/f18@5c31402146
Reviewed-on: https://github.com/flang-compiler/f18/pull/66
Tree-same-pre-rewrite: false
2018-04-23 15:44:25 -07:00
peter klausler
8c110e0af1
[flang] Fix header file name.
...
Original-commit: flang-compiler/f18@8abfeaed45
Reviewed-on: https://github.com/flang-compiler/f18/pull/66
Tree-same-pre-rewrite: false
2018-04-23 15:44:24 -07:00
peter klausler
48704ef940
[flang] Move Parser<> to its own header.
...
Original-commit: flang-compiler/f18@c43e8ba138
Reviewed-on: https://github.com/flang-compiler/f18/pull/66
Tree-same-pre-rewrite: false
2018-04-23 15:44:23 -07:00
peter klausler
c387b6d4e4
[flang] Use references for ParseState arguments to parsers. Other minor clean-up.
...
Original-commit: flang-compiler/f18@5b18b799e7
Reviewed-on: https://github.com/flang-compiler/f18/pull/66
Tree-same-pre-rewrite: false
2018-04-23 15:44:23 -07:00
Tim Keith
9c840631e7
[flang] Merge pull request flang-compiler/f18#65 from ThePortlandGroup/tsk2
...
Rewrite function calls to array element references
Original-commit: flang-compiler/f18@1dc8d27250
Reviewed-on: https://github.com/flang-compiler/f18/pull/65
2018-04-23 15:38:21 -07:00
Tim Keith
dfd2bcbd3c
[flang] Undo previous commit.
...
`name` depends on the template type, so we have to explicitly say
that `has` is a template with the `template` keyword.
Rather than do that I'm putting back the explicit type for name.
Original-commit: flang-compiler/f18@0cde87f2fe
Reviewed-on: https://github.com/flang-compiler/f18/pull/65
2018-04-23 15:33:59 -07:00
Tim Keith
30af7449d9
[flang] Address review comment.
...
Original-commit: flang-compiler/f18@cb3904761b
Reviewed-on: https://github.com/flang-compiler/f18/pull/65
Tree-same-pre-rewrite: false
2018-04-23 13:10:33 -07:00
Tim Keith
744427238c
[flang] Rewrite function calls to array element references
...
parse-tree.h, parse-tree.cc:
Add FunctionReference::ConvertToArrayElementRef() to convert a function
reference to an array element reference.
Factor out MakeArrayElementRef() to use in ConvertToArrayElementRef()
and also in converting statement functions to array element assignments.
resolve-names.cc:
Recognize references to functions and subroutines and add symbols for them.
Detect declaration conflicts from these and check `IMPLICIT NONE(EXTERNAL)`.
rewrite-parse-tree.cc:
Find function references that need to be converted and rewrite them.
Original-commit: flang-compiler/f18@e5a1e0aaef
Reviewed-on: https://github.com/flang-compiler/f18/pull/65
2018-04-23 12:46:56 -07:00
Peter Klausler
fee104eac0
[flang] Merge pull request flang-compiler/f18#62 from ThePortlandGroup/pmk-instr
...
Parser instrumentation and caching of failed parse attempts
Original-commit: flang-compiler/f18@30040ed22e
Reviewed-on: https://github.com/flang-compiler/f18/pull/62
2018-04-20 10:42:03 -07:00
peter klausler
7335482d98
[flang] Complete parser instrumentation and caching of failures.
...
Original-commit: flang-compiler/f18@9843dbf211
Reviewed-on: https://github.com/flang-compiler/f18/pull/62
2018-04-19 17:02:12 -07:00
peter klausler
56b09e08eb
[flang] Parser instrumentation and fail-fast experiment begun.
...
Original-commit: flang-compiler/f18@ab46163d6e
Reviewed-on: https://github.com/flang-compiler/f18/pull/62
Tree-same-pre-rewrite: false
2018-04-19 15:46:02 -07:00
peter klausler
2c06be3fb8
[flang] First cut at parser instrumentation with pass/fail counters.
...
Original-commit: flang-compiler/f18@21ed700afa
Reviewed-on: https://github.com/flang-compiler/f18/pull/62
Tree-same-pre-rewrite: false
2018-04-19 13:58:02 -07:00