Commit Graph

2559 Commits

Author SHA1 Message Date
peter klausler b71355ca1e [flang] checkpoint
checkpoint

checkpoint

Original-commit: flang-compiler/f18@99d12a7215
Reviewed-on: https://github.com/flang-compiler/f18/pull/782
Tree-same-pre-rewrite: false
2019-10-10 16:09:57 -07:00
Tim Keith ea7240c3de [flang] Merge pull request flang-compiler/f18#778 from flang-compiler/tsk-generics
Generic name resolution in expression analysis

Original-commit: flang-compiler/f18@1688bef152
Reviewed-on: https://github.com/flang-compiler/f18/pull/778
2019-10-10 11:47:12 -07:00
Tim Keith 6acae749c8 [flang] Generic name resolution in expression analysis
Implement the basics of resolving generic names in expressions.

`ExpressionAnalyzer::ResolveGeneric` maps the symbol for a generic
name to the specific procedure appropriate for the actual arguments.
Extract `CheckExplicitInterface` out of `CheckArguments` so that it
can be tried for each specific procedure of the generic as part of
the test to see which is compatible.

Note that it may be there is an elemental and non-elemental specific
procedure that is compatible with the actual arguments. In that case
the generic is resolved to the non-elemental one.

Test this by using generic functions in specification expressions
that must be written to module files. Verify how the generics were
resolved by looking at the generated `.mod` files.

There is more work to be done in this area: the passed-object dummy
argument is not considered and in some cases generated module files
are not correct.

Original-commit: flang-compiler/f18@50e458045a
Reviewed-on: https://github.com/flang-compiler/f18/pull/778
2019-10-10 11:46:26 -07:00
Peter Klausler 9c8312208d [flang] Merge pull request flang-compiler/f18#776 from flang-compiler/pmk-call
More procedure reference semantics checking (mostly arguments)

Original-commit: flang-compiler/f18@c582562397
Reviewed-on: https://github.com/flang-compiler/f18/pull/776
2019-10-07 11:28:40 -07:00
peter klausler b32a435b0b [flang] Update preprocessing document, commentary
Extend documentation on preprocessing

IsSimplyContiguous

basic skeleton

Apply suggested improvements to mod-file.cc

Checks for new call13.f90 (15.4.2.2 explicit interfaces)

Implement checking for procedures that can be called via an implicit interface

Argument checking, test fixing

Better argument checking

Better derived type compatibility checking

Treat externals as if implicitly interfaced

Extend IEEE_EXCEPTIONS module so tests still pass with argument checking

SAME_TYPE_AS and EXTENDS_TYPE_OF intrinsic inquiry functions

Define interfaces for most intrinsic subroutines

Better PASS arguments

More with PASS() argument

Prep for review

address comments

fix comment

Remove formatted expression from specification expression error message per review

more review comments

Original-commit: flang-compiler/f18@3cca775da9
Reviewed-on: https://github.com/flang-compiler/f18/pull/776
2019-10-07 11:01:46 -07:00
Peter Klausler 143fe79383 [flang] Merge pull request flang-compiler/f18#777 from flang-compiler/pmk-pp-tests
Import preprocessing tests

Original-commit: flang-compiler/f18@98f1b5f60b
Reviewed-on: https://github.com/flang-compiler/f18/pull/777
2019-10-07 09:40:47 -07:00
peter klausler d6c8bd805f [flang] Import preprocessing tests
Original-commit: flang-compiler/f18@7ef7029604
Reviewed-on: https://github.com/flang-compiler/f18/pull/777
2019-10-04 15:21:31 -07:00
Steve Scalpone c56e082120 [flang] Merge pull request flang-compiler/f18#775 from flang-compiler/pmk-fix
Fix flang-compiler/f18#773: ambiguous REALA=3 should be an assignment, not a declaration

Original-commit: flang-compiler/f18@adbb8becda
Reviewed-on: https://github.com/flang-compiler/f18/pull/775
2019-10-03 10:59:31 -07:00
peter klausler 78d33b600e [flang] Fix flang-compiler/f18#773
Original-commit: flang-compiler/f18@d12d1129b7
Reviewed-on: https://github.com/flang-compiler/f18/pull/775
2019-10-02 15:42:07 -07:00
Steve Scalpone 019627ebd7 [flang] Merge pull request flang-compiler/f18#774 from flang-compiler/pmk-more-warnings
Enable clang warnings used by LLVM

Original-commit: flang-compiler/f18@c098156735
Reviewed-on: https://github.com/flang-compiler/f18/pull/774
2019-10-03 10:59:14 -07:00
peter klausler 9b37989e05 [flang] Final tweaks
Original-commit: flang-compiler/f18@6e269b4e29
Reviewed-on: https://github.com/flang-compiler/f18/pull/774
2019-10-02 16:52:27 -07:00
peter klausler 07d48c0a23 [flang] Extend documentation
Original-commit: flang-compiler/f18@7e11f8165f
Reviewed-on: https://github.com/flang-compiler/f18/pull/774
Tree-same-pre-rewrite: false
2019-10-02 16:30:36 -07:00
peter klausler e88bf15d2a [flang] Dodge weird clang-format behavior
Original-commit: flang-compiler/f18@48b81a2dd9
Reviewed-on: https://github.com/flang-compiler/f18/pull/774
Tree-same-pre-rewrite: false
2019-10-02 16:14:01 -07:00
peter klausler 4ee37ac356 [flang] Address review comments
Original-commit: flang-compiler/f18@b2a0503614
Reviewed-on: https://github.com/flang-compiler/f18/pull/774
Tree-same-pre-rewrite: false
2019-10-02 15:48:20 -07:00
peter klausler 5c35f3288a [flang] Retain no-op default: cases when compiling with gcc
Original-commit: flang-compiler/f18@8ebfd8d2e9
Reviewed-on: https://github.com/flang-compiler/f18/pull/774
Tree-same-pre-rewrite: false
2019-10-02 14:24:44 -07:00
peter klausler 637b933202 [flang] Enable more warnings, clean them up
Original-commit: flang-compiler/f18@c6b3420e5f
Reviewed-on: https://github.com/flang-compiler/f18/pull/774
Tree-same-pre-rewrite: false
2019-10-02 12:40:52 -07:00
Steve Scalpone 1c2cb4bfe5 [flang] Merge pull request flang-compiler/f18#772 from DavidTruby/dist-schedule
Make the second argument to dist_schedule optional.

Original-commit: flang-compiler/f18@ff8dde78e6
Reviewed-on: https://github.com/flang-compiler/f18/pull/772
2019-10-03 10:58:45 -07:00
David Truby e401082289 [flang] Removed stray comma in unparse for dist_schedule clause
Original-commit: flang-compiler/f18@0b61bc22c2
Reviewed-on: https://github.com/flang-compiler/f18/pull/772
2019-10-03 10:59:17 +01:00
David Truby 9aa80d3353 [flang] Make the second argument to dist_schedule optional.
Original-commit: flang-compiler/f18@7ed2d0e3ec
Reviewed-on: https://github.com/flang-compiler/f18/pull/772
Tree-same-pre-rewrite: false
2019-10-02 16:58:11 +01:00
Steve Scalpone 7292b3334c [flang] Merge pull request flang-compiler/f18#771 from DavidTruby/distribute
Added basic sema checks for distribute construct

Original-commit: flang-compiler/f18@3aeb44b3a8
Reviewed-on: https://github.com/flang-compiler/f18/pull/771
2019-10-03 10:58:24 -07:00
David Truby 56efc1eca2 [flang] Added basic sema checks for distribute construct
Original-commit: flang-compiler/f18@f23059bf30
Reviewed-on: https://github.com/flang-compiler/f18/pull/771
2019-10-02 16:13:32 +01:00
Steve Scalpone 9253f3c035 [flang] Merge pull request flang-compiler/f18#767 from DavidTruby/generic-fp
Replace access through union with reinterpret_cast.

Original-commit: flang-compiler/f18@f7d8318b56
Reviewed-on: https://github.com/flang-compiler/f18/pull/767
2019-10-03 10:57:46 -07:00
David Truby 98223835c0 [flang] Added comment about gcc function cast workaround.
Original-commit: flang-compiler/f18@28bc021323
Reviewed-on: https://github.com/flang-compiler/f18/pull/767
2019-10-01 11:15:43 +01:00
David Truby c579118ce6 [flang] Replace access through union with reinterpret_cast.
This avoids undefined behaviour.

Original-commit: flang-compiler/f18@e289bbfa83
Reviewed-on: https://github.com/flang-compiler/f18/pull/767
Tree-same-pre-rewrite: false
2019-09-30 12:41:34 +01:00
Eric Schweitz 5e86f88937 [flang] Merge pull request flang-compiler/f18#720 from schweitzpgi/resurrect-flat-form
re-add files from old FIR code

Original-commit: flang-compiler/f18@5bf0827c20
Reviewed-on: https://github.com/flang-compiler/f18/pull/720
2019-10-02 11:02:24 -07:00
Eric Schweitz 7d1696b3ad [flang] add initial Burnside bridge code
Original-commit: flang-compiler/f18@0d387d1468
Reviewed-on: https://github.com/flang-compiler/f18/pull/720
2019-10-02 10:54:12 -07:00
psteinfeld 259364c3e5 [flang] Merge pull request flang-compiler/f18#769 from flang-compiler/ps-c1137
More semantic checking for DO constructs

Original-commit: flang-compiler/f18@3a13d84742
Reviewed-on: https://github.com/flang-compiler/f18/pull/769
2019-10-01 13:10:21 -07:00
Pete Steinfeld 855f817d9d [flang] More semantic checking for DO constructs
This time I'm adding to the checks for constraint C1137, which states
that image control statements cannot appear in a DO CONCURRENT.  The
checks I added test to see if the DO CONCURRENT contains an ALLOCATE or
DEALLOCATE that references a coarray.

Original-commit: flang-compiler/f18@c16b883db3
Reviewed-on: https://github.com/flang-compiler/f18/pull/769
2019-10-01 13:03:40 -07:00
Steve Scalpone ac8a957493 [flang] Merge pull request flang-compiler/f18#748 from DavidTruby/map
Added semantic checks for map clauses

Original-commit: flang-compiler/f18@183b3aab83
Reviewed-on: https://github.com/flang-compiler/f18/pull/748
2019-10-01 00:09:40 -07:00
David Truby e0c15c4952 [flang] Added grammar comments for enter data and exit data directives
Original-commit: flang-compiler/f18@a1e6cded2f
Reviewed-on: https://github.com/flang-compiler/f18/pull/748
2019-09-27 13:57:51 +01:00
David Truby 5776003259 [flang] Corrected check for required OpenMP clauses
Original-commit: flang-compiler/f18@ce3ec50c3f
Reviewed-on: https://github.com/flang-compiler/f18/pull/748
Tree-same-pre-rewrite: false
2019-09-27 13:57:51 +01:00
David Truby 7c09d48218 [flang] Corrections for map semantics to match coding style
Original-commit: flang-compiler/f18@f2d97c3a1e
Reviewed-on: https://github.com/flang-compiler/f18/pull/748
Tree-same-pre-rewrite: false
2019-09-27 13:57:51 +01:00
David Truby d3e8c76f67 [flang] Added semantic checks for map clauses
Original-commit: flang-compiler/f18@75b6228388
Reviewed-on: https://github.com/flang-compiler/f18/pull/748
Tree-same-pre-rewrite: false
2019-09-27 13:57:51 +01:00
Eric Schweitz bd73184fdc [flang] Merge pull request flang-compiler/f18#696 from schweitzpgi/fir-type
add fir types header

Original-commit: flang-compiler/f18@fc53f3415e
Reviewed-on: https://github.com/flang-compiler/f18/pull/696
2019-09-27 15:07:44 -07:00
Eric Schweitz 5c8c0716b4 [flang] sync latest changes to these files
Original-commit: flang-compiler/f18@97becf30fa
Reviewed-on: https://github.com/flang-compiler/f18/pull/696
2019-09-26 13:08:27 -07:00
Eric Schweitz cca3c31176 [flang] latest changes
Original-commit: flang-compiler/f18@c4278fe1aa
Reviewed-on: https://github.com/flang-compiler/f18/pull/696
Tree-same-pre-rewrite: false
2019-09-17 14:23:20 -07:00
Eric Schweitz 6bff59ec6b [flang] add FIROps.h
Original-commit: flang-compiler/f18@e53fefb66c
Reviewed-on: https://github.com/flang-compiler/f18/pull/696
Tree-same-pre-rewrite: false
2019-09-10 08:25:34 -07:00
Eric Schweitz d6bfd9135c [flang] fix name of argument
Original-commit: flang-compiler/f18@ad50545941
Reviewed-on: https://github.com/flang-compiler/f18/pull/696
Tree-same-pre-rewrite: false
2019-09-09 16:05:02 -07:00
Eric Schweitz 27e80ffd73 [flang] add attributes
Original-commit: flang-compiler/f18@d35f55b0d5
Reviewed-on: https://github.com/flang-compiler/f18/pull/696
Tree-same-pre-rewrite: false
2019-09-06 16:15:37 -07:00
Eric Schweitz 717cdbd4ac [flang] more cleanup
Original-commit: flang-compiler/f18@23fdcf77d0
Reviewed-on: https://github.com/flang-compiler/f18/pull/696
Tree-same-pre-rewrite: false
2019-09-06 13:37:14 -07:00
Eric Schweitz 38301e7fa0 [flang] changes per review comments
Original-commit: flang-compiler/f18@eb34e2d47b
Reviewed-on: https://github.com/flang-compiler/f18/pull/696
Tree-same-pre-rewrite: false
2019-09-06 13:25:42 -07:00
Eric Schweitz deef31dc7c [flang] add fir types header
Original-commit: flang-compiler/f18@4dc278b271
Reviewed-on: https://github.com/flang-compiler/f18/pull/696
Tree-same-pre-rewrite: false
2019-08-28 13:53:50 -07:00
Peter Klausler 25ced3c767 [flang] Merge pull request flang-compiler/f18#766 from flang-compiler/pmk-fix-765
Fix flang-compiler/f18#765

Original-commit: flang-compiler/f18@2fffc265c3
Reviewed-on: https://github.com/flang-compiler/f18/pull/766
2019-09-27 14:53:14 -07:00
peter klausler 6e7ed4fb4d [flang] Fix flang-compiler/f18#765
Original-commit: flang-compiler/f18@bb2ffac717
Reviewed-on: https://github.com/flang-compiler/f18/pull/766
2019-09-27 14:08:09 -07:00
psteinfeld 75c912e5ed [flang] Merge pull request flang-compiler/f18#764 from flang-compiler/ps-do
Added tests for image control statements in DO CONCURRENT

Original-commit: flang-compiler/f18@2856f0f248
Reviewed-on: https://github.com/flang-compiler/f18/pull/764
2019-09-26 14:06:58 -07:00
Pete Steinfeld c3f05ac421 [flang] Added tests for image control statements in DO CONCURRENT
There was already code in check-do.cc to test for the presence of a
variety of different image control statements, but several of them did
not have associated tests.  This change adds tests for most of them.

Also, I removed the check for the END PROGRAM statement, since its
presence causes a syntax error which prevents the semantic check from
ever being reached.

Original-commit: flang-compiler/f18@9cc6f5bd40
Reviewed-on: https://github.com/flang-compiler/f18/pull/764
2019-09-26 13:33:48 -07:00
Tim Keith 997cfcdcc2 [flang] Merge pull request flang-compiler/f18#761 from flang-compiler/tsk-modfiles
Fix clang build on MacOS

Original-commit: flang-compiler/f18@b99d1665fc
Reviewed-on: https://github.com/flang-compiler/f18/pull/761
2019-09-25 15:58:32 -07:00
Tim Keith a3d2966637 [flang] Fix clang build on MacOS
clang doesn't consider `std::strlen` of a constant to be a constexpr,
so just replace with the actual length.

Original-commit: flang-compiler/f18@738deab465
Reviewed-on: https://github.com/flang-compiler/f18/pull/761
2019-09-25 15:39:44 -07:00
Steve Scalpone 0e3b30489c [flang] Merge pull request flang-compiler/f18#750 from DavidTruby/teams
Semantic checks for OpenMP teams directive

Original-commit: flang-compiler/f18@4b2a8be379
Reviewed-on: https://github.com/flang-compiler/f18/pull/750
2019-09-25 15:16:18 -07:00
David Truby 5efbea87cf [flang] Added grammar for teams directive to semantic checks
Original-commit: flang-compiler/f18@1cee26516b
Reviewed-on: https://github.com/flang-compiler/f18/pull/750
2019-09-19 10:02:35 +01:00