peter klausler [Mon, 18 Mar 2019 19:19:35 +0000 (12:19 -0700)]
[flang] Squash spaces in generic specs.
Original-commit: flang-compiler/f18@
bd5e29f5f807abf58c9169f96ce944e600a02cae
Reviewed-on: https://github.com/flang-compiler/f18/pull/339
Tree-same-pre-rewrite: false
Peter Klausler [Sun, 17 Mar 2019 23:16:19 +0000 (16:16 -0700)]
[flang] Merge pull request flang-compiler/f18#336 from flang-compiler/pmk-fixes
Fix parse of .TRUE._8
Original-commit: flang-compiler/f18@
5e44e67f784dee20067c9ac6ec67080126e57908
Reviewed-on: https://github.com/flang-compiler/f18/pull/336
peter klausler [Sat, 16 Mar 2019 17:04:18 +0000 (10:04 -0700)]
[flang] Fix parse of .TRUE._8
Original-commit: flang-compiler/f18@
b03e7a691d21f84b53a04ed71327720f5500c924
Reviewed-on: https://github.com/flang-compiler/f18/pull/336
Eric Schweitz [Sat, 16 Mar 2019 16:56:33 +0000 (09:56 -0700)]
[flang] Merge pull request flang-compiler/f18#334 from flang-compiler/eas0
FIR sync: replace the stubs for translating terminal symbols to expressions; st…
Original-commit: flang-compiler/f18@
0a93e2c393c67448f7a0494a2fef47612fd664f0
Reviewed-on: https://github.com/flang-compiler/f18/pull/334
Eric [Sat, 16 Mar 2019 01:57:52 +0000 (18:57 -0700)]
[flang] more compiler warnings
Original-commit: flang-compiler/f18@
df8c83c106ee5f8ab7c66f5ad6a87bf8571860bf
Reviewed-on: https://github.com/flang-compiler/f18/pull/334
Eric Schweitz [Fri, 15 Mar 2019 19:50:27 +0000 (12:50 -0700)]
[flang] review comments
Original-commit: flang-compiler/f18@
1ba1c0268f293c3b6652d313e68a87cc118f71e3
Reviewed-on: https://github.com/flang-compiler/f18/pull/334
Tree-same-pre-rewrite: false
Eric Schweitz [Fri, 15 Mar 2019 18:35:18 +0000 (11:35 -0700)]
[flang] muzzle clang++ warnings
Original-commit: flang-compiler/f18@
02decb4040e4e7c57a6404adef17215ce8f276a5
Reviewed-on: https://github.com/flang-compiler/f18/pull/334
Tree-same-pre-rewrite: false
Eric Schweitz [Tue, 12 Mar 2019 14:36:36 +0000 (07:36 -0700)]
[flang] replace the stubs for translating terminal symbols to expressions; start pushing Value type into FIR; cleanup terminator succ_blocks; remove parser element from disassociate; run clang-format; etc.
Original-commit: flang-compiler/f18@
c5561646ea4f72431174f28131a49426b8a03495
Reviewed-on: https://github.com/flang-compiler/f18/pull/334
Tree-same-pre-rewrite: false
Peter Klausler [Fri, 15 Mar 2019 22:59:25 +0000 (15:59 -0700)]
[flang] Merge pull request flang-compiler/f18#335 from flang-compiler/pmk-spec
Some tweaks to preprocess & parse all Fortran in SPEC CPUv6
Original-commit: flang-compiler/f18@
b2828f1318e31917558c28d7ca695234b9ba9b4b
Reviewed-on: https://github.com/flang-compiler/f18/pull/335
peter klausler [Fri, 15 Mar 2019 22:19:27 +0000 (15:19 -0700)]
[flang] Document extension
Original-commit: flang-compiler/f18@
ca2a7dc5a8af1079a832407c23acfbbb3a12c17f
Reviewed-on: https://github.com/flang-compiler/f18/pull/335
peter klausler [Fri, 15 Mar 2019 22:01:54 +0000 (15:01 -0700)]
[flang] Final tweaks, can now parse all SPEC CPUv6
Original-commit: flang-compiler/f18@
015152f1ba44bf938fc581622b89130e73a5c144
Reviewed-on: https://github.com/flang-compiler/f18/pull/335
Tree-same-pre-rewrite: false
peter klausler [Fri, 15 Mar 2019 20:57:41 +0000 (13:57 -0700)]
[flang] more spec work, handle classic C comments
Original-commit: flang-compiler/f18@
d901ee7f500df48c81d786a2f9fcef4c65049d2f
Reviewed-on: https://github.com/flang-compiler/f18/pull/335
Tree-same-pre-rewrite: false
peter klausler [Fri, 15 Mar 2019 17:50:15 +0000 (10:50 -0700)]
[flang] Accomodate missing clock_gettime(); remove f18-parse-demo dependence on lib/evaluate; allow #ifdef with no name
Original-commit: flang-compiler/f18@
330fd8116febab2416afeb8c08d6216c1edd9e55
Reviewed-on: https://github.com/flang-compiler/f18/pull/335
Tree-same-pre-rewrite: false
Peter Klausler [Fri, 15 Mar 2019 00:28:35 +0000 (17:28 -0700)]
[flang] Merge pull request flang-compiler/f18#330 from flang-compiler/pmk-parse-demo
f18-parse-demo
Original-commit: flang-compiler/f18@
ec7b68f596ec61c523717c805885b5662e37e119
Reviewed-on: https://github.com/flang-compiler/f18/pull/330
peter klausler [Thu, 14 Mar 2019 23:40:55 +0000 (16:40 -0700)]
[flang] Add reference to libFortranEvaluate for destructor
Original-commit: flang-compiler/f18@
db6fb0f8cdfc9033b874662b48240ead57efcc74
Reviewed-on: https://github.com/flang-compiler/f18/pull/330
peter klausler [Thu, 14 Mar 2019 23:28:06 +0000 (16:28 -0700)]
[flang] Move dump-parse-tree.h from semantics into parser.
Original-commit: flang-compiler/f18@
9075adfcdf5a300471c9bd5512674ec33a9ad90d
Reviewed-on: https://github.com/flang-compiler/f18/pull/330
Tree-same-pre-rewrite: false
peter klausler [Wed, 13 Mar 2019 23:31:16 +0000 (16:31 -0700)]
[flang] address review comments
Original-commit: flang-compiler/f18@
be7dbdab0a0aab0b13ab020b7b2ffafd0ca63601
Reviewed-on: https://github.com/flang-compiler/f18/pull/330
Tree-same-pre-rewrite: false
peter klausler [Wed, 13 Mar 2019 23:05:05 +0000 (16:05 -0700)]
[flang] f18-parse-demo
Original-commit: flang-compiler/f18@
96d9aefc4f31898e104409d06b0d5d4d97007857
Reviewed-on: https://github.com/flang-compiler/f18/pull/330
Tree-same-pre-rewrite: false
Peter Klausler [Thu, 14 Mar 2019 23:17:30 +0000 (16:17 -0700)]
[flang] Merge pull request flang-compiler/f18#333 from flang-compiler/pmk-include-in-continuation
Fixes and extensions to get WRF to parse
Original-commit: flang-compiler/f18@
338a8578569132d9fa9749617e9b11ada5b729dd
Reviewed-on: https://github.com/flang-compiler/f18/pull/333
peter klausler [Thu, 14 Mar 2019 21:51:40 +0000 (14:51 -0700)]
[flang] Get clean -fparse-only pass over WRF
Original-commit: flang-compiler/f18@
ffe517abc6bdc481248308156dec6d48089e8269
Reviewed-on: https://github.com/flang-compiler/f18/pull/333
peter klausler [Thu, 14 Mar 2019 20:53:35 +0000 (13:53 -0700)]
[flang] WRF preprocessing tweaks
Original-commit: flang-compiler/f18@
53f76e1c93a9df2afb7ce6689f9abee5cef6793c
Reviewed-on: https://github.com/flang-compiler/f18/pull/333
Tree-same-pre-rewrite: false
peter klausler [Thu, 14 Mar 2019 19:19:26 +0000 (12:19 -0700)]
[flang] checkpoint
Original-commit: flang-compiler/f18@
0c9bdc70328e3e6fb752c84c84f5d6cda0b4316d
Reviewed-on: https://github.com/flang-compiler/f18/pull/333
Tree-same-pre-rewrite: false
Eric Schweitz [Thu, 14 Mar 2019 19:26:25 +0000 (12:26 -0700)]
[flang] Merge pull request flang-compiler/f18#332 from flang-compiler/eas1
fix typo
Original-commit: flang-compiler/f18@
4097d8a89088168380b6cf19171bdf6ffbf56056
Reviewed-on: https://github.com/flang-compiler/f18/pull/332
Eric Schweitz [Thu, 14 Mar 2019 19:11:08 +0000 (12:11 -0700)]
[flang] fix typo
Original-commit: flang-compiler/f18@
fc88b92af0952476b2f592b5bfb08e4d4d120ca3
Reviewed-on: https://github.com/flang-compiler/f18/pull/332
Tim Keith [Thu, 14 Mar 2019 17:09:28 +0000 (10:09 -0700)]
[flang] Merge pull request flang-compiler/f18#331 from flang-compiler/tsk10
Change default for LINK_WITH_FIR to ON.
Original-commit: flang-compiler/f18@
ea8944908956f73fb123b6cf4053753b98f28427
Reviewed-on: https://github.com/flang-compiler/f18/pull/331
Tim Keith [Thu, 14 Mar 2019 16:08:27 +0000 (09:08 -0700)]
[flang] Change default for LINK_WITH_FIR to ON.
Original-commit: flang-compiler/f18@
b13f99446339666859eb00e896e8d1751423892a
Reviewed-on: https://github.com/flang-compiler/f18/pull/331
Tim Keith [Thu, 14 Mar 2019 14:23:03 +0000 (07:23 -0700)]
[flang] Merge pull request flang-compiler/f18#329 from flang-compiler/tsk10
Add cmake option to link with FIR and LLVM
Original-commit: flang-compiler/f18@
ddb43b33ccf52e9083a90d11f00b6a85667617ed
Reviewed-on: https://github.com/flang-compiler/f18/pull/329
Tim Keith [Wed, 13 Mar 2019 19:41:15 +0000 (12:41 -0700)]
[flang] Add cmake option to link with FIR and LLVM
The cmake option -DLINK_WITH_FIR=ON causes the f18 driver to be linked
against FIR and LLVM. When it is set to OFF (the default), the call into
FIR is #ifdef'd out.
The source in lib/FIR is always built; this option only affects linking.
Original-commit: flang-compiler/f18@
69569edd4c6abbb7a66c0d8f3595858693a06996
Reviewed-on: https://github.com/flang-compiler/f18/pull/329
Eric Schweitz [Tue, 12 Mar 2019 14:36:01 +0000 (07:36 -0700)]
[flang] Merge pull request flang-compiler/f18#328 from flang-compiler/eas0
remove unused files and clean up unused warnings
Original-commit: flang-compiler/f18@
67ef747557f254d3fb3692bd7eba720a29ad69df
Reviewed-on: https://github.com/flang-compiler/f18/pull/328
Eric Schweitz [Tue, 12 Mar 2019 01:37:30 +0000 (18:37 -0700)]
[flang] Move virtual dtor to Terminator
Original-commit: flang-compiler/f18@
68853d602a6a2c21f4f19b91b58fec1f88473dd6
Reviewed-on: https://github.com/flang-compiler/f18/pull/328
Eric Schweitz [Mon, 11 Mar 2019 16:50:28 +0000 (09:50 -0700)]
[flang] remove unused files
Cleanup some warnings when building with clang.
Original-commit: flang-compiler/f18@
33cf6255d1431a8fa0a30fb4b883615de17bcbb7
Reviewed-on: https://github.com/flang-compiler/f18/pull/328
Tree-same-pre-rewrite: false
jeanPerier [Tue, 12 Mar 2019 08:27:00 +0000 (01:27 -0700)]
[flang] Silence clang warning related to ISO_Fortran_binding.h usage in C++
Original-commit: flang-compiler/f18@
85b7f370b4b1e41186bc2cfb7cf55d279085b1d5
Jean Perier [Mon, 11 Mar 2019 18:33:54 +0000 (11:33 -0700)]
[flang] address comments
Original-commit: flang-compiler/f18@
7b1fc24265b694ed365879e974810744911f12a2
Jean Perier [Mon, 11 Mar 2019 17:34:35 +0000 (10:34 -0700)]
[flang] remove unused CFI_ISO_FORTRAN_BINDING_FLEXIBLE_ARRAY
Original-commit: flang-compiler/f18@
3cf9a625bf6b7c2a62b29074f31a564cc51e5df0
Tree-same-pre-rewrite: false
Jean Perier [Mon, 11 Mar 2019 17:21:16 +0000 (10:21 -0700)]
[flang] Silence clang warning from ISO_Fortran_binding.h usage in C++
Original-commit: flang-compiler/f18@
88eb833b14e3f91285605dd4db0e0c021df7fa4c
Tree-same-pre-rewrite: false
Steve Scalpone [Tue, 12 Mar 2019 03:23:18 +0000 (20:23 -0700)]
[flang] Merge pull request flang-compiler/f18#326 from flang-compiler/BUILD_WITH_CLANG_LIBRARIES
Update CMakeList.txt to allow linking with LLVM libc++
Original-commit: flang-compiler/f18@
866e188de60e5811882c4c1ea75daa2b448b7b0b
Reviewed-on: https://github.com/flang-compiler/f18/pull/326
Steve Scalpone [Mon, 11 Mar 2019 17:49:46 +0000 (10:49 -0700)]
[flang] To use LLVM's libc++ instead of GCC's libstdc++, define
BUILD_WITH_CLANG_LIBRARIES on the cmake command line to
be the path to a clang installation with bin, lib, etc.
For this to work, BUILD_WITH_CLANG must be defined too.
Original-commit: flang-compiler/f18@
a36d5fee421f2e90293540335c5b887412e31383
Reviewed-on: https://github.com/flang-compiler/f18/pull/326
Peter Klausler [Mon, 11 Mar 2019 22:38:28 +0000 (15:38 -0700)]
[flang] Merge pull request flang-compiler/f18#327 from flang-compiler/pmk-nofir
Emergency temporary patch to fix build
Original-commit: flang-compiler/f18@
06d71f72a5c97ac7be5cde0150cc6738772ba94a
Reviewed-on: https://github.com/flang-compiler/f18/pull/327
peter klausler [Mon, 11 Mar 2019 22:01:27 +0000 (15:01 -0700)]
[flang] Temporarily disconnect FIR from f18.cc build
Original-commit: flang-compiler/f18@
c610bc2744ad56adae8de09a81069a2c3df396e7
Reviewed-on: https://github.com/flang-compiler/f18/pull/327
Eric Schweitz [Mon, 11 Mar 2019 18:02:32 +0000 (11:02 -0700)]
[flang] Merge pull request flang-compiler/f18#324 from flang-compiler/eas0
Revisions for review comments.
Original-commit: flang-compiler/f18@
5b066774b0c03a45dff94d2ccdf071a7690aabe5
Reviewed-on: https://github.com/flang-compiler/f18/pull/324
Eric Schweitz [Mon, 11 Mar 2019 16:36:37 +0000 (09:36 -0700)]
[flang] Revisions for review comments.
Original-commit: flang-compiler/f18@
1a03f7d5bbf6b0f74a54736a906ea4a1e301f0e9
Reviewed-on: https://github.com/flang-compiler/f18/pull/324
Eric Schweitz [Mon, 11 Mar 2019 16:37:31 +0000 (09:37 -0700)]
[flang] Merge pull request flang-compiler/f18#323 from flang-compiler/eas0
Fix build breakage
Original-commit: flang-compiler/f18@
46e416acc7d318d7681e17f4e10812b4ad6f626b
Reviewed-on: https://github.com/flang-compiler/f18/pull/323
Eric Schweitz [Mon, 11 Mar 2019 16:16:01 +0000 (09:16 -0700)]
[flang] Fix build breakage
Original-commit: flang-compiler/f18@
72d003f89d523f84cfab6ed048897be6bcb7ed92
Reviewed-on: https://github.com/flang-compiler/f18/pull/323
Eric Schweitz [Mon, 11 Mar 2019 16:01:14 +0000 (09:01 -0700)]
[flang] Merge pull request flang-compiler/f18#319 from flang-compiler/eas0
FIR update
Original-commit: flang-compiler/f18@
3f6f710889c68207573ea9eddc962270590a2669
Reviewed-on: https://github.com/flang-compiler/f18/pull/319
Eric Schweitz [Fri, 8 Mar 2019 16:26:37 +0000 (08:26 -0800)]
[flang] Address review comments; merge with latest breaking changes on master
Original-commit: flang-compiler/f18@
ffde96d4866c25c3267332963363d4b6c523325d
Reviewed-on: https://github.com/flang-compiler/f18/pull/319
Eric Schweitz [Thu, 7 Mar 2019 22:34:11 +0000 (14:34 -0800)]
[flang] Run old clang-format over FIR directory
Original-commit: flang-compiler/f18@
0616ac43ecea4b60bb076fb67c2a284cb94835fb
Reviewed-on: https://github.com/flang-compiler/f18/pull/319
Tree-same-pre-rewrite: false
Eric Schweitz [Thu, 7 Mar 2019 21:38:48 +0000 (13:38 -0800)]
[flang] Repairs for new interfaces
Original-commit: flang-compiler/f18@
1a080dfe6a0e87879458cac76fe809eb92437b21
Reviewed-on: https://github.com/flang-compiler/f18/pull/319
Tree-same-pre-rewrite: false
Eric Schweitz [Fri, 1 Mar 2019 18:19:53 +0000 (10:19 -0800)]
[flang] FIR statements: various reworking of the code to decompose some
operations, get rid of unneeded nodes, restructure DO loops, etc.
Original-commit: flang-compiler/f18@
0e0d67fbdae307b63f31ade0a990db8f00fed251
Reviewed-on: https://github.com/flang-compiler/f18/pull/319
Tree-same-pre-rewrite: false
Eric Schweitz [Thu, 28 Feb 2019 20:26:43 +0000 (12:26 -0800)]
[flang] react to more review comments
Original-commit: flang-compiler/f18@
b685d8a588287ac7683fd5626023c0de70fcc69b
Reviewed-on: https://github.com/flang-compiler/f18/pull/319
Tree-same-pre-rewrite: false
Eric Schweitz [Thu, 28 Feb 2019 18:20:01 +0000 (10:20 -0800)]
[flang] cleanup merge
Original-commit: flang-compiler/f18@
ea00eab799cd8e5312d45d8c97bc9a5a3c6a3ba9
Reviewed-on: https://github.com/flang-compiler/f18/pull/319
Tree-same-pre-rewrite: false
Eric Schweitz [Wed, 20 Feb 2019 16:57:05 +0000 (08:57 -0800)]
[flang] Fixes for building with clang++ and other misc. from review
Original-commit: flang-compiler/f18@
c3cdc327863036213dab26abf9e97f23a968c197
Reviewed-on: https://github.com/flang-compiler/f18/pull/319
Tree-same-pre-rewrite: false
Eric Schweitz [Sat, 23 Feb 2019 00:50:03 +0000 (16:50 -0800)]
[flang] Move over build recipes and rename the library
Original-commit: flang-compiler/f18@
51476aa1786de4b98b8189f256ba602298fd4903
Reviewed-on: https://github.com/flang-compiler/f18/pull/319
Tree-same-pre-rewrite: false
Eric Schweitz [Tue, 30 Oct 2018 23:01:39 +0000 (16:01 -0700)]
[flang] Fortran Intermediate Representation: initial draft based on "CFG" note.
Original-commit: flang-compiler/f18@
b7a759539467268c250b239f2e62c854f41ae46e
Reviewed-on: https://github.com/flang-compiler/f18/pull/319
Tree-same-pre-rewrite: false
Peter Klausler [Sat, 9 Mar 2019 18:59:20 +0000 (10:59 -0800)]
[flang] Merge pull request flang-compiler/f18#322 from flang-compiler/pmk-struct-constr-disambig
Fix two ambiguous parsing cases by patching parse tree in expression semantics
Original-commit: flang-compiler/f18@
d4807f136419b075adcaf38b0129ba7e79c994df
Reviewed-on: https://github.com/flang-compiler/f18/pull/322
peter klausler [Sat, 9 Mar 2019 18:24:27 +0000 (10:24 -0800)]
[flang] Address review comment
Original-commit: flang-compiler/f18@
8a9a41487e809e61b173b07f629a8e0251a8b921
Reviewed-on: https://github.com/flang-compiler/f18/pull/322
peter klausler [Sat, 9 Mar 2019 00:35:39 +0000 (16:35 -0800)]
[flang] Fix misparsings of substrings in the parse tree, not in expressions.
Original-commit: flang-compiler/f18@
53d0e26d922d2a7d99599a0f6b7c9a2aa0854007
Reviewed-on: https://github.com/flang-compiler/f18/pull/322
Tree-same-pre-rewrite: false
peter klausler [Fri, 8 Mar 2019 23:16:30 +0000 (15:16 -0800)]
[flang] add structconst04.f90 test and fixes to pass it
Original-commit: flang-compiler/f18@
d857c843f5ef2125e9675eb22f013b225a399a38
Reviewed-on: https://github.com/flang-compiler/f18/pull/322
Tree-same-pre-rewrite: false
peter klausler [Fri, 8 Mar 2019 20:55:57 +0000 (12:55 -0800)]
[flang] Resolve misparse of structure constructor as function reference.
Original-commit: flang-compiler/f18@
5b6b2540f6c66b3f2900b24b06d732de3436b4ea
Reviewed-on: https://github.com/flang-compiler/f18/pull/322
Tree-same-pre-rewrite: false
Tim Keith [Sat, 9 Mar 2019 16:55:41 +0000 (08:55 -0800)]
[flang] Merge pull request flang-compiler/f18#321 from flang-compiler/tsk3
Remove build dependency on clang
Original-commit: flang-compiler/f18@
737998bb508819772a4f46f10c7d8d9cfaef9070
Reviewed-on: https://github.com/flang-compiler/f18/pull/321
Tim Keith [Fri, 8 Mar 2019 23:16:58 +0000 (15:16 -0800)]
[flang] Remove build dependency on clang
For now all we need to depend on is LLVM.
Use llvm_map_components_to_libnames to find libraries to link against.
Original-commit: flang-compiler/f18@
dff1402c2a781b7fff5c691b45e6a7f2e3a6ef61
Reviewed-on: https://github.com/flang-compiler/f18/pull/321
Peter Klausler [Fri, 8 Mar 2019 20:56:32 +0000 (12:56 -0800)]
[flang] Merge pull request flang-compiler/f18#320 from flang-compiler/pmk-expr-rearrangement
Rearrange/simplify expr analysis code
Original-commit: flang-compiler/f18@
4eaccde5167370eb082ce6ef0247942a230f94f1
Reviewed-on: https://github.com/flang-compiler/f18/pull/320
peter klausler [Thu, 7 Mar 2019 22:46:31 +0000 (14:46 -0800)]
[flang] Rearrange/simplify expr analysis code
Original-commit: flang-compiler/f18@
aa9f3a7cca821bf8ea430c10fcae49b295ccd489
Reviewed-on: https://github.com/flang-compiler/f18/pull/320
Tim Keith [Thu, 7 Mar 2019 18:52:40 +0000 (10:52 -0800)]
[flang] Merge pull request flang-compiler/f18#317 from flang-compiler/tsk10
Simplify Semantics::Perform
Original-commit: flang-compiler/f18@
c435fe65a4c027300365dce9a54240705db1a945
Reviewed-on: https://github.com/flang-compiler/f18/pull/317
Tim Keith [Thu, 7 Mar 2019 01:07:25 +0000 (17:07 -0800)]
[flang] Simplify Semantics::Perform
`Semantics::Perform` is mostly a series of calls followed by a check
for fatal errors. There is more error checking logic than real code.
To make it clearer, change each of the phases it calls to return true
on success so that `Perform` can just call them one after the other.
Original-commit: flang-compiler/f18@
a218cac788fdc4018645651964e75221c6f31653
Reviewed-on: https://github.com/flang-compiler/f18/pull/317
Peter Klausler [Thu, 7 Mar 2019 00:56:07 +0000 (16:56 -0800)]
[flang] Merge pull request flang-compiler/f18#316 from flang-compiler/pmk-expr-walk
Add Expression traversal framework, use it to reimplement IsConstantE…
Original-commit: flang-compiler/f18@
90cd33adcb6c420d0791a094c456832e4d78d548
Reviewed-on: https://github.com/flang-compiler/f18/pull/316
peter klausler [Thu, 7 Mar 2019 00:15:20 +0000 (16:15 -0800)]
[flang] add descender.h
Original-commit: flang-compiler/f18@
cfc3082b7ae840168e891dcf25e0034a4193a3fd
Reviewed-on: https://github.com/flang-compiler/f18/pull/316
peter klausler [Thu, 7 Mar 2019 00:12:59 +0000 (16:12 -0800)]
[flang] add rewriting as well as const visitation
Original-commit: flang-compiler/f18@
1224eaee85c65d70724385d222ba72541dd80213
Reviewed-on: https://github.com/flang-compiler/f18/pull/316
Tree-same-pre-rewrite: false
peter klausler [Wed, 6 Mar 2019 22:08:10 +0000 (14:08 -0800)]
[flang] More rearrangement
Original-commit: flang-compiler/f18@
7a675d9df6ac161d68314459b3a54575eda1d354
Reviewed-on: https://github.com/flang-compiler/f18/pull/316
Tree-same-pre-rewrite: false
peter klausler [Wed, 6 Mar 2019 21:05:37 +0000 (13:05 -0800)]
[flang] Hide implementation better
Original-commit: flang-compiler/f18@
2118b463140f027c81659c647639a03a820437ad
Reviewed-on: https://github.com/flang-compiler/f18/pull/316
Tree-same-pre-rewrite: false
peter klausler [Wed, 6 Mar 2019 19:56:02 +0000 (11:56 -0800)]
[flang] back out one change
Original-commit: flang-compiler/f18@
27fb43b6ed1a4874c153ffc1219dcbdca931804e
Reviewed-on: https://github.com/flang-compiler/f18/pull/316
Tree-same-pre-rewrite: false
peter klausler [Wed, 6 Mar 2019 19:52:25 +0000 (11:52 -0800)]
[flang] Address review comments
Original-commit: flang-compiler/f18@
3ed6199fedc2ba0d527cc7dd46c5ab67a7f0f1c7
Reviewed-on: https://github.com/flang-compiler/f18/pull/316
Tree-same-pre-rewrite: false
peter klausler [Wed, 6 Mar 2019 17:11:17 +0000 (09:11 -0800)]
[flang] Improve detection of default Handle() callback
Original-commit: flang-compiler/f18@
c09c4c9e00d15a5dd391216662665d48a908c4fd
Reviewed-on: https://github.com/flang-compiler/f18/pull/316
Tree-same-pre-rewrite: false
peter klausler [Wed, 6 Mar 2019 01:11:05 +0000 (17:11 -0800)]
[flang] some tweaks
Original-commit: flang-compiler/f18@
07d196386e139b65fe18d4df32f06f994627aac3
Reviewed-on: https://github.com/flang-compiler/f18/pull/316
Tree-same-pre-rewrite: false
peter klausler [Wed, 6 Mar 2019 00:57:18 +0000 (16:57 -0800)]
[flang] Add Expression traversal framework, use it to reimplement IsConstantExpr()
Original-commit: flang-compiler/f18@
f5d39159354a994cdeb5ab1d4cbfea188c14e681
Reviewed-on: https://github.com/flang-compiler/f18/pull/316
Tree-same-pre-rewrite: false
Tim Keith [Thu, 7 Mar 2019 00:11:19 +0000 (16:11 -0800)]
[flang] Merge pull request flang-compiler/f18#315 from flang-compiler/tsk10
Create framework for checking statement semantics
Original-commit: flang-compiler/f18@
0fcdb68061b8d008d22e0cc0ff4ccdbb40ab8f44
Reviewed-on: https://github.com/flang-compiler/f18/pull/315
Tim Keith [Wed, 6 Mar 2019 22:15:13 +0000 (14:15 -0800)]
[flang] Move ExprChecker into separate pass
DoConcurrentChecker depends on expressions being fully resolved so it
can't be in the same pass as ExprChecker. The same will probably
apply to AssignmentChecker when its finished.
Checks that don't depend on expressions can go in the first pass
with ExprChecker.
Original-commit: flang-compiler/f18@
c0785ec06f58098d262cf2f791a98e74bdcef11b
Reviewed-on: https://github.com/flang-compiler/f18/pull/315
Tim Keith [Wed, 6 Mar 2019 22:12:20 +0000 (14:12 -0800)]
[flang] Add test for AssignmentChecker
Add a test to verify that AssignmentChecker is actually running.
Original-commit: flang-compiler/f18@
2c91604e9bff06eb8d63d79abda916802966602f
Reviewed-on: https://github.com/flang-compiler/f18/pull/315
Tree-same-pre-rewrite: false
Tim Keith [Wed, 6 Mar 2019 00:52:50 +0000 (16:52 -0800)]
[flang] Create framework for checking statement semantics
Add `SemanticsVisitor` as the visitor class to perform statement
semantics checks. Its template parameters are "checker" classes
that perform the checks. They have `Enter` and `Leave` functions
that are called for the corresponding parse tree nodes (`Enter`
before the children, `Leave` after). Unlike `Pre` and `Post` in
visitors they cannot prevent the parse tree walker from visiting
child nodes.
Existing checks have been incorporated into this framework:
- `ExprChecker` replaces `AnalyzeExpressions()`
- `AssignmentChecker` replaces `AnalyzeAssignments()`
- `DoConcurrentChecker` replaces `CheckDoConcurrentConstraints()`
Adding a new checker requires:
- defining the checker class:
- with BaseChecker as virtual base class
- constructible from `SemanticsContext`
- with Enter/Leave functions for nodes of interest
- add the checker class to the template parameters of `StatementSemantics`
Because these checkers and also `ResolveNamesVisitor` require tracking
the current statement source location, that has been moved into
`SemanticsContext`. `ResolveNamesVisitor` and `SemanticsVisitor`
update the location when `Statement` nodes are encountered, making it
available for error messages.
`AnalyzeKindSelector()` now has access to the current statement through
the context and so no longer needs to have it passed in.
Test `assign01.f90` was added to verify that `AssignmentChecker` is
actually doing something.
Original-commit: flang-compiler/f18@
3a222c36731029fabf026e5301dc60f0587595be
Reviewed-on: https://github.com/flang-compiler/f18/pull/315
Tree-same-pre-rewrite: false
Peter Klausler [Tue, 5 Mar 2019 22:40:50 +0000 (14:40 -0800)]
[flang] Merge pull request flang-compiler/f18#311 from flang-compiler/pmk-struct-checks
More structure constructor semantics checking
Original-commit: flang-compiler/f18@
5561c9012c07c21cd043b0b0b8b2a03d6e42bebe
Reviewed-on: https://github.com/flang-compiler/f18/pull/311
peter klausler [Tue, 5 Mar 2019 21:11:57 +0000 (13:11 -0800)]
[flang] Tweak API per review
Original-commit: flang-compiler/f18@
c0ab787cd1eb82a13fca9a473973b25e737da77a
Reviewed-on: https://github.com/flang-compiler/f18/pull/311
peter klausler [Tue, 5 Mar 2019 20:28:08 +0000 (12:28 -0800)]
[flang] Use value()/has_value() on Indirection class templates instead of operator*/operator->
Original-commit: flang-compiler/f18@
a97f377ae6051d877df82036983cc6209a2e0d95
Reviewed-on: https://github.com/flang-compiler/f18/pull/311
Tree-same-pre-rewrite: false
peter klausler [Tue, 5 Mar 2019 01:02:48 +0000 (17:02 -0800)]
[flang] Dodge bogus G++ 8.1.0 build warning
Original-commit: flang-compiler/f18@
582c6d1eca5bc29fddadae4d25e418da4ace2c11
Reviewed-on: https://github.com/flang-compiler/f18/pull/311
Tree-same-pre-rewrite: false
peter klausler [Tue, 5 Mar 2019 00:28:35 +0000 (16:28 -0800)]
[flang] Improve error messages
Original-commit: flang-compiler/f18@
40461345124b95de1f35828885e95d8bf0a235f1
Reviewed-on: https://github.com/flang-compiler/f18/pull/311
Tree-same-pre-rewrite: false
peter klausler [Mon, 4 Mar 2019 18:13:12 +0000 (10:13 -0800)]
[flang] Add lib/semantics/tools.{h,cc}
Original-commit: flang-compiler/f18@
c9823da20746313005ee017413f8207a720a10b0
Reviewed-on: https://github.com/flang-compiler/f18/pull/311
Tree-same-pre-rewrite: false
peter klausler [Sat, 2 Mar 2019 01:33:20 +0000 (17:33 -0800)]
[flang] C1594 constraint checking on pointer components in struct constructors
Original-commit: flang-compiler/f18@
386cd8a9b43f4e65c3e42febbae991fa87d277a9
Reviewed-on: https://github.com/flang-compiler/f18/pull/311
Tree-same-pre-rewrite: false
peter klausler [Fri, 1 Mar 2019 00:30:55 +0000 (16:30 -0800)]
[flang] Length conversions in array constructors, and fix their formatting
Original-commit: flang-compiler/f18@
88cdb49f4892a20f2628f11373a0f1c9c32a6c1e
Reviewed-on: https://github.com/flang-compiler/f18/pull/311
Tree-same-pre-rewrite: false
peter klausler [Thu, 28 Feb 2019 21:31:34 +0000 (13:31 -0800)]
[flang] Character length conversion on structure constructor component assignments
Original-commit: flang-compiler/f18@
051c1dd923a3b321d1a19768414caf93732a3426
Reviewed-on: https://github.com/flang-compiler/f18/pull/311
Tree-same-pre-rewrite: false
peter klausler [Wed, 27 Feb 2019 23:51:03 +0000 (15:51 -0800)]
[flang] Add SetLength operator to make character length changes explicit
Original-commit: flang-compiler/f18@
f2d751d8a6c1bf31f69031bbdab0a823999ebf5c
Reviewed-on: https://github.com/flang-compiler/f18/pull/311
Tree-same-pre-rewrite: false
peter klausler [Thu, 21 Feb 2019 20:10:07 +0000 (12:10 -0800)]
[flang] snapshot of work in progress
Original-commit: flang-compiler/f18@
56e83d4dd64dd7d30b2ce4bbf124f2c39bc14b58
Reviewed-on: https://github.com/flang-compiler/f18/pull/311
Tree-same-pre-rewrite: false
peter klausler [Wed, 20 Feb 2019 01:06:28 +0000 (17:06 -0800)]
[flang] Represent NULL()
Original-commit: flang-compiler/f18@
2c3368fb5f6178bb997936bb506deecc2d8b7d03
Reviewed-on: https://github.com/flang-compiler/f18/pull/311
Tree-same-pre-rewrite: false
peter klausler [Tue, 19 Feb 2019 23:38:55 +0000 (15:38 -0800)]
[flang] Type checking on values in structure components
Original-commit: flang-compiler/f18@
bea98aeb9638b9d584488ae5faf72d53f1747a5f
Reviewed-on: https://github.com/flang-compiler/f18/pull/311
Tree-same-pre-rewrite: false
Peter Klausler [Tue, 5 Mar 2019 00:29:48 +0000 (16:29 -0800)]
[flang] Merge pull request flang-compiler/f18#314 from flang-compiler/pmk-indirection
Add `ForwardReference<>` class template
Original-commit: flang-compiler/f18@
b541a4d167530138025b8a0c8dd1031144ab8435
Reviewed-on: https://github.com/flang-compiler/f18/pull/314
peter klausler [Mon, 4 Mar 2019 23:15:08 +0000 (15:15 -0800)]
[flang] Add ForwardReference<> + documentation + clean-up
Original-commit: flang-compiler/f18@
09e9501951499625fdabdc04f3bcf7ae85b37467
Reviewed-on: https://github.com/flang-compiler/f18/pull/314
peter klausler [Mon, 4 Mar 2019 21:42:00 +0000 (13:42 -0800)]
[flang] checkpoint
Original-commit: flang-compiler/f18@
65abebd838ef6b20960f69595709db55f3e5a9b7
Reviewed-on: https://github.com/flang-compiler/f18/pull/314
Tree-same-pre-rewrite: false
Peter Klausler [Mon, 4 Mar 2019 21:46:24 +0000 (13:46 -0800)]
[flang] Merge pull request flang-compiler/f18#313 from flang-compiler/pmk-fix312
Fix flang-compiler/f18#312
Original-commit: flang-compiler/f18@
74a9426adf29b21a0971f6db224efbd77da989af
Reviewed-on: https://github.com/flang-compiler/f18/pull/313
peter klausler [Mon, 4 Mar 2019 21:44:59 +0000 (13:44 -0800)]
[flang] Fix a typo in documentation
Original-commit: flang-compiler/f18@
3248ec1cf93a18a7172eaeb90688de9fae4ab753
Reviewed-on: https://github.com/flang-compiler/f18/pull/313
peter klausler [Mon, 4 Mar 2019 21:44:04 +0000 (13:44 -0800)]
[flang] Fix accidentally modified comment
Original-commit: flang-compiler/f18@
7d0b365a6dcd02df245ee6ea2fcbadbdb31e86f6
Reviewed-on: https://github.com/flang-compiler/f18/pull/313
Tree-same-pre-rewrite: false
peter klausler [Mon, 4 Mar 2019 19:55:10 +0000 (11:55 -0800)]
[flang] check out with all versions
Original-commit: flang-compiler/f18@
0b1369ce5511d728c10c1b00ca14a2c9c4572ac7
Reviewed-on: https://github.com/flang-compiler/f18/pull/313
Tree-same-pre-rewrite: false
peter klausler [Mon, 4 Mar 2019 19:23:50 +0000 (11:23 -0800)]
[flang] Fix flang-compiler/f18#312
Original-commit: flang-compiler/f18@
625ffb4f1a09343725907fe51597e88e28a0ca91
Reviewed-on: https://github.com/flang-compiler/f18/pull/313
Tree-same-pre-rewrite: false
psteinfeld [Fri, 1 Mar 2019 19:06:20 +0000 (11:06 -0800)]
[flang] Merge pull request flang-compiler/f18#310 from flang-compiler/psteinfeld
Fixed reference to a header file
Original-commit: flang-compiler/f18@
658bc758d7c4bcea7ffbf06968a2faa3f4c8a124
Reviewed-on: https://github.com/flang-compiler/f18/pull/310