platform/upstream/llvm.git
4 years ago[flang] Merge pull request flang-compiler/f18#705 from flang-compiler/sjs-dreal
Steve Scalpone [Wed, 4 Sep 2019 02:05:55 +0000 (19:05 -0700)]
[flang] Merge pull request flang-compiler/f18#705 from flang-compiler/sjs-dreal

Add support and documentation for DREAL.

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

4 years ago[flang] Add support and documentation for DREAL.
Steve Scalpone [Mon, 2 Sep 2019 20:54:01 +0000 (13:54 -0700)]
[flang] Add support and documentation for DREAL.

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

4 years ago[flang] Merge pull request flang-compiler/f18#692 from flang-compiler/sjs-omp-doc
Steve Scalpone [Fri, 30 Aug 2019 18:22:51 +0000 (11:22 -0700)]
[flang] Merge pull request flang-compiler/f18#692 from flang-compiler/sjs-omp-doc

Create OpenMP-semantics.md

Original-commit: flang-compiler/f18@0948d3d1919ad30b22da9511204b547b1b56da75
Reviewed-on: https://github.com/flang-compiler/f18/pull/692

4 years ago[flang] Update OpenMP-semantics.md
Steve Scalpone [Fri, 30 Aug 2019 18:22:13 +0000 (11:22 -0700)]
[flang] Update OpenMP-semantics.md

Formatting changes.

Original-commit: flang-compiler/f18@007b3e31d30853ed2f44ac3b7c6a311739e7804e
Reviewed-on: https://github.com/flang-compiler/f18/pull/692

4 years ago[flang] Update OpenMP-semantics.md
Steve Scalpone [Thu, 29 Aug 2019 19:55:41 +0000 (12:55 -0700)]
[flang] Update OpenMP-semantics.md

Item 4 can be removed since we decided to keep the code in Semantics.

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

4 years ago[flang] Update OpenMP-semantics.md
Steve Scalpone [Wed, 28 Aug 2019 01:12:50 +0000 (18:12 -0700)]
[flang] Update OpenMP-semantics.md

Repond to review comments about grammar and formatting.

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

4 years ago[flang] Create OpenMP-semantics.md
Steve Scalpone [Tue, 27 Aug 2019 21:38:48 +0000 (14:38 -0700)]
[flang] Create OpenMP-semantics.md

Initial markdown document.

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

4 years ago[flang] [OpenMP] flang-compiler/f18#691 Update on Tim and Varun's review
Jinxin Yang [Tue, 27 Aug 2019 23:52:12 +0000 (16:52 -0700)]
[flang] [OpenMP] flang-compiler/f18#691 Update on Tim and Varun's review

Change CheckMatching to return `beginDir`, which hides the unnecessary
`std::get<>` for `endDir`.

Original-commit: flang-compiler/f18@d9689e10f47f344d2f321c0635eb6dcf38e649ca

4 years ago[flang] [OpenMP] structural checks for `PARALLEL SECTIONS`
Jinxin Yang [Tue, 27 Aug 2019 20:55:18 +0000 (13:55 -0700)]
[flang] [OpenMP] structural checks for `PARALLEL SECTIONS`

Original-commit: flang-compiler/f18@c18452159d462c98c6a888c272e24ea9d54032f4

4 years ago[flang] [OpenMP] add Begin and End Directive matching check
Jinxin Yang [Tue, 27 Aug 2019 20:30:38 +0000 (13:30 -0700)]
[flang] [OpenMP] add Begin and End Directive matching check

Straightforward check for Begin and End directive of:
1. Block related constructs
2. Loop related constructs (End directive is optional)
3. Sections related constructs

Original-commit: flang-compiler/f18@d0436f13eeddf9d44c669a53fa0eb42d00650826

4 years ago[flang] [OpenMP] update validity check for `OmpNowait`.
Jinxin Yang [Sat, 24 Aug 2019 00:37:57 +0000 (17:37 -0700)]
[flang] [OpenMP] update validity check for `OmpNowait`.

Because now we set the flag for `End` directives that accept clauses,
no need to check the specific directives anymore.

Original-commit: flang-compiler/f18@a5cdc4b035fe6237bff46252e21ac84d2df59393

4 years ago[flang] Merge pull request flang-compiler/f18#689 from flang-compiler/jpr-fix-667
jeanPerier [Thu, 29 Aug 2019 09:37:32 +0000 (02:37 -0700)]
[flang] Merge pull request flang-compiler/f18#689 from flang-compiler/jpr-fix-667

Implement ENUM name resolution

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

4 years ago[flang] Remove unused function after last commit
Jean Perier [Wed, 28 Aug 2019 12:50:23 +0000 (05:50 -0700)]
[flang] Remove unused function after last commit

Original-commit: flang-compiler/f18@029fbf64c2400847a42a4c7cf26c553592f4ee10
Reviewed-on: https://github.com/flang-compiler/f18/pull/689

4 years ago[flang] Address comment: store current enum value in an int
Jean Perier [Wed, 28 Aug 2019 11:58:38 +0000 (04:58 -0700)]
[flang] Address comment: store current enum value in an int
During enumerator name resolution, instead of keeping the current
enumerator value inside an expression, fold it to an int and keep
it as an int. This is clearer and will be easier if one wants to
provide some enum type size optimization.

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

4 years ago[flang] Address comments: Update comments
Jean Perier [Wed, 28 Aug 2019 10:35:40 +0000 (03:35 -0700)]
[flang] Address comments: Update comments

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

4 years ago[flang] Simplify name resolution visitor for parser::Enumerator
Jean Perier [Tue, 27 Aug 2019 14:11:54 +0000 (07:11 -0700)]
[flang] Simplify name resolution visitor for parser::Enumerator
Do not define a Pre and a Post, simply walk the expression
with Walk in Pre to resolve the names inside the expression
before evaluating it.

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

4 years ago[flang] Introduce IsNamedConstant to hide attr::PARAMETER details
Jean Perier [Mon, 26 Aug 2019 09:28:08 +0000 (02:28 -0700)]
[flang] Introduce IsNamedConstant to hide attr::PARAMETER details
for named constant that are actually enumerators.

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

4 years ago[flang] Merge pull request flang-compiler/f18#687 from flang-compiler/tsk3
Tim Keith [Wed, 28 Aug 2019 21:09:30 +0000 (14:09 -0700)]
[flang] Merge pull request flang-compiler/f18#687 from flang-compiler/tsk3

Resolve index in pointer assignment to array element

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

4 years ago[flang] Resolve index in pointer assignment to array element
Tim Keith [Tue, 27 Aug 2019 00:37:48 +0000 (17:37 -0700)]
[flang] Resolve index in pointer assignment to array element

When the LHS of a pointer assignment is an array element, the
index must be resolved.

Fixed flang-compiler/f18#684.

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

4 years ago[flang] Merge pull request flang-compiler/f18#693 from kiranchandramohan/segfault_inv...
Steve Scalpone [Tue, 27 Aug 2019 23:21:06 +0000 (16:21 -0700)]
[flang] Merge pull request flang-compiler/f18#693 from kiranchandramohan/segfault_invalid_interface

Fix for segfault in invalid proc interface message

Original-commit: flang-compiler/f18@705c3532ef4a0410fcacb3474e7926b65d9a9808
Reviewed-on: https://github.com/flang-compiler/f18/pull/693

4 years ago[flang] Fix for segfault in invalid proc interface message
Kiran Chandramohan [Tue, 27 Aug 2019 22:27:11 +0000 (23:27 +0100)]
[flang] Fix for segfault in invalid proc interface message

The segfault happened due to a missing argument.

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

4 years ago[flang] Merge pull request flang-compiler/f18#690 from flang-compiler/pmk-sjs-omp-lib
Peter Klausler [Tue, 27 Aug 2019 20:16:25 +0000 (13:16 -0700)]
[flang] Merge pull request flang-compiler/f18#690 from flang-compiler/pmk-sjs-omp-lib

Clean up `omp_lib.h` a bit

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

4 years ago[flang] Clean up omp_lib.h
peter klausler [Tue, 27 Aug 2019 18:17:43 +0000 (11:17 -0700)]
[flang] Clean up omp_lib.h

Original-commit: flang-compiler/f18@7119cd05344e3bdc871d6088a456561692122572
Reviewed-on: https://github.com/flang-compiler/f18/pull/690

4 years ago[flang] Reformat omp_lib.h
peter klausler [Tue, 27 Aug 2019 16:28:30 +0000 (09:28 -0700)]
[flang] Reformat omp_lib.h

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

4 years ago[flang] Implement int_ptr_kind.
Steve Scalpone [Mon, 26 Aug 2019 21:58:10 +0000 (14:58 -0700)]
[flang] Implement int_ptr_kind.
Split omp_lib.F90 into two files: a Fortran file used to
create the omp_lib module and a .h file that can be used
directly, which apparently some codes do. Because of the
split, and wanting to avoid forcing use isc_c_binding,
use int_ptr_kind()  instead of c_intptr_t.

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

4 years ago[flang] Add the OpenMP module.
Steve Scalpone [Mon, 26 Aug 2019 16:57:06 +0000 (09:57 -0700)]
[flang] Add the OpenMP module.

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

4 years ago[flang] Merge pull request flang-compiler/f18#681 from DavidTruby/master
Steve Scalpone [Tue, 27 Aug 2019 19:00:28 +0000 (12:00 -0700)]
[flang] Merge pull request flang-compiler/f18#681 from DavidTruby/master

Fix for builds with libc++9 and libstdc++10

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

4 years ago[flang] Misc changes for review
David Truby [Fri, 23 Aug 2019 20:17:57 +0000 (21:17 +0100)]
[flang] Misc changes for review

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

4 years ago[flang] Fix for builds with libc++9 and libstdc++10
David Truby [Fri, 23 Aug 2019 13:52:38 +0000 (14:52 +0100)]
[flang] Fix for builds with libc++9 and libstdc++10

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

4 years ago[flang] Fix bug with statement functions
Tim Keith [Mon, 26 Aug 2019 22:46:49 +0000 (15:46 -0700)]
[flang] Fix bug with statement functions

When the name of a statement function was previously declared, we
weren't correctly recognizing it as a statement function. E.g.
```
integer :: f, i
f(i) = i + 1
```

`f` was entered in the symbol table with `EntityDetails` and the
`parser::Name` on the first line was resolved to that symbol.
On the second line we replaced the symbol for `f` in the scope
with a subprogram symbol, but that didn't change the symbol in
the first `parser::Name`.

The fix requires:
1. don't erase the original symbol for `f`, just replace its details
2. when we erase the symbol for `f` in the subprogram scope, don't
   unresolve it

Original-commit: flang-compiler/f18@31212686ea357503840c0562853c6977bfc1ffe5

4 years ago[flang] Merge pull request flang-compiler/f18#680 from flang-compiler/jpr-fix-661
jeanPerier [Mon, 26 Aug 2019 08:45:48 +0000 (01:45 -0700)]
[flang] Merge pull request flang-compiler/f18#680 from flang-compiler/jpr-fix-661

 Fix issue: Enforce specific intrinsic characteristics

Original-commit: flang-compiler/f18@0758d8a65e4060a66ba5c755023bb03d0487593b
Reviewed-on: https://github.com/flang-compiler/f18/pull/680

4 years ago[flang] Fix intrinsic table probing issue with DOUBLE COMPLEX
Jean Perier [Fri, 23 Aug 2019 12:37:37 +0000 (05:37 -0700)]
[flang] Fix intrinsic table probing issue with DOUBLE COMPLEX
The probing table was only expecting REAL for kind code
`KindCode::doublePrecision` that is also used for
`DoublePrecisionComplex`.
Add related tests.

Original-commit: flang-compiler/f18@342ed7e7694da2d71d0c701d5a1163be333cfa01
Reviewed-on: https://github.com/flang-compiler/f18/pull/680

4 years ago[flang] Fix issue: Enforce specific intrinsic characteristics
Jean Perier [Fri, 23 Aug 2019 12:03:41 +0000 (05:03 -0700)]
[flang] Fix issue: Enforce specific intrinsic characteristics
Fix issue flang-compiler/f18#661.
The issue was that when probing a specific intrinsic, the
constraints of the related generic intrinsic were tested instead
of the more restrictive constraints of the specific intrinsic.

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

4 years ago[flang] Merge pull request flang-compiler/f18#679 from flang-compiler/jpr-fix-676
jeanPerier [Mon, 26 Aug 2019 08:11:34 +0000 (01:11 -0700)]
[flang] Merge pull request flang-compiler/f18#679 from flang-compiler/jpr-fix-676

Fix SELECTED_CHAR_KIND('DEFAULT') folding issue

Original-commit: flang-compiler/f18@6703f7bd99da33c437df68aafbe855cd1a96ecae
Reviewed-on: https://github.com/flang-compiler/f18/pull/679

4 years ago[flang] Fix SELECTED_CHAR_KIND('DEFAULT') folding issue
Jean Perier [Fri, 23 Aug 2019 10:36:29 +0000 (03:36 -0700)]
[flang] Fix SELECTED_CHAR_KIND('DEFAULT') folding issue
Fix issue flang-compiler/f18#676
The issue was that the 'DEFAULT' case was handled
directly in fold.cc which did not lowercase/trim trailing
space of the argument befaore comparing to "default".

Modify the `Selected_char_kind` function to accept the default
char kind as argument and to return it if the processed argument
matches "default".

Original-commit: flang-compiler/f18@14222ae9148af4f99f59e6f9f0b928baa2da0b10
Reviewed-on: https://github.com/flang-compiler/f18/pull/679

4 years ago[flang] Merge pull request flang-compiler/f18#671 from flang-compiler/pmk-decimal
Peter Klausler [Fri, 23 Aug 2019 18:51:54 +0000 (11:51 -0700)]
[flang] Merge pull request flang-compiler/f18#671 from flang-compiler/pmk-decimal

Better binary<->decimal floating-point conversion

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

4 years ago[flang] Make it easier to enable minimal FP output by default for module files (but...
peter klausler [Fri, 23 Aug 2019 18:14:48 +0000 (11:14 -0700)]
[flang] Make it easier to enable minimal FP output by default for module files (but do not enable it)

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

4 years ago[flang] Cope better with ridiculously large exponents on input
peter klausler [Thu, 22 Aug 2019 20:58:50 +0000 (13:58 -0700)]
[flang] Cope better with ridiculously large exponents on input

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

4 years ago[flang] Address most review comments
peter klausler [Thu, 22 Aug 2019 19:08:39 +0000 (12:08 -0700)]
[flang] Address most review comments

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

4 years ago[flang] Address comments, fix a bug
peter klausler [Wed, 21 Aug 2019 23:51:23 +0000 (16:51 -0700)]
[flang] Address comments, fix a bug

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

4 years ago[flang] Improve comments, clean up a couple of things
peter klausler [Wed, 21 Aug 2019 18:46:46 +0000 (11:46 -0700)]
[flang] Improve comments, clean up a couple of things

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

4 years ago[flang] Fix copyright date on new file.
peter klausler [Tue, 20 Aug 2019 23:59:05 +0000 (16:59 -0700)]
[flang] Fix copyright date on new file.

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

4 years ago[flang] Correct header guards
peter klausler [Tue, 20 Aug 2019 23:57:49 +0000 (16:57 -0700)]
[flang] Correct header guards

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

4 years ago[flang] Reenable thorough test
peter klausler [Tue, 20 Aug 2019 23:42:15 +0000 (16:42 -0700)]
[flang] Reenable thorough test

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

4 years ago[flang] Better unsigned division by constants
peter klausler [Tue, 20 Aug 2019 23:38:48 +0000 (16:38 -0700)]
[flang] Better unsigned division by constants

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

4 years ago[flang] Clean up some static_casts
peter klausler [Tue, 20 Aug 2019 21:35:24 +0000 (14:35 -0700)]
[flang] Clean up some static_casts

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

4 years ago[flang] Simplify guard bits (only use 3)
peter klausler [Tue, 20 Aug 2019 20:44:11 +0000 (13:44 -0700)]
[flang] Simplify guard bits (only use 3)

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

4 years ago[flang] Work around slow clang-7
peter klausler [Tue, 20 Aug 2019 19:58:27 +0000 (12:58 -0700)]
[flang] Work around slow clang-7

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

4 years ago[flang] faster Parse
peter klausler [Tue, 20 Aug 2019 17:05:52 +0000 (10:05 -0700)]
[flang] faster Parse

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

4 years ago[flang] Get clean build with gcc
peter klausler [Mon, 19 Aug 2019 22:50:21 +0000 (15:50 -0700)]
[flang] Get clean build with gcc

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

4 years ago[flang] Simplify decimal->binary
peter klausler [Mon, 19 Aug 2019 18:45:55 +0000 (11:45 -0700)]
[flang] Simplify decimal->binary

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

4 years ago[flang] Make thorough test thorough again
peter klausler [Fri, 16 Aug 2019 18:13:58 +0000 (11:13 -0700)]
[flang] Make thorough test thorough again

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

4 years ago[flang] Replace usage of original decimal conversion code with calls to new library
peter klausler [Fri, 16 Aug 2019 18:12:18 +0000 (11:12 -0700)]
[flang] Replace usage of original decimal conversion code with calls to new library

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

4 years ago[flang] Debug test
peter klausler [Thu, 15 Aug 2019 22:07:27 +0000 (15:07 -0700)]
[flang] Debug test

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

4 years ago[flang] More testing, added thorough 32-bit sweep test
peter klausler [Thu, 15 Aug 2019 00:05:08 +0000 (17:05 -0700)]
[flang] More testing, added thorough 32-bit sweep test

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

4 years ago[flang] Testing & debugging
peter klausler [Wed, 14 Aug 2019 23:21:46 +0000 (16:21 -0700)]
[flang] Testing & debugging

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

4 years ago[flang] Begin adding tests
peter klausler [Wed, 14 Aug 2019 22:25:16 +0000 (15:25 -0700)]
[flang] Begin adding tests

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

4 years ago[flang] clean up a todo
peter klausler [Wed, 14 Aug 2019 20:21:36 +0000 (13:21 -0700)]
[flang] clean up a todo

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

4 years ago[flang] Enforce digit limits
peter klausler [Wed, 14 Aug 2019 20:10:10 +0000 (13:10 -0700)]
[flang] Enforce digit limits

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

4 years ago[flang] Add rounding modes
peter klausler [Wed, 14 Aug 2019 18:53:04 +0000 (11:53 -0700)]
[flang] Add rounding modes

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

4 years ago[flang] Code snapshot
peter klausler [Tue, 13 Aug 2019 23:28:05 +0000 (16:28 -0700)]
[flang] Code snapshot

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

4 years ago[flang] Move leading zero bit count into lib/common
peter klausler [Thu, 25 Jul 2019 17:31:53 +0000 (10:31 -0700)]
[flang] Move leading zero bit count into lib/common

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

4 years ago[flang] Merge pull request flang-compiler/f18#675 from flang-compiler/tsk-modfiles2
Tim Keith [Fri, 23 Aug 2019 18:28:33 +0000 (11:28 -0700)]
[flang] Merge pull request flang-compiler/f18#675 from flang-compiler/tsk-modfiles2

Fix bugs in .mod file generation

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

4 years ago[flang] Add conversions from EnumSet<Attr> to Attrs
Tim Keith [Fri, 23 Aug 2019 15:28:20 +0000 (08:28 -0700)]
[flang] Add conversions from EnumSet<Attr> to Attrs

This allows operations from EnumSet (e.g. `operator&`) to work as expected.

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

4 years ago[flang] Fix .mod file bug with IMPORT of USEd name
Tim Keith [Thu, 22 Aug 2019 20:57:18 +0000 (13:57 -0700)]
[flang] Fix .mod file bug with IMPORT of USEd name

If a symbol (derived type, for example) was use-associated into a scope
and then imported into a nested interface block, we were not including
the correct IMPORT statement in the .mod file.

This fixes refines the test for when the IMPORT is needed.

Fixes flang-compiler/f18#657.

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

4 years ago[flang] Fix bug in .mod file for some subprogram attributes
Tim Keith [Tue, 20 Aug 2019 21:49:37 +0000 (14:49 -0700)]
[flang] Fix bug in .mod file for some subprogram attributes

Some attributes for subprograms can be in the subprogram prefix but
others cannot. For the latter, emit a separate attribute statement
to specify them. We were already doing that for PRIVATE but not for
OPTIONAL. Those may be the only two attributes this can apply to.

Fixes flang-compiler/f18#659.

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

4 years ago[flang] Fix writing defined operators to .mod files
Tim Keith [Tue, 20 Aug 2019 19:05:44 +0000 (12:05 -0700)]
[flang] Fix writing defined operators to .mod files

When defined operators were written to .mod files in USE statement
they did not come out correctly. They have to be emitted with
`PutGenericName()` so that `operator` is included.

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

4 years ago[flang] [OpenMP] miscellaneous parse tree updates (flang-compiler/f18#673)
Jinxin (Brian) Yang [Fri, 23 Aug 2019 16:45:03 +0000 (09:45 -0700)]
[flang] [OpenMP] miscellaneous parse tree updates (flang-compiler/f18#673)

1. Big chunk: update comments in parse-tree.h and openmp-grammar.h
   with Spec chapter/section info, simple explanation, or productions.

2. Update `To`, `Link`, and `From` clauses with `OmpObjectList` to allow
   `/Common Block/`. Spec does not mention whether `Common Block name`
   should be accepted or not, so we should assume that these clauses
   accept normal `list-item`, which is `Variable`, `Array Section`, or
   `Common Block name`.

Original-commit: flang-compiler/f18@140315cb62da295f6306c2afc737041fa1626dff
Reviewed-on: https://github.com/flang-compiler/f18/pull/673

4 years ago[flang] Merge pull request flang-compiler/f18#634 from flang-compiler/jpr-fix-604
jeanPerier [Fri, 23 Aug 2019 09:19:36 +0000 (02:19 -0700)]
[flang] Merge pull request flang-compiler/f18#634 from flang-compiler/jpr-fix-604

Fix a crash with IMPORT in BLOCK (issue 604)

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

4 years ago[flang] Address comment: remove useless const
Jean Perier [Thu, 22 Aug 2019 08:12:20 +0000 (01:12 -0700)]
[flang] Address comment: remove useless const

Original-commit: flang-compiler/f18@60983f502103575999a91bf62cd0c78aded85837
Reviewed-on: https://github.com/flang-compiler/f18/pull/634

4 years ago[flang] Change Scope::name() to Scope::GetName()
Jean Perier [Wed, 21 Aug 2019 13:29:11 +0000 (06:29 -0700)]
[flang] Change Scope::name() to Scope::GetName()
Address comments. Not all scopes are related to
a name. This change makes this more visible to compiler
programers by changing `scope:name()` into `Scope::GetName()`
that returns an optional `SourceName` instead of always
returning a `SourceName` and dying when it cannot.

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

4 years ago[flang] Use value semantic for SourceName
Jean Perier [Wed, 21 Aug 2019 12:33:03 +0000 (05:33 -0700)]
[flang] Use value semantic for SourceName
Change all SourceName* to std::optional<SourceName> because
SourceName is small enough (16 bytes) to be passed and stored
by value which avoid having to worry about life-time, storage and
value constance issues that comes with pointers.

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

4 years ago[flang] Fix test copyright year.
Jean Perier [Wed, 7 Aug 2019 17:18:30 +0000 (10:18 -0700)]
[flang] Fix test copyright year.

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

4 years ago[flang] Fix a crash with IMPORT in BLOCK (issue 604)
Jean Perier [Wed, 7 Aug 2019 17:14:28 +0000 (10:14 -0700)]
[flang] Fix a crash with IMPORT in BLOCK (issue 604)
Only call scope.name() if the scope has a symbol (Block, Global,
Forall and ImpliedDo kind of scopes do not have a symbol).

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

4 years ago[flang] [OpenMP] Canonicalization framework (flang-compiler/f18#599)
Jinxin (Brian) Yang [Thu, 22 Aug 2019 17:34:15 +0000 (10:34 -0700)]
[flang]  [OpenMP] Canonicalization framework (flang-compiler/f18#599)

* [OpenMP] Canonicalization framework

This is mainly designed for loop association work but can be used for others,
and `CanonicalizeOmp` must be after `CanonicalizeDo`.

At the `Block` level, recognize legal sequence of `OpenMPLoopConstruct`,
`DoConstruct`, and `OmpEndLoopDirective`. Move available `DoConstruct`
and optional `OmpEndLoopDirective` into `OpenMPLoopConstruct`. Throw error
messages if:
 1. `DoConstruct` is not following `OpenMPLoopConstruct`
 2. `OmpEndLoopDirective` is not following associated do-loop

Once this pass this done, Semantics will not proceed if error exists.

* Update on reviews

1. extract matching and move part into its own function (once `DoConstruct`
   is moved, see whether `OpenMPEndLoopDirective` is available)

2. Use a template function to access construct from ExecutionPartConstruct.

3. Move this code into namespace semantics

Original-commit: flang-compiler/f18@52979f1e93f40c31e04118067403a258555d139a
Reviewed-on: https://github.com/flang-compiler/f18/pull/599

4 years ago[flang] Merge pull request flang-compiler/f18#672 from flang-compiler/jpr-fix-574
jeanPerier [Thu, 22 Aug 2019 12:49:15 +0000 (05:49 -0700)]
[flang] Merge pull request flang-compiler/f18#672 from flang-compiler/jpr-fix-574

 Handle AssocEntityDetails in mis-parsed function reference

Original-commit: flang-compiler/f18@0006272bbd79f1d4073d52516e0672911108138a
Reviewed-on: https://github.com/flang-compiler/f18/pull/672

4 years ago[flang] Add comments and tests for issue 574 fix
Jean Perier [Wed, 21 Aug 2019 09:42:34 +0000 (02:42 -0700)]
[flang] Add comments and tests for issue 574 fix

Original-commit: flang-compiler/f18@89337cefc7f22944ab53347f97261cb6038a628f
Reviewed-on: https://github.com/flang-compiler/f18/pull/672

4 years ago[flang] Handle AssocEntityDetails in mis-parsed function reference
Jean Perier [Tue, 20 Aug 2019 13:15:52 +0000 (06:15 -0700)]
[flang] Handle AssocEntityDetails in mis-parsed function reference
Fix issue flang-compiler/f18#574.
Array references can be mistaken for function references during
parsing. This is handled and fixed by semantics. however, if the
symbol in the misparsed array reference was construct associated,
then semantics was not handling the case correctly because
semantics was only expecting `ObjectEntityDetails`.
It was not possible to change the related `GetUltimate` into
`GetAssociationRoot` because associated symbols are not always
associated to another symbol (variable) but may be assoicated to
an expression. Hence, this change allow `AssocEntityDetails` to
be also accepted when dealing with array references misparsed as
function references.

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

4 years ago[flang] Merge pull request flang-compiler/f18#668 from schweitzpgi/master
Eric Schweitz [Wed, 21 Aug 2019 18:21:01 +0000 (11:21 -0700)]
[flang] Merge pull request flang-compiler/f18#668 from schweitzpgi/master

Add mlir-tablegen for FIR ops

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

4 years ago[flang] Add FIR dialect header
Eric Schweitz [Sat, 17 Aug 2019 02:01:49 +0000 (19:01 -0700)]
[flang] Add FIR dialect header

Original-commit: flang-compiler/f18@3c902e04d7db782ffecdbee937b4b9e3b35b5551
Reviewed-on: https://github.com/flang-compiler/f18/pull/668

4 years ago[flang] Add mlir-tablegen for FIR ops
Eric Schweitz [Fri, 16 Aug 2019 23:14:22 +0000 (16:14 -0700)]
[flang] Add mlir-tablegen for FIR ops

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

4 years ago[flang] Merge pull request flang-compiler/f18#663 from flang-compiler/ps-c1129
psteinfeld [Wed, 21 Aug 2019 04:08:04 +0000 (21:08 -0700)]
[flang] Merge pull request flang-compiler/f18#663 from flang-compiler/ps-c1129

Checks for constraint C1129

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

4 years ago[flang] Responses to comments on the pull request:
Peter Steinfeld [Tue, 20 Aug 2019 22:17:51 +0000 (15:17 -0700)]
[flang] Responses to comments on the pull request:
 - I removed the redundant test s3() from dosemantics90.f90
 - I changed the error messages to state "LOCAL locality-spec" rather than just
   "locality-spec"
 - I changed the names of a couple of variables/parameters in check-do.cc to
   make the code more understandable.

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

4 years ago[flang] Changes to implement constraint C1129
Peter Steinfeld [Wed, 14 Aug 2019 19:57:09 +0000 (12:57 -0700)]
[flang] Changes to implement constraint C1129
"C1129 A variable that is referenced by the scalar-mask-expr of a concurrent-header or by any concurrent-limit or concurrent-step in that concurrent-header shall not appear in a LOCAL locality-spec in the same DO CONCURRENT statement."

In the process of implementing these checks, I found and fixed some other problems.  I also cleaned up some of the code in check-do.cc.  I ran into two notable difficulties in implementing these checks.  First, the symbols associated with the names in a locality spec get created when the locality specs are process during name resolution.  Thus, they're different from the symbols associated with names that appear in the control expressions.  At Tim's suggestion, I dealt with this by looking up the symbols from the names in the locality spec starting with the closest enclosing scope containing the DO construct.  Second, the symbols can be hidden behind host- use- and construct-associations.

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

4 years ago[flang] Clean-up of check-do.cc
Peter Steinfeld [Thu, 8 Aug 2019 22:54:49 +0000 (15:54 -0700)]
[flang] Clean-up of check-do.cc
I got rid of duplicate functions that test for a procedure being PURE, renamed
the type SymbolContainer to SymbolSet, and moved some functions into the class
where they're referenced.

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

4 years ago[flang] [OpenMP] miscellaneous parse tree fix (flang-compiler/f18#669)
Jinxin (Brian) Yang [Tue, 20 Aug 2019 17:30:29 +0000 (10:30 -0700)]
[flang] [OpenMP] miscellaneous parse tree fix (flang-compiler/f18#669)

Fix `aligned(argument-list[ : alignment])` for `declare simd`

(original implementation will throw parser error if `: alignment` is present.

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

4 years ago[flang] [OpenMP] parse tree fix for `Declare Target` (flang-compiler/f18#670)
Jinxin (Brian) Yang [Tue, 20 Aug 2019 17:23:56 +0000 (10:23 -0700)]
[flang] [OpenMP] parse tree fix for `Declare Target` (flang-compiler/f18#670)

The original implementation will throw parsing error for multiple
clauses on `declare target` directive, for example:
```
!$omp declare target to(Q) link(R)
```

Based on the OpenMP Spec, we only need two types for the specifier:

```
!$omp declare target (extended-list)
```
or
```
!$omp declare target [clause[ [,] clause] ... ]
```

This fix makes `declare target` accepts either the `list` or `clauses`,
which is more general and better for error messages.

Adjusted existing test for checking the parse tree changes. More tests
will be added during Semantics.

Original-commit: flang-compiler/f18@60f47fc1a15803001d9251d8d8e3c53cf979ccc6
Reviewed-on: https://github.com/flang-compiler/f18/pull/670

4 years ago[flang] Merge pull request flang-compiler/f18#655 from flang-compiler/tsk-issue649
Tim Keith [Tue, 20 Aug 2019 14:38:04 +0000 (07:38 -0700)]
[flang] Merge pull request flang-compiler/f18#655 from flang-compiler/tsk-issue649

Special handling for VOLATILE and ASYNCHRONOUS

Original-commit: flang-compiler/f18@75a57c59d244303844291f990f9487a69f290b73
Reviewed-on: https://github.com/flang-compiler/f18/pull/655

4 years ago[flang] Special handling for VOLATILE and ASYNCHRONOUS
Tim Keith [Tue, 13 Aug 2019 20:50:24 +0000 (13:50 -0700)]
[flang] Special handling for VOLATILE and ASYNCHRONOUS

The VOLATILE and ASYNCHRONOUS attributes are special in two ways:
- they can be applied to use-associated variables
- if they are applied to a host-associated variable in a block, that
  variable has the attribute only within the scope of the block

The latter is implemented by making a new `HostAssocDetails` symbol
within the block where the attribute can be set without affecting the
variable in the outer scope. This is similar to how the SHARED locality
spec is implemented.

Fixes flang-compiler/f18#649.

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

4 years ago[flang] Merge pull request flang-compiler/f18#666 from flang-compiler/pmk-warnings
Peter Klausler [Fri, 16 Aug 2019 18:03:17 +0000 (11:03 -0700)]
[flang] Merge pull request flang-compiler/f18#666 from flang-compiler/pmk-warnings

Fix bug flang-compiler/f18#665, enable more warnings, deal with fallout

Original-commit: flang-compiler/f18@5762c2d88bd6844895bccf1226fd6301721a98c0
Reviewed-on: https://github.com/flang-compiler/f18/pull/666

4 years ago[flang] Another pass with clean builds
peter klausler [Thu, 15 Aug 2019 21:25:05 +0000 (14:25 -0700)]
[flang] Another pass with clean builds

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

4 years ago[flang] Enable more warnings, deal with fallout
peter klausler [Thu, 15 Aug 2019 20:50:27 +0000 (13:50 -0700)]
[flang] Enable more warnings, deal with fallout

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

4 years ago[flang] Clean up all newly enabled warnings
peter klausler [Thu, 15 Aug 2019 18:54:51 +0000 (11:54 -0700)]
[flang] Clean up all newly enabled warnings

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

4 years ago[flang] Enable some new warnings, clean up some of their consequences
peter klausler [Thu, 15 Aug 2019 17:17:31 +0000 (10:17 -0700)]
[flang] Enable some new warnings, clean up some of their consequences

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

4 years ago[flang] Merge pull request flang-compiler/f18#635 from flang-compiler/jpr-fix-547
jeanPerier [Fri, 16 Aug 2019 08:03:19 +0000 (01:03 -0700)]
[flang] Merge pull request flang-compiler/f18#635 from flang-compiler/jpr-fix-547

Fix IMPLICIT issue 547

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

4 years ago[flang] Address review comments
Jean Perier [Thu, 15 Aug 2019 06:55:16 +0000 (23:55 -0700)]
[flang] Address review comments
Rename SetType to SetTypeMapping and change argumnet names.
Style changes.

Original-commit: flang-compiler/f18@3860097815fd4e20c8c81f809c9891e163678c6a
Reviewed-on: https://github.com/flang-compiler/f18/pull/635

4 years ago[flang] Transform implict none ternaries to bool in `ImplicitRules`
Jean Perier [Thu, 8 Aug 2019 15:38:01 +0000 (08:38 -0700)]
[flang] Transform implict none ternaries to bool in `ImplicitRules`

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

4 years ago[flang] Fix IMPLICIT issue 547
Jean Perier [Thu, 8 Aug 2019 14:20:12 +0000 (07:20 -0700)]
[flang] Fix IMPLICIT issue 547

So far, in `ImplicitRules` class, `isImplicitNoneType_` is a ternary
unset -> nothing about implicit in this scope, look into parents
set true -> There is an IMPLICIT NONE for types in this scope.
set to false -> There is an IMPLICIT statement mapping types in
this false.

However, it was never set to false, so the IMPORT NONE of parent scopes
was "leaking" when it should not.

Set `isImplicitNoneType_` to false if an IMPLICIT statement is met to
fix the issue.

However, this change made the current name-resolution to then completly
disregard parent scope IMPLICIT NONE even for letters for which no
mapping were defined in the current scope. To fix this `GetType` was
modified to check for implicit none.

This led to `ApplyImplicitRules` to do redudant check, so it was
reorganised to querry for a type and complain if gets a nuulptr.

`GetImplicitType` was modified to avoid redundant error message.

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

4 years ago[flang] Merge pull request flang-compiler/f18#660 from flang-compiler/sjs-c-chars
Steve Scalpone [Thu, 15 Aug 2019 21:54:05 +0000 (14:54 -0700)]
[flang] Merge pull request flang-compiler/f18#660 from flang-compiler/sjs-c-chars

Define the named constants for the C characters with special semantics

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

4 years ago[flang] Use ACHAR() instead of the nonstandard backslash escape sequences.
Steve Scalpone [Wed, 14 Aug 2019 17:36:29 +0000 (10:36 -0700)]
[flang] Use ACHAR() instead of the nonstandard backslash escape sequences.

Original-commit: flang-compiler/f18@103ed895fe27ae0f4503a4cf379132392dc14788
Reviewed-on: https://github.com/flang-compiler/f18/pull/660