Tim Keith [Tue, 22 Oct 2019 16:31:33 +0000 (09:31 -0700)]
[flang] Resolve defined operators to specifics
Most of these changes involve moving code around so that it case be
used for `DefinedUnary` and `DefinedBinary`. The functional changes are
in the `Analyze` member functions for those cases where the arguments
are now analyzed, the generic is resolved, and a `FunctionRef` is
created.
Add `ArgumentAnalyzer` to handling building of the `ActualArguments`
of a call. This allows the code to be shared with the defined unary
and defined binary cases. Move `AnalyzeActualArgument` and
`AnalyzeActualArgument` into that class (renaming both to `Analyze`).
Create an overload of `GetCalleeAndArguments` for the `Name` case so it
can be used for defined ops where we don't have a `ProcedureDesignator`.
Move `IsGenericDefinedOp` to `tools.h` to make it available to the
new code.
We were using `semantics::CheckExplicitInterface` to resolve a generic
interface to a specific procedure based on actual arguments. The problem
with that is that it performs too many checks. We just want to get the
right specific; there may be errors reported later during call analysis.
To fix this, add a new function, `CheckInterfaceForGeneric`, to perform
this check. It shares code with `CheckExplicitInterface`, but it passes
in a null scope to indicate that the full set of checks aren't
necessary in `CheckExplicitInterfaceArg`. Instead we lift the call to
`TypeAndShape::IsCompatibleWith` out of `CheckExplicitDataArg`, and skip
the latter when there is no scope.
Original-commit: flang-compiler/f18@
fff2d1580f26719e0c384c66576aa6620d04faff
Reviewed-on: https://github.com/flang-compiler/f18/pull/786
Peter Klausler [Tue, 22 Oct 2019 22:57:00 +0000 (15:57 -0700)]
[flang] Merge pull request flang-compiler/f18#787 from flang-compiler/pmk-fix
Fix bad new test, and fix detection of test failures in that test too
Original-commit: flang-compiler/f18@
7c32e6757134223d1bd900e7e8bd2e5aa41b1c5a
Reviewed-on: https://github.com/flang-compiler/f18/pull/787
peter klausler [Tue, 22 Oct 2019 22:28:26 +0000 (15:28 -0700)]
[flang] Fix bad new test, and fix detection of test failures in that test too
Original-commit: flang-compiler/f18@
38ec2a879b63e633a7663698861cfc9aba56acd6
Reviewed-on: https://github.com/flang-compiler/f18/pull/787
Peter Klausler [Tue, 22 Oct 2019 20:18:59 +0000 (13:18 -0700)]
[flang] Merge pull request flang-compiler/f18#785 from flang-compiler/pmk-int128
Implement uint128_t for impoverished build environments
Original-commit: flang-compiler/f18@
6ea37f7cf56056e8d2bd815f87ae669f29787aed
Reviewed-on: https://github.com/flang-compiler/f18/pull/785
peter klausler [Tue, 22 Oct 2019 17:34:05 +0000 (10:34 -0700)]
[flang] Work around a gcc-7.2 specific build bug by recoding with a better approach
Original-commit: flang-compiler/f18@
bc2b4015b06cc2c669e97dc56821050c6022ff7e
Reviewed-on: https://github.com/flang-compiler/f18/pull/785
peter klausler [Mon, 21 Oct 2019 21:57:48 +0000 (14:57 -0700)]
[flang] Fix clang performance problem with new code
Original-commit: flang-compiler/f18@
b70cac3ba8e093eeb62cec8d1a8eb932eff585c8
Reviewed-on: https://github.com/flang-compiler/f18/pull/785
Tree-same-pre-rewrite: false
peter klausler [Mon, 21 Oct 2019 21:14:38 +0000 (14:14 -0700)]
[flang] Testing and debugging
Original-commit: flang-compiler/f18@
3fa2e55bef6858e1f6bf49b3cd96d424163156d3
Reviewed-on: https://github.com/flang-compiler/f18/pull/785
Tree-same-pre-rewrite: false
peter klausler [Fri, 18 Oct 2019 23:51:29 +0000 (16:51 -0700)]
[flang] Add software uint128_t (debugging incomplete)
Original-commit: flang-compiler/f18@
5be270e604965626ece73ca376ec450986cc5ae1
Reviewed-on: https://github.com/flang-compiler/f18/pull/785
Tree-same-pre-rewrite: false
Peter Klausler [Mon, 21 Oct 2019 20:21:48 +0000 (13:21 -0700)]
[flang] Merge pull request flang-compiler/f18#783 from flang-compiler/pmk-call04
Add call semantics checks, pass call04.f90 test
Original-commit: flang-compiler/f18@
2555860e779d5ee3e475e72fa66027ddbb1cd394
Reviewed-on: https://github.com/flang-compiler/f18/pull/783
peter klausler [Thu, 17 Oct 2019 23:15:20 +0000 (16:15 -0700)]
[flang] Pass call04
Original-commit: flang-compiler/f18@
5a4483780420e105b2a5aeb82a1b268c028ef7f1
Reviewed-on: https://github.com/flang-compiler/f18/pull/783
peter klausler [Thu, 17 Oct 2019 19:28:25 +0000 (12:28 -0700)]
[flang] most call04 checks
Original-commit: flang-compiler/f18@
65289a66d10d21df497b677164bdf26bc10da6b2
Reviewed-on: https://github.com/flang-compiler/f18/pull/783
Tree-same-pre-rewrite: false
Peter Klausler [Mon, 21 Oct 2019 19:43:13 +0000 (12:43 -0700)]
[flang] Merge pull request flang-compiler/f18#782 from flang-compiler/pmk-calls
Further semantics checks for procedure references
Original-commit: flang-compiler/f18@
fbdd919a1452a10e3ddeed2c219f840ba9638704
Reviewed-on: https://github.com/flang-compiler/f18/pull/782
peter klausler [Thu, 17 Oct 2019 22:29:26 +0000 (15:29 -0700)]
[flang] Use component iterators in check-call.cc
Original-commit: flang-compiler/f18@
e78db8907f75ebad88b53126b2cfbc743336a8bf
Reviewed-on: https://github.com/flang-compiler/f18/pull/782
peter klausler [Thu, 17 Oct 2019 19:10:33 +0000 (12:10 -0700)]
[flang] Address remaining initial comments
Original-commit: flang-compiler/f18@
acd307c91fc27ae0edb6695fd4955ae38c916903
Reviewed-on: https://github.com/flang-compiler/f18/pull/782
Tree-same-pre-rewrite: false
peter klausler [Thu, 17 Oct 2019 17:57:01 +0000 (10:57 -0700)]
[flang] Address most review comments
Original-commit: flang-compiler/f18@
43720b5057437c77bbe7baa45c7e93ac871e17f9
Reviewed-on: https://github.com/flang-compiler/f18/pull/782
Tree-same-pre-rewrite: false
peter klausler [Wed, 16 Oct 2019 22:36:54 +0000 (15:36 -0700)]
[flang] Pad short CHARACTER actual arguments
Original-commit: flang-compiler/f18@
b9c890ca9cc3e07967ece4dee739ac8059bb9388
Reviewed-on: https://github.com/flang-compiler/f18/pull/782
Tree-same-pre-rewrite: false
peter klausler [Wed, 16 Oct 2019 18:53:03 +0000 (11:53 -0700)]
[flang] Revert to returning default INTEGER for LEN() and offset-in-CHARACTER intrinsics; further shape analysis of intrinsic results
Original-commit: flang-compiler/f18@
561f5965b2309df3cd15d7e2a96d7e73f2f76e35
Reviewed-on: https://github.com/flang-compiler/f18/pull/782
Tree-same-pre-rewrite: false
peter klausler [Wed, 16 Oct 2019 17:35:34 +0000 (10:35 -0700)]
[flang] Better shape analysis for CSHIFT, EOSHIFT, SPREAD
Original-commit: flang-compiler/f18@
eb43df85a6048d0ffe417998d068bb6c45e702e0
Reviewed-on: https://github.com/flang-compiler/f18/pull/782
Tree-same-pre-rewrite: false
peter klausler [Wed, 16 Oct 2019 16:39:37 +0000 (09:39 -0700)]
[flang] Fix some bugs exposed by testing new checks
Original-commit: flang-compiler/f18@
9cc70dcad64a77bb67cdb30f157a00898227f727
Reviewed-on: https://github.com/flang-compiler/f18/pull/782
Tree-same-pre-rewrite: false
peter klausler [Fri, 11 Oct 2019 22:41:11 +0000 (15:41 -0700)]
[flang] rebase
Original-commit: flang-compiler/f18@
2691da38361cb4040e394dd5f631becf4caef221
Reviewed-on: https://github.com/flang-compiler/f18/pull/782
Tree-same-pre-rewrite: false
peter klausler [Thu, 10 Oct 2019 23:06:05 +0000 (16:06 -0700)]
[flang] pass call03
Original-commit: flang-compiler/f18@
8c076bd89b30351b0b6470f4cf621efed1c2ae27
Reviewed-on: https://github.com/flang-compiler/f18/pull/782
Tree-same-pre-rewrite: false
peter klausler [Thu, 10 Oct 2019 20:09:35 +0000 (13:09 -0700)]
[flang] definability tests
Original-commit: flang-compiler/f18@
4b71f003a9c3a88b4a3e5cbad12f33fb46ef0657
Reviewed-on: https://github.com/flang-compiler/f18/pull/782
Tree-same-pre-rewrite: false
peter klausler [Wed, 9 Oct 2019 23:30:34 +0000 (16:30 -0700)]
[flang] Move call semantic checking into lib/semantics
Original-commit: flang-compiler/f18@
7996c85cf3311506093a9864263e198e4199ea29
Reviewed-on: https://github.com/flang-compiler/f18/pull/782
Tree-same-pre-rewrite: false
peter klausler [Tue, 8 Oct 2019 22:21:09 +0000 (15:21 -0700)]
[flang] checkpoint
checkpoint
checkpoint
Original-commit: flang-compiler/f18@
99d12a7215089b4aefdaef39a2407b84538c29ef
Reviewed-on: https://github.com/flang-compiler/f18/pull/782
Tree-same-pre-rewrite: false
Tim Keith [Thu, 10 Oct 2019 18:47:12 +0000 (11:47 -0700)]
[flang] Merge pull request flang-compiler/f18#778 from flang-compiler/tsk-generics
Generic name resolution in expression analysis
Original-commit: flang-compiler/f18@
1688bef152eca1144c985ec7cf9b352a02465130
Reviewed-on: https://github.com/flang-compiler/f18/pull/778
Tim Keith [Wed, 9 Oct 2019 23:08:13 +0000 (16:08 -0700)]
[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@
50e458045a3de42bd60515956e09f0f2d654ae1e
Reviewed-on: https://github.com/flang-compiler/f18/pull/778
Peter Klausler [Mon, 7 Oct 2019 18:28:40 +0000 (11:28 -0700)]
[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@
c582562397a47498a55aaa3671dc0a84d1201af1
Reviewed-on: https://github.com/flang-compiler/f18/pull/776
peter klausler [Mon, 16 Sep 2019 23:58:13 +0000 (16:58 -0700)]
[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@
3cca775da9302e3a2acec4a34800cd7666899b5f
Reviewed-on: https://github.com/flang-compiler/f18/pull/776
Peter Klausler [Mon, 7 Oct 2019 16:40:47 +0000 (09:40 -0700)]
[flang] Merge pull request flang-compiler/f18#777 from flang-compiler/pmk-pp-tests
Import preprocessing tests
Original-commit: flang-compiler/f18@
98f1b5f60b3becd6433ccb1fa1d070529c4cf109
Reviewed-on: https://github.com/flang-compiler/f18/pull/777
peter klausler [Fri, 4 Oct 2019 22:21:31 +0000 (15:21 -0700)]
[flang] Import preprocessing tests
Original-commit: flang-compiler/f18@
7ef7029604fa62c33d47ef0d710403b9f2aae670
Reviewed-on: https://github.com/flang-compiler/f18/pull/777
Steve Scalpone [Thu, 3 Oct 2019 17:59:31 +0000 (10:59 -0700)]
[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@
adbb8becdae433b1727f47cf10affc6eb4328482
Reviewed-on: https://github.com/flang-compiler/f18/pull/775
peter klausler [Wed, 2 Oct 2019 22:42:07 +0000 (15:42 -0700)]
[flang] Fix flang-compiler/f18#773
Original-commit: flang-compiler/f18@
d12d1129b746394d3a179b49c3c2034ecdeafd59
Reviewed-on: https://github.com/flang-compiler/f18/pull/775
Steve Scalpone [Thu, 3 Oct 2019 17:59:14 +0000 (10:59 -0700)]
[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@
c098156735a9e6b1844f97800be2a94b6a89978f
Reviewed-on: https://github.com/flang-compiler/f18/pull/774
peter klausler [Wed, 2 Oct 2019 23:52:27 +0000 (16:52 -0700)]
[flang] Final tweaks
Original-commit: flang-compiler/f18@
6e269b4e299d04a14eb4efc125821168eedeef04
Reviewed-on: https://github.com/flang-compiler/f18/pull/774
peter klausler [Wed, 2 Oct 2019 23:30:36 +0000 (16:30 -0700)]
[flang] Extend documentation
Original-commit: flang-compiler/f18@
7e11f8165f67426ff33887677adf5d723e3895b6
Reviewed-on: https://github.com/flang-compiler/f18/pull/774
Tree-same-pre-rewrite: false
peter klausler [Wed, 2 Oct 2019 23:14:01 +0000 (16:14 -0700)]
[flang] Dodge weird clang-format behavior
Original-commit: flang-compiler/f18@
48b81a2dd9e6f92725be92b3225b1cd258173607
Reviewed-on: https://github.com/flang-compiler/f18/pull/774
Tree-same-pre-rewrite: false
peter klausler [Wed, 2 Oct 2019 22:48:20 +0000 (15:48 -0700)]
[flang] Address review comments
Original-commit: flang-compiler/f18@
b2a0503614b325c62af920db5a183a2e254994f7
Reviewed-on: https://github.com/flang-compiler/f18/pull/774
Tree-same-pre-rewrite: false
peter klausler [Wed, 2 Oct 2019 21:24:44 +0000 (14:24 -0700)]
[flang] Retain no-op default: cases when compiling with gcc
Original-commit: flang-compiler/f18@
8ebfd8d2e9b00ae003ecdc5eb71f63e6fe908143
Reviewed-on: https://github.com/flang-compiler/f18/pull/774
Tree-same-pre-rewrite: false
peter klausler [Wed, 2 Oct 2019 19:40:52 +0000 (12:40 -0700)]
[flang] Enable more warnings, clean them up
Original-commit: flang-compiler/f18@
c6b3420e5fd7aca76453ae996bec1c8402a2ab43
Reviewed-on: https://github.com/flang-compiler/f18/pull/774
Tree-same-pre-rewrite: false
Steve Scalpone [Thu, 3 Oct 2019 17:58:45 +0000 (10:58 -0700)]
[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@
ff8dde78e6c7ad93fe1d9055d345f7355706eaad
Reviewed-on: https://github.com/flang-compiler/f18/pull/772
David Truby [Thu, 3 Oct 2019 09:37:05 +0000 (10:37 +0100)]
[flang] Removed stray comma in unparse for dist_schedule clause
Original-commit: flang-compiler/f18@
0b61bc22c23fa302b34cb560cb291f0484926e5e
Reviewed-on: https://github.com/flang-compiler/f18/pull/772
David Truby [Wed, 2 Oct 2019 15:58:11 +0000 (16:58 +0100)]
[flang] Make the second argument to dist_schedule optional.
Original-commit: flang-compiler/f18@
7ed2d0e3ec68f00c483d3107d0383a4f172d1feb
Reviewed-on: https://github.com/flang-compiler/f18/pull/772
Tree-same-pre-rewrite: false
Steve Scalpone [Thu, 3 Oct 2019 17:58:24 +0000 (10:58 -0700)]
[flang] Merge pull request flang-compiler/f18#771 from DavidTruby/distribute
Added basic sema checks for distribute construct
Original-commit: flang-compiler/f18@
3aeb44b3a8a5fe8baa2e1758ae2e38c89a57eedd
Reviewed-on: https://github.com/flang-compiler/f18/pull/771
David Truby [Wed, 2 Oct 2019 15:04:30 +0000 (16:04 +0100)]
[flang] Added basic sema checks for distribute construct
Original-commit: flang-compiler/f18@
f23059bf308a3d29b60bc0452deaa23da3d8eaa1
Reviewed-on: https://github.com/flang-compiler/f18/pull/771
Steve Scalpone [Thu, 3 Oct 2019 17:57:46 +0000 (10:57 -0700)]
[flang] Merge pull request flang-compiler/f18#767 from DavidTruby/generic-fp
Replace access through union with reinterpret_cast.
Original-commit: flang-compiler/f18@
f7d8318b56665ed1c6d7998310bf3d51db4aae12
Reviewed-on: https://github.com/flang-compiler/f18/pull/767
David Truby [Tue, 1 Oct 2019 10:15:43 +0000 (11:15 +0100)]
[flang] Added comment about gcc function cast workaround.
Original-commit: flang-compiler/f18@
28bc021323b5b76371fe3f5640b17f8adb0ee4b1
Reviewed-on: https://github.com/flang-compiler/f18/pull/767
David Truby [Mon, 30 Sep 2019 11:41:34 +0000 (12:41 +0100)]
[flang] Replace access through union with reinterpret_cast.
This avoids undefined behaviour.
Original-commit: flang-compiler/f18@
e289bbfa83ebb818971a688b019be697fd900d62
Reviewed-on: https://github.com/flang-compiler/f18/pull/767
Tree-same-pre-rewrite: false
Eric Schweitz [Wed, 2 Oct 2019 18:02:24 +0000 (11:02 -0700)]
[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@
5bf0827c20f4b9be3b49c1fd28bb14871a3ed9ad
Reviewed-on: https://github.com/flang-compiler/f18/pull/720
Eric Schweitz [Mon, 9 Sep 2019 18:20:02 +0000 (11:20 -0700)]
[flang] add initial Burnside bridge code
Original-commit: flang-compiler/f18@
0d387d146849ecb218b554e3b072794c8d6216d6
Reviewed-on: https://github.com/flang-compiler/f18/pull/720
psteinfeld [Tue, 1 Oct 2019 20:10:21 +0000 (13:10 -0700)]
[flang] Merge pull request flang-compiler/f18#769 from flang-compiler/ps-c1137
More semantic checking for DO constructs
Original-commit: flang-compiler/f18@
3a13d84742a88a0684e372e025e4e7530378d3bf
Reviewed-on: https://github.com/flang-compiler/f18/pull/769
Pete Steinfeld [Mon, 30 Sep 2019 20:52:05 +0000 (13:52 -0700)]
[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@
c16b883db3016bceb2c795babe047d297ba92717
Reviewed-on: https://github.com/flang-compiler/f18/pull/769
Steve Scalpone [Tue, 1 Oct 2019 07:09:40 +0000 (00:09 -0700)]
[flang] Merge pull request flang-compiler/f18#748 from DavidTruby/map
Added semantic checks for map clauses
Original-commit: flang-compiler/f18@
183b3aab8351bdc0018c9d4963e9ce07588560af
Reviewed-on: https://github.com/flang-compiler/f18/pull/748
David Truby [Wed, 18 Sep 2019 09:12:57 +0000 (10:12 +0100)]
[flang] Added grammar comments for enter data and exit data directives
Original-commit: flang-compiler/f18@
a1e6cded2f0c0af9fda8ea53ac8c6636843e07e1
Reviewed-on: https://github.com/flang-compiler/f18/pull/748
David Truby [Tue, 17 Sep 2019 08:53:27 +0000 (09:53 +0100)]
[flang] Corrected check for required OpenMP clauses
Original-commit: flang-compiler/f18@
ce3ec50c3f01785f8bc0f92f1a7f6b65b2e52973
Reviewed-on: https://github.com/flang-compiler/f18/pull/748
Tree-same-pre-rewrite: false
David Truby [Mon, 16 Sep 2019 14:44:31 +0000 (15:44 +0100)]
[flang] Corrections for map semantics to match coding style
Original-commit: flang-compiler/f18@
f2d97c3a1e77398addecbdb20ed55f2aa01361d8
Reviewed-on: https://github.com/flang-compiler/f18/pull/748
Tree-same-pre-rewrite: false
David Truby [Fri, 13 Sep 2019 14:42:19 +0000 (15:42 +0100)]
[flang] Added semantic checks for map clauses
Original-commit: flang-compiler/f18@
75b62283888c53c066999245bcd1fe9bdd29fe41
Reviewed-on: https://github.com/flang-compiler/f18/pull/748
Tree-same-pre-rewrite: false
Eric Schweitz [Fri, 27 Sep 2019 22:07:44 +0000 (15:07 -0700)]
[flang] Merge pull request flang-compiler/f18#696 from schweitzpgi/fir-type
add fir types header
Original-commit: flang-compiler/f18@
fc53f3415ee67bf731287e44593fa51ef4fd82ec
Reviewed-on: https://github.com/flang-compiler/f18/pull/696
Eric Schweitz [Thu, 26 Sep 2019 20:08:27 +0000 (13:08 -0700)]
[flang] sync latest changes to these files
Original-commit: flang-compiler/f18@
97becf30fa9cf79f8fd1aa01d1e1e2271251e4a9
Reviewed-on: https://github.com/flang-compiler/f18/pull/696
Eric Schweitz [Tue, 17 Sep 2019 21:23:20 +0000 (14:23 -0700)]
[flang] latest changes
Original-commit: flang-compiler/f18@
c4278fe1aa82c5667f7dd9de21c8d3777a48d07b
Reviewed-on: https://github.com/flang-compiler/f18/pull/696
Tree-same-pre-rewrite: false
Eric Schweitz [Tue, 10 Sep 2019 15:25:34 +0000 (08:25 -0700)]
[flang] add FIROps.h
Original-commit: flang-compiler/f18@
e53fefb66cd1f86b0c157786f41b05bbb607c54c
Reviewed-on: https://github.com/flang-compiler/f18/pull/696
Tree-same-pre-rewrite: false
Eric Schweitz [Mon, 9 Sep 2019 23:05:02 +0000 (16:05 -0700)]
[flang] fix name of argument
Original-commit: flang-compiler/f18@
ad505459416fabf3f9b3663bd170f1645abbfc88
Reviewed-on: https://github.com/flang-compiler/f18/pull/696
Tree-same-pre-rewrite: false
Eric Schweitz [Fri, 6 Sep 2019 23:15:37 +0000 (16:15 -0700)]
[flang] add attributes
Original-commit: flang-compiler/f18@
d35f55b0d5fc45d161515824731430bda8fd3d67
Reviewed-on: https://github.com/flang-compiler/f18/pull/696
Tree-same-pre-rewrite: false
Eric Schweitz [Fri, 6 Sep 2019 20:37:14 +0000 (13:37 -0700)]
[flang] more cleanup
Original-commit: flang-compiler/f18@
23fdcf77d03e0b813eb000237e127bf9eea92a15
Reviewed-on: https://github.com/flang-compiler/f18/pull/696
Tree-same-pre-rewrite: false
Eric Schweitz [Fri, 6 Sep 2019 20:25:42 +0000 (13:25 -0700)]
[flang] changes per review comments
Original-commit: flang-compiler/f18@
eb34e2d47b1a8d43c87ce4368046fe2195e3b783
Reviewed-on: https://github.com/flang-compiler/f18/pull/696
Tree-same-pre-rewrite: false
Eric Schweitz [Wed, 28 Aug 2019 20:53:50 +0000 (13:53 -0700)]
[flang] add fir types header
Original-commit: flang-compiler/f18@
4dc278b271ca5c30505db1c980d284929e464541
Reviewed-on: https://github.com/flang-compiler/f18/pull/696
Tree-same-pre-rewrite: false
Peter Klausler [Fri, 27 Sep 2019 21:53:14 +0000 (14:53 -0700)]
[flang] Merge pull request flang-compiler/f18#766 from flang-compiler/pmk-fix-765
Fix flang-compiler/f18#765
Original-commit: flang-compiler/f18@
2fffc265c328ef0169ca63f654f1d54401a86880
Reviewed-on: https://github.com/flang-compiler/f18/pull/766
peter klausler [Fri, 27 Sep 2019 21:08:09 +0000 (14:08 -0700)]
[flang] Fix flang-compiler/f18#765
Original-commit: flang-compiler/f18@
bb2ffac7176ce81079940b8736461cb01794f9c8
Reviewed-on: https://github.com/flang-compiler/f18/pull/766
psteinfeld [Thu, 26 Sep 2019 21:06:58 +0000 (14:06 -0700)]
[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@
2856f0f2488c57874d2d06a6f40a02b4ddf1a109
Reviewed-on: https://github.com/flang-compiler/f18/pull/764
Pete Steinfeld [Thu, 26 Sep 2019 20:33:48 +0000 (13:33 -0700)]
[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@
9cc6f5bd40689fa4bd0972e821ad3a871733b6fb
Reviewed-on: https://github.com/flang-compiler/f18/pull/764
Tim Keith [Wed, 25 Sep 2019 22:58:32 +0000 (15:58 -0700)]
[flang] Merge pull request flang-compiler/f18#761 from flang-compiler/tsk-modfiles
Fix clang build on MacOS
Original-commit: flang-compiler/f18@
b99d1665fc04e87183ad8077a5e139c1df810738
Reviewed-on: https://github.com/flang-compiler/f18/pull/761
Tim Keith [Wed, 25 Sep 2019 22:39:44 +0000 (15:39 -0700)]
[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@
738deab4656478df41a3ef7fdb9f02fe503779c5
Reviewed-on: https://github.com/flang-compiler/f18/pull/761
Steve Scalpone [Wed, 25 Sep 2019 22:16:18 +0000 (15:16 -0700)]
[flang] Merge pull request flang-compiler/f18#750 from DavidTruby/teams
Semantic checks for OpenMP teams directive
Original-commit: flang-compiler/f18@
4b2a8be379a745afb7bdd689b943ce5868f2bdc6
Reviewed-on: https://github.com/flang-compiler/f18/pull/750
David Truby [Thu, 19 Sep 2019 09:02:35 +0000 (10:02 +0100)]
[flang] Added grammar for teams directive to semantic checks
Original-commit: flang-compiler/f18@
1cee26516b39824523b4ec8c44a076d6a3f56e25
Reviewed-on: https://github.com/flang-compiler/f18/pull/750
David Truby [Tue, 17 Sep 2019 11:08:04 +0000 (12:08 +0100)]
[flang] Semantic checks for teams directive
Original-commit: flang-compiler/f18@
ec22e9c4c2b5592975c53869f3cfbcd097222203
Reviewed-on: https://github.com/flang-compiler/f18/pull/750
Tree-same-pre-rewrite: false
Steve Scalpone [Wed, 25 Sep 2019 21:59:58 +0000 (14:59 -0700)]
[flang] Merge pull request flang-compiler/f18#751 from flang-compiler/sjs-style-update
Update C++style.md
Original-commit: flang-compiler/f18@
ab0cce154634900f64c8a6184d5e0302f790e5d6
Reviewed-on: https://github.com/flang-compiler/f18/pull/751
Steve Scalpone [Wed, 18 Sep 2019 00:07:06 +0000 (17:07 -0700)]
[flang] Update C++style.md
Original-commit: flang-compiler/f18@
d453fdda31dc6ff479d21fc3009c07c076b51a71
Reviewed-on: https://github.com/flang-compiler/f18/pull/751
Steve Scalpone [Tue, 17 Sep 2019 19:31:37 +0000 (12:31 -0700)]
[flang] Update C++style.md
Add guidelines for error messages and commas. Add a version number for clang-format. Add spaces before ### sections to restart numbering.
Original-commit: flang-compiler/f18@
3e8db49f34e2dc47ce5b89af6099710f708f64c3
Reviewed-on: https://github.com/flang-compiler/f18/pull/751
Tree-same-pre-rewrite: false
Tim Keith [Wed, 25 Sep 2019 21:55:40 +0000 (14:55 -0700)]
[flang] Merge pull request flang-compiler/f18#758 from flang-compiler/tsk-modfiles
Improve module file reading and writing
Original-commit: flang-compiler/f18@
b5f48dfc461db37650a54aea3e29531b577fd871
Reviewed-on: https://github.com/flang-compiler/f18/pull/758
Tim Keith [Mon, 23 Sep 2019 23:39:57 +0000 (16:39 -0700)]
[flang] Fix tests that use the same .mod file
The tests run by `test_any.sh` don't redirect their .mod files to
a different directory so they occasionally fail when the same file
is accessed by different tests at the same time. With locking of
module files implemented, this problem reproduces much more reliably
Work around it by changing the module names to be distinct. Also remove
some comments left over when copied from `test_symbols.sh` tests.
Original-commit: flang-compiler/f18@
f7b5c5f0fcbbac4736940761e6d43ec76a3a372a
Reviewed-on: https://github.com/flang-compiler/f18/pull/758
Tim Keith [Tue, 24 Sep 2019 00:10:58 +0000 (17:10 -0700)]
[flang] Improve module file reading and writing
Fix problems with writing a mod file while another compilation is
reading or writing. Write to a temp and then rename it:
- compute the new contents of the .mod file
- if it already exists, check if it is already correct
- if not, write new contents to a temp file
- rename the temp to the final destination
`mkstemps()` seems to be the best way to create the temp file.
It returns a file descriptor, so change the rest of the mod file
writing to use POSIX open/read/write/close. This seems to set
errno more reliably too.
There is some extra work around creating the temp to make it have
the same directory and suffix as the final file (so that if one gets
left behind by a crash, "rm *.mod" still cleans it up).
`mkstemps()` creates file with 0600 permissions so try to change it
to what it would have been if we just wrote the file.
Change module file reading to only read the file once; we used to
read it to verify the checksum and then again to parse it.
Instead, change `Parsing` so that we can get the file contents
after `Prescan()` and use that to verify the checksum. Also, it has
a mechanism for searching directories for files, so make use of that
instead of duplicating that functionality in `ModFileReader`.
This requires some changes to how errors are returned so they can
be reported in the right place.
Original-commit: flang-compiler/f18@
d0d54971a5547820f8ed0271eb9818557bc8bc82
Reviewed-on: https://github.com/flang-compiler/f18/pull/758
Tree-same-pre-rewrite: false
Peter Klausler [Wed, 25 Sep 2019 17:57:24 +0000 (10:57 -0700)]
[flang] Merge pull request flang-compiler/f18#760 from flang-compiler/pmk-fix-build
Fix build on OSX
Original-commit: flang-compiler/f18@
61dcae34429c0c49d05b0b0652f0811f56923d49
Reviewed-on: https://github.com/flang-compiler/f18/pull/760
peter klausler [Wed, 25 Sep 2019 17:40:01 +0000 (10:40 -0700)]
[flang] Fix build on OSX
Original-commit: flang-compiler/f18@
453b03af1c594e32b1a3b6f994da5bfc9bc7eca7
Reviewed-on: https://github.com/flang-compiler/f18/pull/760
Peter Klausler [Wed, 25 Sep 2019 16:23:29 +0000 (09:23 -0700)]
[flang] Merge pull request flang-compiler/f18#755 from flang-compiler/pmk-spec-expr
Check specification expression constraints (10.1.11)
Original-commit: flang-compiler/f18@
0c99f8dc8e583fd7425514cff0ce31bc8b1a13db
Reviewed-on: https://github.com/flang-compiler/f18/pull/755
peter klausler [Tue, 24 Sep 2019 21:17:50 +0000 (14:17 -0700)]
[flang] Address review comments
Original-commit: flang-compiler/f18@
2393157d3fa9cdb870035986b6f56c81f481c4e7
Reviewed-on: https://github.com/flang-compiler/f18/pull/755
peter klausler [Fri, 20 Sep 2019 21:28:15 +0000 (14:28 -0700)]
[flang] Clean up test results
Original-commit: flang-compiler/f18@
7d3180160c83577f7bfb108ac047ce18b6ab1166
Reviewed-on: https://github.com/flang-compiler/f18/pull/755
Tree-same-pre-rewrite: false
peter klausler [Fri, 20 Sep 2019 18:02:17 +0000 (11:02 -0700)]
[flang] Prep for review
Original-commit: flang-compiler/f18@
8be02a41c7e0312a95ee4ea399318eb20c45ccce
Reviewed-on: https://github.com/flang-compiler/f18/pull/755
Tree-same-pre-rewrite: false
peter klausler [Fri, 20 Sep 2019 16:58:19 +0000 (09:58 -0700)]
[flang] Remove dead code
Original-commit: flang-compiler/f18@
4d90aad3614a00e0c37595a0643d1b282148c6cd
Reviewed-on: https://github.com/flang-compiler/f18/pull/755
Tree-same-pre-rewrite: false
peter klausler [Fri, 20 Sep 2019 16:46:00 +0000 (09:46 -0700)]
[flang] Build with all compilers * versions
Original-commit: flang-compiler/f18@
7332caa613696aa61dad848d8ed5790294edc7b9
Reviewed-on: https://github.com/flang-compiler/f18/pull/755
Tree-same-pre-rewrite: false
peter klausler [Thu, 19 Sep 2019 22:49:13 +0000 (15:49 -0700)]
[flang] Complete conversions, delete old visitor
Original-commit: flang-compiler/f18@
6ce1da55c8f62f60a3f3727ce8f2d01394d4133b
Reviewed-on: https://github.com/flang-compiler/f18/pull/755
Tree-same-pre-rewrite: false
peter klausler [Thu, 19 Sep 2019 21:56:12 +0000 (14:56 -0700)]
[flang] more conversions to Traverse
Original-commit: flang-compiler/f18@
e8668e23687f8cf0ae4a2300ed23a93a95b67470
Reviewed-on: https://github.com/flang-compiler/f18/pull/755
Tree-same-pre-rewrite: false
peter klausler [Thu, 19 Sep 2019 19:19:17 +0000 (12:19 -0700)]
[flang] Refinements; replace several clients of old Visitor with new Traverse
Original-commit: flang-compiler/f18@
0b44a86e31c0c7f84cf0c8dcafbedfb5e0e09c9f
Reviewed-on: https://github.com/flang-compiler/f18/pull/755
Tree-same-pre-rewrite: false
peter klausler [Wed, 18 Sep 2019 23:47:25 +0000 (16:47 -0700)]
[flang] Redo IsInitialDataTarget
Original-commit: flang-compiler/f18@
988c38e1f53115291a5e2a0c7e059cbb42bf096b
Reviewed-on: https://github.com/flang-compiler/f18/pull/755
Tree-same-pre-rewrite: false
peter klausler [Wed, 18 Sep 2019 22:43:12 +0000 (15:43 -0700)]
[flang] Repackaging; tests pass
Original-commit: flang-compiler/f18@
1fa7bb7717a1feb2e93e40c907ffe49c10f45332
Reviewed-on: https://github.com/flang-compiler/f18/pull/755
Tree-same-pre-rewrite: false
peter klausler [Wed, 18 Sep 2019 00:08:32 +0000 (17:08 -0700)]
[flang] progress
Original-commit: flang-compiler/f18@
b5e3e709cb0f9ee61124af3422372b01132e07be
Reviewed-on: https://github.com/flang-compiler/f18/pull/755
Tree-same-pre-rewrite: false
peter klausler [Tue, 17 Sep 2019 22:21:20 +0000 (15:21 -0700)]
[flang] add test
Original-commit: flang-compiler/f18@
ad2fa9dfdf2da204ad1c9ef510133b8ba43b41aa
Reviewed-on: https://github.com/flang-compiler/f18/pull/755
Tree-same-pre-rewrite: false
peter klausler [Tue, 17 Sep 2019 22:21:02 +0000 (15:21 -0700)]
[flang] checkpoint
Original-commit: flang-compiler/f18@
96ade8e6e9004a3f556defbb6f252214c9e38459
Reviewed-on: https://github.com/flang-compiler/f18/pull/755
Tree-same-pre-rewrite: false
peter klausler [Mon, 16 Sep 2019 18:22:27 +0000 (11:22 -0700)]
[flang] checkpoint
Original-commit: flang-compiler/f18@
782f44fe7d1cc23f6edac4b18104f932a6884490
Reviewed-on: https://github.com/flang-compiler/f18/pull/755
Tree-same-pre-rewrite: false
psteinfeld [Wed, 25 Sep 2019 15:49:46 +0000 (08:49 -0700)]
[flang] Merge pull request flang-compiler/f18#756 from flang-compiler/ps-do
Implementation of semantic checks C1135, C1167, and C1168
Original-commit: flang-compiler/f18@
e43377f999862e22ddd141f95d9988a1ad5da8a4
Reviewed-on: https://github.com/flang-compiler/f18/pull/756
Pete Steinfeld [Tue, 24 Sep 2019 22:33:51 +0000 (15:33 -0700)]
[flang] More responses to pull request comments.
Original-commit: flang-compiler/f18@
0fb4cf1c9b3fe36e2c5075981e0d7ce61cb49aae
Reviewed-on: https://github.com/flang-compiler/f18/pull/756
Pete Steinfeld [Tue, 24 Sep 2019 17:44:44 +0000 (10:44 -0700)]
[flang] More responses to comments in the pull request. The big change was to
implement an enum class to indicate whether the statement being checked
is a CYCLE or EXIT statement. This change rippled through a few
interfaces, resulting in cleaner, more readable code. Thanks for the
tip, Tim!
Original-commit: flang-compiler/f18@
e167c3d39fa95c93f402a0bfdf916dc10dbd80e1
Reviewed-on: https://github.com/flang-compiler/f18/pull/756
Tree-same-pre-rewrite: false