platform/upstream/llvm.git
5 years ago[flang] Merge pull request flang-compiler/f18#494 from flang-compiler/tsk4
Tim Keith [Wed, 12 Jun 2019 21:49:32 +0000 (14:49 -0700)]
[flang] Merge pull request flang-compiler/f18#494 from flang-compiler/tsk4

Resolve and check names in equivalence sets

Original-commit: flang-compiler/f18@b1cc835872035a761090cf900e41d64fdab8640b
Reviewed-on: https://github.com/flang-compiler/f18/pull/494

5 years ago[flang] Handle substring of array element in EQUIVALENCE
Tim Keith [Wed, 12 Jun 2019 19:38:04 +0000 (12:38 -0700)]
[flang] Handle substring of array element in EQUIVALENCE

A substring of an array element is legal as an equivalence object,
e.g. `a(2,3)[4:5]`. Extend `EquivalenceObject` to include the start
of the substring, if any. Split `CheckBound` into `CheckArrayBound`
and `CheckSubstringBound`.

When evaluating bounds in `AddToSet` we can assert they are constant
because all of the error cases should have been detected already.

Original-commit: flang-compiler/f18@0b4050b2d56e166458c5d9259234a1d404e467e4
Reviewed-on: https://github.com/flang-compiler/f18/pull/494

5 years ago[flang] Resolve and check names in equivalence sets
Tim Keith [Wed, 12 Jun 2019 01:26:48 +0000 (18:26 -0700)]
[flang] Resolve and check names in equivalence sets

Collect sets of `parser::EquivalenceObject` to process at the end of
the specification part. This is so that names mentioned in the
EQUIVALENCE statement don't trigger implicit declarations.

The `EquivalenceSets` class performs most of the numerous checks
on objects that can be in equivalence sets at all and objects that
can be in them together. It also merges sets when the same object
appears in more than one.

Once equivalence sets are checked they are added to the `Scope`.
Further checks will be necessary after the size and alignment of
variables are computed.

Add `FindUltimateComponent` to simplify checks on ultimate components
of derived types. Use it to implement `HasCoarrayUltimateComponent`
and checks on equivalence objects.

Make `ExpressionAnalyzer::Analyze(Designator)` public so that
`parser::EquivalenceObject` can be analyzed.

Add `GetDefaultKind`, `doublePrecisionKind`, and `quadPrecisionKind`
to `SemanticsContext` so that `defaultKinds_` does not need to be
accessed directly.

Original-commit: flang-compiler/f18@1cc898e5b8d5dbda19748d8bc2ee8cba5c7df4ec
Reviewed-on: https://github.com/flang-compiler/f18/pull/494
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#492 from flang-compiler/pmk-bug491
Peter Klausler [Tue, 11 Jun 2019 20:03:58 +0000 (13:03 -0700)]
[flang] Merge pull request flang-compiler/f18#492 from flang-compiler/pmk-bug491

Fix bug flang-compiler/f18#491 (and replace a misleading name)

Original-commit: flang-compiler/f18@41d0c067016f811caaca70f66cd9dfbfcee9cf2b
Reviewed-on: https://github.com/flang-compiler/f18/pull/492

5 years ago[flang] Improve clarity per review comment
peter klausler [Tue, 11 Jun 2019 19:50:27 +0000 (12:50 -0700)]
[flang] Improve clarity per review comment

Original-commit: flang-compiler/f18@7206c08f2ae2f8780f26b2ce4c616cff907b41c6
Reviewed-on: https://github.com/flang-compiler/f18/pull/492

5 years ago[flang] Fix bug flang-compiler/f18#491 (and replace a misleading name)
peter klausler [Tue, 11 Jun 2019 19:06:18 +0000 (12:06 -0700)]
[flang] Fix bug flang-compiler/f18#491 (and replace a misleading name)

Original-commit: flang-compiler/f18@d0d154e31286afd08919e7011fb7fd7878aefdac
Reviewed-on: https://github.com/flang-compiler/f18/pull/492
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#478 from flang-compiler/ps-issue458
psteinfeld [Tue, 11 Jun 2019 14:15:40 +0000 (07:15 -0700)]
[flang] Merge pull request flang-compiler/f18#478 from flang-compiler/ps-issue458

Semantic checks for DO controls of type REAL

Original-commit: flang-compiler/f18@b52469ecd113ddf28f4a3ea6d34d3b91f4ff579a
Reviewed-on: https://github.com/flang-compiler/f18/pull/478

5 years ago[flang] Fixed situations where multiple error messages were being emitted.
Peter Steinfeld [Mon, 10 Jun 2019 22:10:32 +0000 (15:10 -0700)]
[flang] Fixed situations where multiple error messages were being emitted.

Original-commit: flang-compiler/f18@ac62cfa9cd92e95e7b80f7aad66ceabb83ee3eda
Reviewed-on: https://github.com/flang-compiler/f18/pull/478

5 years ago[flang] Renamed check.*do.*stmt to check.*do to better conform with the grammar.
Peter Steinfeld [Mon, 10 Jun 2019 21:03:24 +0000 (14:03 -0700)]
[flang] Renamed check.*do.*stmt to check.*do to better conform with the grammar.

Original-commit: flang-compiler/f18@d7419566e7e4b1d48914e2c5455031eb5fd0e54d
Reviewed-on: https://github.com/flang-compiler/f18/pull/478
Tree-same-pre-rewrite: false

5 years ago[flang] These are additional changes for issue 458, to perform semantic checks on DO
Peter Steinfeld [Mon, 10 Jun 2019 20:30:29 +0000 (13:30 -0700)]
[flang] These are additional changes for issue 458, to perform semantic checks on DO
variable and initial, final, and step expressions.

Here's a summary of the changes since my original pull request:

 - I've taken into account the possibility that the DO variable is declared in
   a MODULE.  This required a call to GetUltimate() on the Symbol for the DO
   variable.
 - The previous change exposed problems in the semantic checking for NULLIFY
   and DEALLOCATE statements, so I've included fixes and tests for those.  I
   also added a test for the ALLOCATE statement, even though it was already
   handling this case.
 - I now handle the case where a procedure name is erroneously used as a DO variable.
 - I now handle the case where a pointer to a procedure is erroneously used as
   a DO variable.
 - I now check that the DO expressions are not null.
 - I added tests for all cases listed above.

Original-commit: flang-compiler/f18@219d856fdb6f36c152153085dbe73eda3442127c
Reviewed-on: https://github.com/flang-compiler/f18/pull/478
Tree-same-pre-rewrite: false

5 years ago[flang] Changes in response to Peter's comments on a previous pull request.
Peter Steinfeld [Thu, 6 Jun 2019 21:05:02 +0000 (14:05 -0700)]
[flang] Changes in response to Peter's comments on a previous pull request.

Specifically, that the conversion of warnings to errors will happen in a
single place in the compiler once we implement warnings as distinct from
errors.  This change made on of the tests invalid.

Also, there's no need to check whether the extension to allow
REAL DO controls is enabled.

Original-commit: flang-compiler/f18@2fae9edd77b930cef8ececb16d719f16477ef3b0
Reviewed-on: https://github.com/flang-compiler/f18/pull/478
Tree-same-pre-rewrite: false

5 years ago[flang] Added the machinery for REAL DO controls to be treated as a separate
Peter Steinfeld [Wed, 5 Jun 2019 21:34:25 +0000 (14:34 -0700)]
[flang] Added the machinery for REAL DO controls to be treated as a separate
extension.

Original-commit: flang-compiler/f18@1907cf867277df34925bfab53f2060c303774ce3
Reviewed-on: https://github.com/flang-compiler/f18/pull/478
Tree-same-pre-rewrite: false

5 years ago[flang] Changes responding to comments on my previous pull request. Specifically --
Peter Steinfeld [Wed, 5 Jun 2019 18:57:09 +0000 (11:57 -0700)]
[flang] Changes responding to comments on my previous pull request.  Specifically --

parse-tree.cc
 - Cleaned up the use of "const" in several declarations.
check-do-stmt.cc
 - Replaced uses of parser::Messages with SemanticsContext.
 - Removed unused "==" operator from the DoStmtContext class.
 - Reduced the size of the GetBounds function by calling GetLoopControl().
 - Changed the warning message for REAL DO controls to not mention standard
   extensions.
check-do-stmt.h
 - Restored the forward reference to Fortran::parser::DoConstruct and removed
   the include of parse-tree.h
dosemantics*.f90
 - Removed extraneous references to the "RUN" command.
test_errors.sh
 - Simplified and generalized the extraction of the OPTIONS specification.

Original-commit: flang-compiler/f18@04a071276648e505f6f958739239e6f7f5870ff4
Reviewed-on: https://github.com/flang-compiler/f18/pull/478
Tree-same-pre-rewrite: false

5 years ago[flang] These changes are for issue 458, to perform semantic checks on DO variable
Peter Steinfeld [Tue, 4 Jun 2019 22:14:34 +0000 (15:14 -0700)]
[flang] These changes are for issue 458, to perform semantic checks on DO variable
and initial, final, and step expressions.  As a new extension, we want to allow
REAL and DOUBLE PRECISION values for them by default.

Here's a summary of the changes:
 - There already existed infrastructure for semantic checking of DO loops that
   was partially specific to DO CONCURRENT loops.  Because I re-used some of
   this infrastructure, I renamed some files and classes from "concurrent" to
   "stmt".
 - I added some functions to distinguish among the different kinds of DO
   statements.
 - I added the functions to check-do-stmt.cc to produce the necessary warnins
   and errors.  Note that there are no tests for the warnings since the
   necessary testing infrastructure does not yet exist.
 - I changed test-errors.sh so that additional compilation options can be
   specified in the test source.
 - I added two new tests to test for the various kinds of values that can be
   used for the DO variables and control expressions.  The two tests are
   identical except for the use of different compilation options.
   dosemantics03.f90 specifies the options "-Mstandard -Werror" to produce
   error messages for the use of REAL and DOUBLE PRECISION DO variables and
   controls.  dosemantics04.f90 uses the default options and only produces
   error messages for contructs that are erroneous by default.

Original-commit: flang-compiler/f18@f484660c75941b5af93bd8bc7aabe73ab958769c
Reviewed-on: https://github.com/flang-compiler/f18/pull/478
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#490 from flang-compiler/pmk-gcc-9.1.0
Peter Klausler [Mon, 10 Jun 2019 16:26:29 +0000 (09:26 -0700)]
[flang] Merge pull request flang-compiler/f18#490 from flang-compiler/pmk-gcc-9.1.0

Dodge a GCC-specific valgrind warning

Original-commit: flang-compiler/f18@2880605122f42339292410b34f1034b45a35a63e
Reviewed-on: https://github.com/flang-compiler/f18/pull/490

5 years ago[flang] Remove temporary debugging code
peter klausler [Mon, 10 Jun 2019 16:26:02 +0000 (09:26 -0700)]
[flang] Remove temporary debugging code

Original-commit: flang-compiler/f18@e7147ebfbe3629149d5afa751c5234d8f577f8db
Reviewed-on: https://github.com/flang-compiler/f18/pull/490

5 years ago[flang] Dodge valgrind complaint by cleaning up the grammar a bit
peter klausler [Fri, 7 Jun 2019 23:00:46 +0000 (16:00 -0700)]
[flang] Dodge valgrind complaint by cleaning up the grammar a bit

Original-commit: flang-compiler/f18@3f9f9af1e8794df628d537c494c8f260bb92c0ca
Reviewed-on: https://github.com/flang-compiler/f18/pull/490
Tree-same-pre-rewrite: false

5 years ago[flang] some clean-up
peter klausler [Fri, 7 Jun 2019 17:21:20 +0000 (10:21 -0700)]
[flang] some clean-up

Original-commit: flang-compiler/f18@6134e1c2f28727990ca2441311e4fe8108559481
Reviewed-on: https://github.com/flang-compiler/f18/pull/490
Tree-same-pre-rewrite: false

5 years ago[flang] Remove needless braces
peter klausler [Tue, 7 May 2019 19:24:59 +0000 (12:24 -0700)]
[flang] Remove needless braces

Original-commit: flang-compiler/f18@edd18355be574122aaa9abf58c15d8c50fb085a1
Reviewed-on: https://github.com/flang-compiler/f18/pull/490
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#489 from schweitzpgi/chipper
Eric Schweitz [Fri, 7 Jun 2019 20:40:50 +0000 (13:40 -0700)]
[flang] Merge pull request flang-compiler/f18#489 from schweitzpgi/chipper

Remove the FIR directory

Original-commit: flang-compiler/f18@8ef23f0720be3070518de26c8f73c00d2bcf84e4
Reviewed-on: https://github.com/flang-compiler/f18/pull/489

5 years ago[flang] remove FIR
Eric Schweitz [Fri, 7 Jun 2019 17:17:41 +0000 (10:17 -0700)]
[flang] remove FIR

Original-commit: flang-compiler/f18@008ad16e289d5cb212396c3118095a0f5f87c6c9
Reviewed-on: https://github.com/flang-compiler/f18/pull/489

5 years ago[flang] Remove the old FIR middle end from the f18 program and speed up build time.
Eric Schweitz [Thu, 6 Jun 2019 17:53:38 +0000 (10:53 -0700)]
[flang] Remove the old FIR middle end from the f18 program and speed up build time.

Original-commit: flang-compiler/f18@5b410b978c50cb367aa9f5e706afea4bd8e1d854
Reviewed-on: https://github.com/flang-compiler/f18/pull/489
Tree-same-pre-rewrite: false

5 years ago[flang] start splitting up afforestation so it isn't monolithic
Eric Schweitz [Tue, 23 Apr 2019 21:40:04 +0000 (14:40 -0700)]
[flang] start splitting up afforestation so it isn't monolithic

Original-commit: flang-compiler/f18@842a42d95450f1ddd2d20720c246b635de7d618c
Reviewed-on: https://github.com/flang-compiler/f18/pull/489
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#488 from flang-compiler/pmk-fixes
Peter Klausler [Fri, 7 Jun 2019 20:32:15 +0000 (13:32 -0700)]
[flang] Merge pull request flang-compiler/f18#488 from flang-compiler/pmk-fixes

More fixes from test suite shakedown

Original-commit: flang-compiler/f18@357b834676cef6795cc88240c6305aead55c6964
Reviewed-on: https://github.com/flang-compiler/f18/pull/488

5 years ago[flang] Address review comment
peter klausler [Fri, 7 Jun 2019 19:00:32 +0000 (12:00 -0700)]
[flang] Address review comment

Original-commit: flang-compiler/f18@d6964fdd9f5ef3a34caa33922430ce5578a2e2a9
Reviewed-on: https://github.com/flang-compiler/f18/pull/488

5 years ago[flang] Fix characterization of functions called in association selectors
peter klausler [Fri, 7 Jun 2019 00:09:49 +0000 (17:09 -0700)]
[flang] Fix characterization of functions called in association selectors

Original-commit: flang-compiler/f18@cada0c61e330b62c2adf39d8d764423503125e18
Reviewed-on: https://github.com/flang-compiler/f18/pull/488
Tree-same-pre-rewrite: false

5 years ago[flang] Avoid segfault in association semantics by cleaning up code a bit
peter klausler [Thu, 6 Jun 2019 21:34:54 +0000 (14:34 -0700)]
[flang] Avoid segfault in association semantics by cleaning up code a bit

Original-commit: flang-compiler/f18@04d40c3d75b0cf05e454e3b981e4a119bb8dcebb
Reviewed-on: https://github.com/flang-compiler/f18/pull/488
Tree-same-pre-rewrite: false

5 years ago[flang] Interpret intrinsic table more correctly
peter klausler [Wed, 5 Jun 2019 22:40:59 +0000 (15:40 -0700)]
[flang] Interpret intrinsic table more correctly

Original-commit: flang-compiler/f18@ff34f32447a8675caeae5c96549f1659c3a98ec3
Reviewed-on: https://github.com/flang-compiler/f18/pull/488
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#484 from flang-compiler/pmk-subscript-int
Peter Klausler [Fri, 7 Jun 2019 17:23:27 +0000 (10:23 -0700)]
[flang] Merge pull request flang-compiler/f18#484 from flang-compiler/pmk-subscript-int

Clean up subscript-sized int definitions

Original-commit: flang-compiler/f18@7e605795712020ea944dedfb4d2be8a30cd21fac
Reviewed-on: https://github.com/flang-compiler/f18/pull/484

5 years ago[flang] Use ConstantSubscript as the one name for int64_t
peter klausler [Fri, 7 Jun 2019 16:57:10 +0000 (09:57 -0700)]
[flang] Use ConstantSubscript as the one name for int64_t

Original-commit: flang-compiler/f18@13870c00179a56e9a2b865c64cac1453dcbdc8e2
Reviewed-on: https://github.com/flang-compiler/f18/pull/484

5 years ago[flang] Clean up subscript-sized int definitions
peter klausler [Thu, 6 Jun 2019 20:48:26 +0000 (13:48 -0700)]
[flang] Clean up subscript-sized int definitions

Original-commit: flang-compiler/f18@256fc4e3caf2c67f282294309637657bdc76e332
Reviewed-on: https://github.com/flang-compiler/f18/pull/484
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#487 from flang-compiler/tsk-486
Tim Keith [Fri, 7 Jun 2019 15:01:38 +0000 (08:01 -0700)]
[flang] Merge pull request flang-compiler/f18#487 from flang-compiler/tsk-486

Fix issue flang-compiler/f18#486

Original-commit: flang-compiler/f18@66eaf89c09115d20a0d800ad3b1d3c62f575c057
Reviewed-on: https://github.com/flang-compiler/f18/pull/487

5 years ago[flang] Fix issue flang-compiler/f18#486
Tim Keith [Thu, 6 Jun 2019 23:09:11 +0000 (16:09 -0700)]
[flang] Fix issue flang-compiler/f18#486

In a function without a function result specified, the name in the
`FunctionStmt` was resolved to the function result symbol rather than
the function symbol itself. That is inconsistent with subroutines and
other functions.

The fix is to explicitly set the function name symbol after the result
has been resolved.

Original-commit: flang-compiler/f18@b0172d32848b6135f076b3171ea55ea6f63de564
Reviewed-on: https://github.com/flang-compiler/f18/pull/487

5 years ago[flang] Merge pull request flang-compiler/f18#471 from flang-compiler/jpr-character...
jeanPerier [Fri, 7 Jun 2019 05:44:08 +0000 (22:44 -0700)]
[flang] Merge pull request flang-compiler/f18#471 from flang-compiler/jpr-character-intrinsic-folding

Fix UTF-8 issues and add implement some character intrinsic functions folding

Original-commit: flang-compiler/f18@766b6c459b999ba23dbdbb64ccdf0386a3a6b2f3
Reviewed-on: https://github.com/flang-compiler/f18/pull/471

5 years ago[flang] Remove unused captured values
Jean Perier [Thu, 6 Jun 2019 08:34:39 +0000 (01:34 -0700)]
[flang] Remove unused captured values

Original-commit: flang-compiler/f18@ae79e7e699d507669b88dc2c29d1f348b26f20e2
Reviewed-on: https://github.com/flang-compiler/f18/pull/471

5 years ago[flang] Fix logical conflict after rebase
Jean Perier [Wed, 5 Jun 2019 14:33:37 +0000 (07:33 -0700)]
[flang] Fix logical conflict after rebase

Original-commit: flang-compiler/f18@93d6c1e53aada0fd6c24b2ba9103ed61d48f7965
Reviewed-on: https://github.com/flang-compiler/f18/pull/471
Tree-same-pre-rewrite: false

5 years ago[flang] Remove encoding related checks in achar/char
Jean Perier [Wed, 5 Jun 2019 13:41:03 +0000 (06:41 -0700)]
[flang] Remove encoding related checks in achar/char

Original-commit: flang-compiler/f18@86bc6a0252a9d47e6bacdf0941603f8d5cae4bd7
Reviewed-on: https://github.com/flang-compiler/f18/pull/471
Tree-same-pre-rewrite: false

5 years ago[flang] Answer first comments
Jean Perier [Tue, 4 Jun 2019 09:11:58 +0000 (02:11 -0700)]
[flang] Answer first comments

Original-commit: flang-compiler/f18@4058efcd9c413f90aeeb9fdb83608bcb4a647e6e
Reviewed-on: https://github.com/flang-compiler/f18/pull/471
Tree-same-pre-rewrite: false

5 years ago[flang] Implement folding of IACHAR, ICHAR, CHAR, ACHAR, ADJUSTL, ADJUSTR
Jean Perier [Tue, 28 May 2019 14:00:40 +0000 (07:00 -0700)]
[flang] Implement folding of IACHAR, ICHAR, CHAR, ACHAR, ADJUSTL, ADJUSTR

Original-commit: flang-compiler/f18@e8e8071e937a437e39c7f366d6368da934f50376
Reviewed-on: https://github.com/flang-compiler/f18/pull/471
Tree-same-pre-rewrite: false

5 years ago[flang] Fix UTF-8 bugs and add related tests
Jean Perier [Tue, 28 May 2019 09:15:05 +0000 (02:15 -0700)]
[flang] Fix UTF-8 bugs and add related tests

Original-commit: flang-compiler/f18@9dd19ede9ed76570653d698bd1261950e74dda4b
Reviewed-on: https://github.com/flang-compiler/f18/pull/471
Tree-same-pre-rewrite: false

5 years ago[flang] checkpoint character intrinsic folding
Jean Perier [Fri, 24 May 2019 08:03:03 +0000 (01:03 -0700)]
[flang] checkpoint character intrinsic folding

Original-commit: flang-compiler/f18@f495ed92bd1291b6efdb378da79f8f0a9741e15e
Reviewed-on: https://github.com/flang-compiler/f18/pull/471
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#483 from flang-compiler/jpr-482-fix
jeanPerier [Fri, 7 Jun 2019 05:43:17 +0000 (22:43 -0700)]
[flang] Merge pull request flang-compiler/f18#483 from flang-compiler/jpr-482-fix

Fix issue flang-compiler/f18#482 related to folding warnings

Original-commit: flang-compiler/f18@8532032960b684685933efab9e23bd866a14a370
Reviewed-on: https://github.com/flang-compiler/f18/pull/483

5 years ago[flang] Address formatting comment
Jean Perier [Thu, 6 Jun 2019 14:41:57 +0000 (07:41 -0700)]
[flang] Address formatting comment

Original-commit: flang-compiler/f18@0f5fb6e75a6217a404048a74d5b02d908857fbc0
Reviewed-on: https://github.com/flang-compiler/f18/pull/483

5 years ago[flang] Remove OS dependency in folding test
Jean Perier [Thu, 6 Jun 2019 11:24:42 +0000 (04:24 -0700)]
[flang] Remove OS dependency in folding test

Original-commit: flang-compiler/f18@3728898ea9e16eb04510894cf95feaddf8f4fd63
Reviewed-on: https://github.com/flang-compiler/f18/pull/483
Tree-same-pre-rewrite: false

5 years ago[flang] Fix 482: do not check floating point environment flags with clang
Jean Perier [Thu, 6 Jun 2019 10:24:35 +0000 (03:24 -0700)]
[flang] Fix 482: do not check floating point environment flags with clang

Original-commit: flang-compiler/f18@fc423c151654055e50c3fad563be4e0a6afd7348
Reviewed-on: https://github.com/flang-compiler/f18/pull/483
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#485 from flang-compiler/pmk-iso_fortran_env
Peter Klausler [Thu, 6 Jun 2019 22:02:29 +0000 (15:02 -0700)]
[flang] Merge pull request flang-compiler/f18#485 from flang-compiler/pmk-iso_fortran_env

Define a placeholder for ISO_FORTRAN_ENV standard module

Original-commit: flang-compiler/f18@927ed4283e3ff2ac6180cf725710bf6b1000b216
Reviewed-on: https://github.com/flang-compiler/f18/pull/485

5 years ago[flang] Other changes moved to their own branch.
peter klausler [Thu, 6 Jun 2019 20:56:22 +0000 (13:56 -0700)]
[flang] Other changes moved to their own branch.

Original-commit: flang-compiler/f18@6a922d085af655c2345dfe1c6f2360982728e55f
Reviewed-on: https://github.com/flang-compiler/f18/pull/485

5 years ago[flang] Placeholder for standard module iso_fortran_env
peter klausler [Thu, 6 Jun 2019 20:42:33 +0000 (13:42 -0700)]
[flang] Placeholder for standard module iso_fortran_env

Original-commit: flang-compiler/f18@386ebb04901f2fc46e7a5c2e64fbfa0586065acb
Reviewed-on: https://github.com/flang-compiler/f18/pull/485
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#480 from flang-compiler/pmk-fixes
Peter Klausler [Wed, 5 Jun 2019 16:13:20 +0000 (09:13 -0700)]
[flang] Merge pull request flang-compiler/f18#480 from flang-compiler/pmk-fixes

Fix two bugs

Original-commit: flang-compiler/f18@9023d3c3ac5993d0703d77a2c48247aef999000e
Reviewed-on: https://github.com/flang-compiler/f18/pull/480

5 years ago[flang] Apply suggestion from code review
peter klausler [Wed, 5 Jun 2019 16:12:21 +0000 (09:12 -0700)]
[flang] Apply suggestion from code review

Original-commit: flang-compiler/f18@211c99917c60c6d2ae9efe260515b0b182a2136f
Reviewed-on: https://github.com/flang-compiler/f18/pull/480

5 years ago[flang] Fix two bugs
peter klausler [Wed, 5 Jun 2019 00:03:34 +0000 (17:03 -0700)]
[flang] Fix two bugs

Original-commit: flang-compiler/f18@919e512c083c1e145cdc2dec1d2af2d4a3df4bcf
Reviewed-on: https://github.com/flang-compiler/f18/pull/480
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#479 from flang-compiler/pmk-unparse...
Peter Klausler [Wed, 5 Jun 2019 16:11:50 +0000 (09:11 -0700)]
[flang] Merge pull request flang-compiler/f18#479 from flang-compiler/pmk-unparse-expr

Unparse the typedExpr from semantics

Original-commit: flang-compiler/f18@f41b303b96ffe03c28619e6e84cfbbcaa18e1a08
Reviewed-on: https://github.com/flang-compiler/f18/pull/479

5 years ago[flang] Unparse the typedExpr from semantics, when present, rather than original...
peter klausler [Tue, 4 Jun 2019 23:25:06 +0000 (16:25 -0700)]
[flang] Unparse the typedExpr from semantics, when present, rather than original parse tree expressions

Original-commit: flang-compiler/f18@4274cc8eaa6e6ff3aa9b17646efb81f43e1e526a
Reviewed-on: https://github.com/flang-compiler/f18/pull/479

5 years ago[flang] Merge pull request flang-compiler/f18#477 from flang-compiler/pmk-fixes
Peter Klausler [Tue, 4 Jun 2019 22:20:29 +0000 (15:20 -0700)]
[flang] Merge pull request flang-compiler/f18#477 from flang-compiler/pmk-fixes

Roll up some minor fixes + tweak name resolution pass order

Original-commit: flang-compiler/f18@ae5796115580363ba9e72cf130d63ad9791b3f81
Reviewed-on: https://github.com/flang-compiler/f18/pull/477

5 years ago[flang] Fix build warning, add comment about extension not supported
peter klausler [Tue, 4 Jun 2019 21:51:56 +0000 (14:51 -0700)]
[flang] Fix build warning, add comment about extension not supported

Original-commit: flang-compiler/f18@1033ae05ca3b8050c85992d3517eee6ea7ede260
Reviewed-on: https://github.com/flang-compiler/f18/pull/477

5 years ago[flang] Skim executable parts to detect dummy procedure calls
peter klausler [Tue, 4 Jun 2019 20:35:59 +0000 (13:35 -0700)]
[flang] Skim executable parts to detect dummy procedure calls

Original-commit: flang-compiler/f18@b085255e5c8fa8e2d16b76c49beb76e005ca6060
Reviewed-on: https://github.com/flang-compiler/f18/pull/477
Tree-same-pre-rewrite: false

5 years ago[flang] INTRINSIC attribute should convert symbol to procedure; also check C840
peter klausler [Tue, 4 Jun 2019 18:41:30 +0000 (11:41 -0700)]
[flang] INTRINSIC attribute should convert symbol to procedure; also check C840

Original-commit: flang-compiler/f18@b698b84ccd1cab75c376f2df1519917403147957
Reviewed-on: https://github.com/flang-compiler/f18/pull/477
Tree-same-pre-rewrite: false

5 years ago[flang] Fix arg specs for CMPLX intrinsic
peter klausler [Tue, 4 Jun 2019 17:50:34 +0000 (10:50 -0700)]
[flang] Fix arg specs for CMPLX intrinsic

Original-commit: flang-compiler/f18@3586b8a6469c91092f68beb76b77501c3920bb4b
Reviewed-on: https://github.com/flang-compiler/f18/pull/477
Tree-same-pre-rewrite: false

5 years ago[flang] Fix LEN(char array), it is not elemental.
peter klausler [Tue, 4 Jun 2019 17:09:54 +0000 (10:09 -0700)]
[flang] Fix LEN(char array), it is not elemental.

Original-commit: flang-compiler/f18@b44eb2e7b1fd8d86e95d3c24014e542bdb39877d
Reviewed-on: https://github.com/flang-compiler/f18/pull/477
Tree-same-pre-rewrite: false

5 years ago[flang] allow alternate return indicators
peter klausler [Mon, 3 Jun 2019 20:36:47 +0000 (13:36 -0700)]
[flang] allow alternate return indicators

Original-commit: flang-compiler/f18@a04150a4f96f251e7b4a940877ef421a60c1a163
Reviewed-on: https://github.com/flang-compiler/f18/pull/477
Tree-same-pre-rewrite: false

5 years ago[flang] Allow for FINAL procedures in PDT instantiation
peter klausler [Mon, 3 Jun 2019 19:28:20 +0000 (12:28 -0700)]
[flang] Allow for FINAL procedures in PDT instantiation

Original-commit: flang-compiler/f18@e276374b29a5aa9dc9c2c257e6059af5fcdf0529
Reviewed-on: https://github.com/flang-compiler/f18/pull/477
Tree-same-pre-rewrite: false

5 years ago[flang] Fix correction of misparsed struct const as actual arg, and semantics of...
peter klausler [Mon, 3 Jun 2019 19:18:52 +0000 (12:18 -0700)]
[flang] Fix correction of misparsed struct const as actual arg, and semantics of MODULE PROCEDURE in INTERFACE

Original-commit: flang-compiler/f18@6c86de6cef0079ef689211c09624ff0e0ecd71a4
Reviewed-on: https://github.com/flang-compiler/f18/pull/477
Tree-same-pre-rewrite: false

5 years ago[flang] Allow some BOZ usage when unambiguous (extension)
peter klausler [Mon, 3 Jun 2019 17:51:51 +0000 (10:51 -0700)]
[flang] Allow some BOZ usage when unambiguous (extension)

Original-commit: flang-compiler/f18@bf3bd54c88492c91f749896d33c6aae79a830acd
Reviewed-on: https://github.com/flang-compiler/f18/pull/477
Tree-same-pre-rewrite: false

5 years ago[flang] Rearrange references to AllSources singleton, fix FindScope for module files
peter klausler [Fri, 31 May 2019 23:37:00 +0000 (16:37 -0700)]
[flang] Rearrange references to AllSources singleton, fix FindScope for module files

Original-commit: flang-compiler/f18@50ccc1c819d274c0f40358bf15b5f7ac4c7a199a
Reviewed-on: https://github.com/flang-compiler/f18/pull/477
Tree-same-pre-rewrite: false

5 years ago[flang] Fix spelling of ISHFT
peter klausler [Fri, 31 May 2019 23:36:29 +0000 (16:36 -0700)]
[flang] Fix spelling of ISHFT

Original-commit: flang-compiler/f18@3c93c40ed504eac555cde3f3f4f443af989db6fd
Reviewed-on: https://github.com/flang-compiler/f18/pull/477
Tree-same-pre-rewrite: false

5 years ago[flang] Placeholders for some standard modules
peter klausler [Fri, 31 May 2019 23:35:52 +0000 (16:35 -0700)]
[flang] Placeholders for some standard modules

Original-commit: flang-compiler/f18@a7182af0d5a6c66faab45977554c1074a3fb9d7f
Reviewed-on: https://github.com/flang-compiler/f18/pull/477
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#475 from flang-compiler/tsk-darwin
Tim Keith [Tue, 4 Jun 2019 15:55:28 +0000 (08:55 -0700)]
[flang] Merge pull request flang-compiler/f18#475 from flang-compiler/tsk-darwin

Fix test_folding.sh to work on MacOS

Original-commit: flang-compiler/f18@7a21f8f09ef3137e47ec7fad3193ba78c0070825
Reviewed-on: https://github.com/flang-compiler/f18/pull/475

5 years ago[flang] Fix test_folding.sh to work on MacOS
Tim Keith [Mon, 3 Jun 2019 20:21:35 +0000 (13:21 -0700)]
[flang] Fix test_folding.sh to work on MacOS

There were a couple of small incompatibilities:
- There is no `ldd` on MacOS; instead use `otools -L`.
  This has not been tested when libpgmath is linked in to f18.
- `wc` outputs spaces where on Linux it outputs tabs; change how
  the number of lines is extracted to work on both.

Also, fix a bug: change `passed_warnings` to `$passed_warnings`.

Original-commit: flang-compiler/f18@5bede9e188e0f5e6b8ac922725d9d19a6aae96e6
Reviewed-on: https://github.com/flang-compiler/f18/pull/475

5 years ago[flang] Merge pull request flang-compiler/f18#462 from flang-compiler/tsk-doc
Tim Keith [Mon, 3 Jun 2019 20:28:10 +0000 (13:28 -0700)]
[flang] Merge pull request flang-compiler/f18#462 from flang-compiler/tsk-doc

Update description of semantic analysis

Original-commit: flang-compiler/f18@f4ae518a891e1ca1622ae13bc1d27bb51f3a7a7b
Reviewed-on: https://github.com/flang-compiler/f18/pull/462

5 years ago[flang] Address more review comments
Tim Keith [Wed, 15 May 2019 19:47:23 +0000 (12:47 -0700)]
[flang] Address more review comments

Original-commit: flang-compiler/f18@c7b3a39aa5775a64e0ea6ae20d891b1441a2e221
Reviewed-on: https://github.com/flang-compiler/f18/pull/462

5 years ago[flang] Fix typos, adjust nested list formatting
Tim Keith [Wed, 15 May 2019 14:02:23 +0000 (07:02 -0700)]
[flang] Fix typos, adjust nested list formatting

Original-commit: flang-compiler/f18@c07a86ce218b52b84f2e9f4fe8e566c3a28ce441
Reviewed-on: https://github.com/flang-compiler/f18/pull/462
Tree-same-pre-rewrite: false

5 years ago[flang] Update description of semantic analysis
Tim Keith [Wed, 15 May 2019 03:01:07 +0000 (20:01 -0700)]
[flang] Update description of semantic analysis

Semantics.md described the plans for semantic analysis as of some
time ago. Update it to document what has been implemented.

Original-commit: flang-compiler/f18@d32e34067127aaba139ffd6beee2ad9b41c8aa6c
Reviewed-on: https://github.com/flang-compiler/f18/pull/462
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#472 from flang-compiler/pmk-ta-fixes
Peter Klausler [Thu, 30 May 2019 23:45:03 +0000 (16:45 -0700)]
[flang] Merge pull request flang-compiler/f18#472 from flang-compiler/pmk-ta-fixes

Roll up some fixes to problems found running more correctness tests

Original-commit: flang-compiler/f18@8e192713ac6ff817efba773a24c38471b397ed15
Reviewed-on: https://github.com/flang-compiler/f18/pull/472

5 years ago[flang] Reformatting before merging
peter klausler [Thu, 30 May 2019 23:39:23 +0000 (16:39 -0700)]
[flang] Reformatting before merging

Original-commit: flang-compiler/f18@9f084c1da60024637126ac7c236653dc79c71fc0
Reviewed-on: https://github.com/flang-compiler/f18/pull/472

5 years ago[flang] Two more fixes made while waiting for code review
peter klausler [Thu, 30 May 2019 23:14:24 +0000 (16:14 -0700)]
[flang] Two more fixes made while waiting for code review

Original-commit: flang-compiler/f18@6dc58004abb025c653896957bdc774ed6e954965
Reviewed-on: https://github.com/flang-compiler/f18/pull/472
Tree-same-pre-rewrite: false

5 years ago[flang] Address review comment
peter klausler [Thu, 30 May 2019 22:26:54 +0000 (15:26 -0700)]
[flang] Address review comment

Original-commit: flang-compiler/f18@17be1f6a7db3aff8453e0cf4e8ec982122b08142
Reviewed-on: https://github.com/flang-compiler/f18/pull/472
Tree-same-pre-rewrite: false

5 years ago[flang] Handle large integer literals without kinds better
peter klausler [Thu, 30 May 2019 20:31:11 +0000 (13:31 -0700)]
[flang] Handle large integer literals without kinds better

Original-commit: flang-compiler/f18@381ea32d57aa65e52dbde96f6c61baabd95f4dd9
Reviewed-on: https://github.com/flang-compiler/f18/pull/472
Tree-same-pre-rewrite: false

5 years ago[flang] document non-support for PGI ALLOCATE(TYPE(t)::...)
peter klausler [Thu, 30 May 2019 19:08:06 +0000 (12:08 -0700)]
[flang] document non-support for PGI ALLOCATE(TYPE(t)::...)

Original-commit: flang-compiler/f18@67420da79cb14cf2f3f7a5aa649b93722807bde7
Reviewed-on: https://github.com/flang-compiler/f18/pull/472
Tree-same-pre-rewrite: false

5 years ago[flang] Final fixes before review
peter klausler [Wed, 29 May 2019 23:00:31 +0000 (16:00 -0700)]
[flang] Final fixes before review

Original-commit: flang-compiler/f18@efe5c1b8ec60f7c3d2a083da12924bc4523e6f72
Reviewed-on: https://github.com/flang-compiler/f18/pull/472
Tree-same-pre-rewrite: false

5 years ago[flang] PRECISION, RANGE, RADIX
peter klausler [Wed, 29 May 2019 22:38:33 +0000 (15:38 -0700)]
[flang] PRECISION, RANGE, RADIX

Original-commit: flang-compiler/f18@de0bf5a18f74f2041c85149e52781e8f80d0352b
Reviewed-on: https://github.com/flang-compiler/f18/pull/472
Tree-same-pre-rewrite: false

5 years ago[flang] Complete folding of intermixed array and component references
peter klausler [Wed, 29 May 2019 20:22:35 +0000 (13:22 -0700)]
[flang] Complete folding of intermixed array and component references

Original-commit: flang-compiler/f18@70db03e4ac4f74371ead09f4a5d48f32317de8a9
Reviewed-on: https://github.com/flang-compiler/f18/pull/472
Tree-same-pre-rewrite: false

5 years ago[flang] Fix intrinsic folding after merging changes
peter klausler [Tue, 28 May 2019 22:42:28 +0000 (15:42 -0700)]
[flang] Fix intrinsic folding after merging changes

Original-commit: flang-compiler/f18@a982c34b6f97c9cd173538724e91afc70f585012
Reviewed-on: https://github.com/flang-compiler/f18/pull/472
Tree-same-pre-rewrite: false

5 years ago[flang] Defer conversions to objects; fix some intrinsic table entries
peter klausler [Tue, 21 May 2019 23:58:46 +0000 (16:58 -0700)]
[flang] Defer conversions to objects; fix some intrinsic table entries

more fixes

Access components of constant structures

Apply implicit typing to dummy args used in automatic array dimensions

SELECTED_INT_KIND and SELECTED_REAL_KIND

Finish SELECTED_{INT,REAL}_KIND and common cases of ALL()/ANY()

Original-commit: flang-compiler/f18@e9f8e53e55867863ca06461fb6edd965c86352c7
Reviewed-on: https://github.com/flang-compiler/f18/pull/472
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#468 from flang-compiler/jpr-folding...
jeanPerier [Mon, 27 May 2019 09:14:37 +0000 (02:14 -0700)]
[flang] Merge pull request flang-compiler/f18#468 from flang-compiler/jpr-folding-warnings

Add location to folding warnings and related tests and prevent spurious "re-folding"

Original-commit: flang-compiler/f18@0b2b40ae99cfe44b2371c13dcd2f38a73928dca1
Reviewed-on: https://github.com/flang-compiler/f18/pull/468

5 years ago[flang] Add semantic error test for integer constant containing division by zero
Jean Perier [Fri, 24 May 2019 15:22:11 +0000 (08:22 -0700)]
[flang] Add semantic error test for integer constant containing division by zero

Original-commit: flang-compiler/f18@650cfac5397236373e3f8c4ca7a1e15e6f33e0a4
Reviewed-on: https://github.com/flang-compiler/f18/pull/468

5 years ago[flang] Make integer divide by zero in constants a fatal error
Jean Perier [Fri, 24 May 2019 14:54:47 +0000 (07:54 -0700)]
[flang] Make integer divide by zero in constants a fatal error

Original-commit: flang-compiler/f18@e5acff6b638a7be1c48b368791f51ef026601393
Reviewed-on: https://github.com/flang-compiler/f18/pull/468
Tree-same-pre-rewrite: false

5 years ago[flang] removed a relicate comment
Jean Perier [Wed, 22 May 2019 14:04:19 +0000 (07:04 -0700)]
[flang] removed a relicate comment

Original-commit: flang-compiler/f18@f25113b84edbd991b62fb07b4728e52ffae321a0
Reviewed-on: https://github.com/flang-compiler/f18/pull/468
Tree-same-pre-rewrite: false

5 years ago[flang] Fix support of parenthesized arguments in function folding
Jean Perier [Wed, 22 May 2019 13:18:02 +0000 (06:18 -0700)]
[flang] Fix support of parenthesized arguments in function folding

Original-commit: flang-compiler/f18@1ecb07cddfd884742ab4a39f28ad5e6ec6d00af9
Reviewed-on: https://github.com/flang-compiler/f18/pull/468
Tree-same-pre-rewrite: false

5 years ago[flang] more folding edge cases tests
Jean Perier [Wed, 22 May 2019 13:16:12 +0000 (06:16 -0700)]
[flang] more folding edge cases tests

Original-commit: flang-compiler/f18@21c0ec4cc4cc367fec98c8f225e2a7d1bede5ba8
Reviewed-on: https://github.com/flang-compiler/f18/pull/468
Tree-same-pre-rewrite: false

5 years ago[flang] Adding tests for folding edge case (overflows...)
Jean Perier [Wed, 22 May 2019 07:56:35 +0000 (00:56 -0700)]
[flang] Adding tests for folding edge case (overflows...)

Original-commit: flang-compiler/f18@6893775dee6cdc85e9ccffd9d57659ce9ef8f68a
Reviewed-on: https://github.com/flang-compiler/f18/pull/468
Tree-same-pre-rewrite: false

5 years ago[flang] Folding improvments:
Jean Perier [Wed, 22 May 2019 07:48:29 +0000 (00:48 -0700)]
[flang] Folding improvments:
  - Add location to non-fatal error message (context was not given
    a location before folding in semantics).
  - Avoid refolding expression from scratch several times (update GenericExprWrapper
    after folding). So far, warning messages were generated twice per parametere init
    expressions.

Original-commit: flang-compiler/f18@bf7f6cf9cde1c6822b4daeaa44d4f67ffbaef197
Reviewed-on: https://github.com/flang-compiler/f18/pull/468
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#470 from flang-compiler/by-mp-gram
Jinxin (Brian) Yang [Fri, 24 May 2019 21:25:16 +0000 (14:25 -0700)]
[flang] Merge pull request flang-compiler/f18#470 from flang-compiler/by-mp-gram

Re-write OpenMP 4.5 grammar documentation

Original-commit: flang-compiler/f18@bac3a89f81df6293f6a2b4e3f538b8fe75e0decc
Reviewed-on: https://github.com/flang-compiler/f18/pull/470

5 years ago[flang] improvement for atomic construct
Jinxin Yang [Fri, 24 May 2019 20:54:58 +0000 (13:54 -0700)]
[flang] improvement for atomic construct

Original-commit: flang-compiler/f18@d57ef4a669d30bc2834872450d5cbb4401ddec89
Reviewed-on: https://github.com/flang-compiler/f18/pull/470

5 years ago[flang] improvement for 'Re-write OpenMP 4.5 grammar doc with BNF'
Jinxin Yang [Fri, 24 May 2019 20:45:15 +0000 (13:45 -0700)]
[flang] improvement for 'Re-write OpenMP 4.5 grammar doc with BNF'

Original-commit: flang-compiler/f18@e17e74104bf23bad2dbade8e04a2eb58902a9f34
Reviewed-on: https://github.com/flang-compiler/f18/pull/470
Tree-same-pre-rewrite: false

5 years ago[flang] Re-write OpenMP 4.5 grammar doc with BNF
Jinxin Yang [Fri, 24 May 2019 00:13:52 +0000 (17:13 -0700)]
[flang] Re-write OpenMP 4.5 grammar doc with BNF

Original-commit: flang-compiler/f18@fe06ea9f607ab608cceaae762b2c92f37c136ee2
Reviewed-on: https://github.com/flang-compiler/f18/pull/470
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#469 from flang-compiler/jpr-fold-parame...
jeanPerier [Fri, 24 May 2019 08:39:00 +0000 (01:39 -0700)]
[flang] Merge pull request flang-compiler/f18#469 from flang-compiler/jpr-fold-parameter-fix

Prevent possible infinite loop in parameter folding

Original-commit: flang-compiler/f18@debeaedfc33a9c8d8150a53faedb9d07771c1693
Reviewed-on: https://github.com/flang-compiler/f18/pull/469

5 years ago[flang] add test for parameter infinite loop
Jean Perier [Thu, 23 May 2019 09:11:33 +0000 (02:11 -0700)]
[flang] add test for parameter infinite loop

Original-commit: flang-compiler/f18@552568c39764972b4e21ebeb6e9f4337eee2eb38
Reviewed-on: https://github.com/flang-compiler/f18/pull/469

5 years ago[flang] fix error message typo
Jean Perier [Thu, 23 May 2019 09:09:58 +0000 (02:09 -0700)]
[flang] fix error message typo

Original-commit: flang-compiler/f18@049163e0d4d3f65f5b30213716ac5c087ffe2053
Reviewed-on: https://github.com/flang-compiler/f18/pull/469
Tree-same-pre-rewrite: false

5 years ago[flang] Prevent possible infinte loop in parameter folding
Jean Perier [Wed, 22 May 2019 15:26:50 +0000 (08:26 -0700)]
[flang] Prevent possible infinte loop in parameter folding

Original-commit: flang-compiler/f18@38360930ce5b63987bc17fa235016743b90168ae
Reviewed-on: https://github.com/flang-compiler/f18/pull/469
Tree-same-pre-rewrite: false

5 years ago[flang] Merge pull request flang-compiler/f18#464 from flang-compiler/klausler-patch-1
Peter Klausler [Thu, 23 May 2019 15:40:19 +0000 (08:40 -0700)]
[flang] Merge pull request flang-compiler/f18#464 from flang-compiler/klausler-patch-1

Update FortranForCProgrammers.md

Original-commit: flang-compiler/f18@a1659546443059faec2d19661e0e6d279d03625c
Reviewed-on: https://github.com/flang-compiler/f18/pull/464