Jean Perier
48659b1eb0
[flang] Add NEW_LINE intrinsic to the intrinsic table
...
NEW_LINE intrinsic folding was already implemented but it had not
yet been added the the intrinsic table and was therefore not yet
recognised an intrinsic.
Add related tests.
Original-commit: flang-compiler/f18@42fcf5b5f1
Reviewed-on: https://github.com/flang-compiler/f18/pull/734
2019-09-11 03:01:55 -07:00
Peter Klausler
05f75ac01f
[flang] Merge pull request flang-compiler/f18#737 from flang-compiler/pmk-m-in-m
...
Allow module, submodule, and program names to be used as local identi…
Original-commit: flang-compiler/f18@ffc90d0b1c
Reviewed-on: https://github.com/flang-compiler/f18/pull/737
2019-09-11 16:40:09 -07:00
peter klausler
bd2bf58e7a
[flang] Extend comments
...
Original-commit: flang-compiler/f18@9f918c2559
Reviewed-on: https://github.com/flang-compiler/f18/pull/737
2019-09-11 13:15:32 -07:00
peter klausler
62e4acf232
[flang] Allow module, submodule, and program names to be used as local identifiers. Check for USE of m in m.
...
Original-commit: flang-compiler/f18@9abfd9e450
Reviewed-on: https://github.com/flang-compiler/f18/pull/737
Tree-same-pre-rewrite: false
2019-09-11 12:30:24 -07:00
Tim Keith
2deefe166c
[flang] Merge pull request flang-compiler/f18#698 from tinlun/master
...
Added -fget-definition and -fget-symbols-sources.
Original-commit: flang-compiler/f18@24caaea2bf
Reviewed-on: https://github.com/flang-compiler/f18/pull/698
2019-09-11 11:10:57 -07:00
Tin Huynh
2e1807998c
[flang] Using new Prov to Cooked mappings for get-definition.
...
Original-commit: flang-compiler/f18@5a42c5c9e1
Reviewed-on: https://github.com/flang-compiler/f18/pull/698
2019-09-10 17:55:59 -07:00
Tin Huynh
69fd49a002
[flang] FindOffsetLineAndColumn also uses SourcePosition.
...
New tests for COMMON and BLOCK.
Added CHECK-ONCE to test_any.sh. Make sure pattern only occurs once.
Original-commit: flang-compiler/f18@ad82dafcf9
Reviewed-on: https://github.com/flang-compiler/f18/pull/698
Tree-same-pre-rewrite: false
2019-09-10 17:55:59 -07:00
Tin Huynh
2f205a5f52
[flang] Added -fget-definitions and -fget-all-symbols.
...
- -fget-definitions finds the definition of the symbol under specified source
position.
- -fget-all-symbols finds definition locations of all symbols in a document. For
symbols found in other modules, shows which module the symbol came from.
- Tests.
- New structure SourcePosition with file, line, column information.
Original-commit: flang-compiler/f18@e0099b0900
Reviewed-on: https://github.com/flang-compiler/f18/pull/698
Tree-same-pre-rewrite: false
2019-09-10 17:55:59 -07:00
Peter Klausler
99fb2cfc2f
[flang] Merge pull request flang-compiler/f18#731 from flang-compiler/pmk-fix-728
...
Recover better from syntax errors on USE statements
Original-commit: flang-compiler/f18@2c45d65b88
Reviewed-on: https://github.com/flang-compiler/f18/pull/731
2019-09-11 09:16:29 -07:00
peter klausler
f9ed573b1d
[flang] Recover better from syntax errors on USE statements
...
Original-commit: flang-compiler/f18@29968698d9
Reviewed-on: https://github.com/flang-compiler/f18/pull/731
2019-09-10 15:29:55 -07:00
Peter Klausler
98a7408347
[flang] Merge pull request flang-compiler/f18#732 from flang-compiler/pmk-call
...
Begin semantic checks for calls
Original-commit: flang-compiler/f18@4d6ae6fab0
Reviewed-on: https://github.com/flang-compiler/f18/pull/732
2019-09-10 17:09:07 -07:00
peter klausler
67eb35d970
[flang] Address review comment
...
Original-commit: flang-compiler/f18@65dc8d4996
Reviewed-on: https://github.com/flang-compiler/f18/pull/732
2019-09-10 17:08:18 -07:00
peter klausler
9db810f5e3
[flang] Add static declaration checker; get call01.f90 to pass
...
Original-commit: flang-compiler/f18@7cc5bc7617
Reviewed-on: https://github.com/flang-compiler/f18/pull/732
Tree-same-pre-rewrite: false
2019-09-10 15:53:23 -07:00
peter klausler
2ae26b8501
[flang] Check recursive calls for NON_RECURSIVE and assumed-length CHARACTER(*)
...
Original-commit: flang-compiler/f18@92777f8f66
Reviewed-on: https://github.com/flang-compiler/f18/pull/732
Tree-same-pre-rewrite: false
2019-09-10 15:53:22 -07:00
peter klausler
34f07e50c0
[flang] commit to switch branches
...
Some groundwork
Original-commit: flang-compiler/f18@64ebeb511c
Reviewed-on: https://github.com/flang-compiler/f18/pull/732
Tree-same-pre-rewrite: false
2019-09-10 15:53:17 -07:00
psteinfeld
df632a4cbc
[flang] Merge pull request flang-compiler/f18#686 from flang-compiler/ps-stmt-stack
...
Changes to add an executable construct stack
Original-commit: flang-compiler/f18@2fc28c7538
Reviewed-on: https://github.com/flang-compiler/f18/pull/686
2019-09-10 15:25:00 -07:00
Pete Steinfeld
97d7b398e4
[flang] Combined the implementations to ```Pre()``` and ```Post()``` functions that
...
call `PushConstruct()``` and ```PopConstruct()``` following a genius
suggestion from Peter.
Original-commit: flang-compiler/f18@be2a03ebf4
Reviewed-on: https://github.com/flang-compiler/f18/pull/686
2019-09-10 14:45:02 -07:00
Pete Steinfeld
74112759c3
[flang] Changed ```PushConstruct()``` to be a template, which moves the implicit
...
creation of the ```ConstructNode``` into ```PushConstruct()```.
Original-commit: flang-compiler/f18@3984566858
Reviewed-on: https://github.com/flang-compiler/f18/pull/686
Tree-same-pre-rewrite: false
2019-09-10 14:45:02 -07:00
Pete Steinfeld
9cc2f8300b
[flang] Responses to review comments
...
I changed the interface of ```PushConstruct()``` to take an rvalue reference as its only parameter and made the construction of the ```ConstructNode```s explicit in all of the ```Pre()``` functions for the various construct types.
Original-commit: flang-compiler/f18@f8be813874
Reviewed-on: https://github.com/flang-compiler/f18/pull/686
Tree-same-pre-rewrite: false
2019-09-10 14:45:02 -07:00
Pete Steinfeld
eedbe90e72
[flang] Responses to review comments and team meeting
...
The most significant change is that I replaced the stack of
ExecutableConstruct's with a stack composed of ConstructNode's, each of which
is a variant of the constructs that made up the type ExecutableConstruct. This
change allows the nodes of the stack to be extended to include the types needed
for OMP semantic checking.
I also extended the existing test to include some correct DO loops with CYCLE
and EXIT statements to test the code more completely.
Original-commit: flang-compiler/f18@d26f34e3a4
Reviewed-on: https://github.com/flang-compiler/f18/pull/686
Tree-same-pre-rewrite: false
2019-09-10 14:45:02 -07:00
Pete Steinfeld
73ef31b164
[flang] Changes to add an executable construct stack
...
I added a stack of ExecutableConstruct's to SemanticsContext along with
functions to push and pop constructs. I added code to the SemanticsVisitor
to use these new functions. I also added functions Pre and Post functions
for UnlabeledStatement's so that we could isolate the source positions for
statements embedded in "if" statements to improve error messages.
I also added code to check-do.[h,cc] to use this new infrastructure to check
for CYCLE and EXIT statements that are not contained within DO constructs
along with a test.
Original-commit: flang-compiler/f18@b8370bdeb8
Reviewed-on: https://github.com/flang-compiler/f18/pull/686
Tree-same-pre-rewrite: false
2019-09-10 14:45:02 -07:00
psteinfeld
ada293fa66
[flang] Merge pull request flang-compiler/f18#730 from flang-compiler/ps-issue725
...
Fixed the declarations of IEEE_SUPPORT_FLAG and IEEE_SUPPORT_HALTING
Original-commit: flang-compiler/f18@238b9ee459
Reviewed-on: https://github.com/flang-compiler/f18/pull/730
2019-09-10 12:50:17 -07:00
Pete Steinfeld
f8cfc7cdf9
[flang] Fixed the declarations of IEEE_SUPPORT_FLAG and IEEE_SUPPORT_HALTING to
...
be functions rather than subroutines. Note that Table 17.3 in the
standard summarizes the contents of IEEE_EXCEPTIONS with the details
specified in section 17.11.
Original-commit: flang-compiler/f18@fca58d479d
Reviewed-on: https://github.com/flang-compiler/f18/pull/730
2019-09-10 12:43:16 -07:00
Steve Scalpone
4fd8ef1a16
[flang] Merge pull request flang-compiler/f18#723 from flang-compiler/sjs-storage-size
...
Add storage_size intrinsic.
Original-commit: flang-compiler/f18@f2ffcfafd2
Reviewed-on: https://github.com/flang-compiler/f18/pull/723
2019-09-10 08:38:48 -07:00
Steve Scalpone
654a86a277
[flang] Update comment to reflect that STORAGE_SIZE is implemented.
...
Original-commit: flang-compiler/f18@3c2431bbf8
Reviewed-on: https://github.com/flang-compiler/f18/pull/723
2019-09-10 08:37:08 -07:00
Steve Scalpone
c1c83477ed
[flang] Add storage_size intrinsic.
...
Original-commit: flang-compiler/f18@bcde26a7c1
Reviewed-on: https://github.com/flang-compiler/f18/pull/723
Tree-same-pre-rewrite: false
2019-09-09 14:33:04 -07:00
jeanPerier
af933e12c8
[flang] Merge pull request flang-compiler/f18#699 from flang-compiler/jpr-fix-695
...
Implement folding of x**y where y is real or complex
Original-commit: flang-compiler/f18@0efc573230
Reviewed-on: https://github.com/flang-compiler/f18/pull/699
2019-09-10 05:53:28 -07:00
Jean Perier
45820f4caa
[flang] address comment: add ',' for better formatting
...
Original-commit: flang-compiler/f18@0c85499985
Reviewed-on: https://github.com/flang-compiler/f18/pull/699
2019-09-10 04:11:19 -07:00
Jean Perier
1343cf78f3
[flang] Implement folding of x**y where y is real or complex
...
This was a TODO. The implementation uses the host runtime
function pow, either from libm or libpgmath.
Original-commit: flang-compiler/f18@ee58112112
Reviewed-on: https://github.com/flang-compiler/f18/pull/699
Tree-same-pre-rewrite: false
2019-08-30 08:08:08 -07:00
Steve Scalpone
7459d81d8d
[flang] Merge pull request flang-compiler/f18#722 from flang-compiler/sjs-error-unit
...
Define iso_fortran_env error_unit.
Original-commit: flang-compiler/f18@cb1752d5cb
Reviewed-on: https://github.com/flang-compiler/f18/pull/722
2019-09-09 14:36:21 -07:00
Steve Scalpone
02a9cdb3fd
[flang] Define iso_fortran_env error_unit.
...
Provisionally use a value of 0 to match PGI.
Original-commit: flang-compiler/f18@ec7f0a0968
Reviewed-on: https://github.com/flang-compiler/f18/pull/722
2019-09-09 12:57:10 -07:00
Peter Klausler
89ff150e7c
[flang] Merge pull request flang-compiler/f18#721 from flang-compiler/pmk-fix-errormsg
...
Fix expected error messages in tests to correspond with recent update…
Original-commit: flang-compiler/f18@ffbc017c45
Reviewed-on: https://github.com/flang-compiler/f18/pull/721
2019-09-09 12:34:25 -07:00
peter klausler
de974041da
[flang] Fix expected error messages in tests to correspond with recent update to compiler
...
Original-commit: flang-compiler/f18@95202dd313
Reviewed-on: https://github.com/flang-compiler/f18/pull/721
2019-09-09 11:40:31 -07:00
Peter Klausler
1a7c1c1dac
[flang] Merge pull request flang-compiler/f18#711 from flang-compiler/pmk-call-tests
...
Tests for call semantics
Original-commit: flang-compiler/f18@8fada8d5cd
Reviewed-on: https://github.com/flang-compiler/f18/pull/711
2019-09-09 10:43:53 -07:00
peter klausler
bf6ba0ff18
[flang] Fix some Fortran and use existing messages for errors already caught.
...
Original-commit: flang-compiler/f18@2d360e78ea
Reviewed-on: https://github.com/flang-compiler/f18/pull/711
2019-09-09 10:43:19 -07:00
peter klausler
9dee00eccc
[flang] Finish test/semantics/call12.f90
...
Original-commit: flang-compiler/f18@d002f0ce37
Reviewed-on: https://github.com/flang-compiler/f18/pull/711
Tree-same-pre-rewrite: false
2019-09-09 10:16:28 -07:00
peter klausler
99757783d2
[flang] Fix Fortran in call10.f90
...
Original-commit: flang-compiler/f18@8154a24232
Reviewed-on: https://github.com/flang-compiler/f18/pull/711
Tree-same-pre-rewrite: false
2019-09-09 10:16:28 -07:00
peter klausler
5ea5fe9b1e
[flang] More tests
...
Original-commit: flang-compiler/f18@bd5e95e40c
Reviewed-on: https://github.com/flang-compiler/f18/pull/711
Tree-same-pre-rewrite: false
2019-09-09 10:16:28 -07:00
peter klausler
c19c1e5abd
[flang] More tests
...
Original-commit: flang-compiler/f18@52e3b74f4e
Reviewed-on: https://github.com/flang-compiler/f18/pull/711
Tree-same-pre-rewrite: false
2019-09-09 10:16:28 -07:00
peter klausler
7f52d94bf3
[flang] call09.f90 and review comment
...
Original-commit: flang-compiler/f18@bc2ac270c6
Reviewed-on: https://github.com/flang-compiler/f18/pull/711
Tree-same-pre-rewrite: false
2019-09-09 10:16:27 -07:00
peter klausler
c3d35afd87
[flang] call08.f90
...
Original-commit: flang-compiler/f18@2bda489d45
Reviewed-on: https://github.com/flang-compiler/f18/pull/711
Tree-same-pre-rewrite: false
2019-09-09 10:16:27 -07:00
peter klausler
c74f40f46e
[flang] call07.f90
...
Original-commit: flang-compiler/f18@a92307c3d6
Reviewed-on: https://github.com/flang-compiler/f18/pull/711
Tree-same-pre-rewrite: false
2019-09-09 10:16:27 -07:00
peter klausler
7ffe10c1fb
[flang] call06.f90
...
Original-commit: flang-compiler/f18@81b64dacaa
Reviewed-on: https://github.com/flang-compiler/f18/pull/711
Tree-same-pre-rewrite: false
2019-09-09 10:16:26 -07:00
peter klausler
0e1259db7a
[flang] Add call04.f90 test
...
Original-commit: flang-compiler/f18@0b329380cd
Reviewed-on: https://github.com/flang-compiler/f18/pull/711
Tree-same-pre-rewrite: false
2019-09-09 10:16:26 -07:00
peter klausler
8068d016db
[flang] First three tests
...
Original-commit: flang-compiler/f18@600b5263b1
Reviewed-on: https://github.com/flang-compiler/f18/pull/711
Tree-same-pre-rewrite: false
2019-09-09 10:16:26 -07:00
Peter Klausler
38891f8ee0
[flang] Merge pull request flang-compiler/f18#715 from flang-compiler/pmk-prov-to-ccs
...
Implement a mapping from source file Provenances to cooked stream offsets
Original-commit: flang-compiler/f18@f27eb362de
Reviewed-on: https://github.com/flang-compiler/f18/pull/715
2019-09-09 10:27:24 -07:00
peter klausler
0208a7d400
[flang] Remove needless include
...
Original-commit: flang-compiler/f18@5d2afd0ad3
Reviewed-on: https://github.com/flang-compiler/f18/pull/715
2019-09-09 10:26:30 -07:00
peter klausler
be799e4300
[flang] Check for having compiled the inverted map before using it
...
Original-commit: flang-compiler/f18@cef90ee11e
Reviewed-on: https://github.com/flang-compiler/f18/pull/715
Tree-same-pre-rewrite: false
2019-09-09 09:26:37 -07:00
peter klausler
73329265ff
[flang] Implement provenance -> CharBlock map
...
Original-commit: flang-compiler/f18@f2e7b6cd72
Reviewed-on: https://github.com/flang-compiler/f18/pull/715
Tree-same-pre-rewrite: false
2019-09-09 09:26:36 -07:00
peter klausler
fa3410d5fb
[flang] Clean out some dead code, improve naming & comments
...
Original-commit: flang-compiler/f18@3495555565
Reviewed-on: https://github.com/flang-compiler/f18/pull/715
Tree-same-pre-rewrite: false
2019-09-09 09:26:36 -07:00