peter klausler [Thu, 5 Jul 2018 21:19:19 +0000 (14:19 -0700)]
[flang] More abstraction in expressions.
Original-commit: flang-compiler/f18@
2dc425acf58e9c4a836d6cb73b436b0059a5309f
Reviewed-on: https://github.com/flang-compiler/f18/pull/117
Tree-same-pre-rewrite: false
peter klausler [Thu, 5 Jul 2018 17:47:01 +0000 (10:47 -0700)]
[flang] tweaks
Original-commit: flang-compiler/f18@
624c1d2ec8539ae96f00c99ca90c56a0d7e3d266
Reviewed-on: https://github.com/flang-compiler/f18/pull/117
Tree-same-pre-rewrite: false
peter klausler [Thu, 5 Jul 2018 16:39:39 +0000 (09:39 -0700)]
[flang] clean up dumping code
Original-commit: flang-compiler/f18@
29698883601984a16c48e4b5b3a1b314930ad47a
Reviewed-on: https://github.com/flang-compiler/f18/pull/117
Tree-same-pre-rewrite: false
peter klausler [Tue, 3 Jul 2018 23:17:52 +0000 (16:17 -0700)]
[flang] Fix issue flang-compiler/f18#113.
Original-commit: flang-compiler/f18@
835e51b6e6e4030a26398f4c0e550d7baad13aa9
Reviewed-on: https://github.com/flang-compiler/f18/pull/117
Tree-same-pre-rewrite: false
peter klausler [Tue, 3 Jul 2018 22:14:48 +0000 (15:14 -0700)]
[flang] work on variables and traversal
Original-commit: flang-compiler/f18@
432779b2218c500a18dec7f1018270bf150be0cb
Reviewed-on: https://github.com/flang-compiler/f18/pull/117
Tree-same-pre-rewrite: false
peter klausler [Tue, 26 Jun 2018 22:18:53 +0000 (15:18 -0700)]
[flang] Commit work in progress to branch for f18 repository move.
Original-commit: flang-compiler/f18@
e0db6903c74b5cadfff461da9f4e51b59e165ba0
Reviewed-on: https://github.com/flang-compiler/f18/pull/117
Tree-same-pre-rewrite: false
Tim Keith [Mon, 9 Jul 2018 23:02:23 +0000 (16:02 -0700)]
[flang] Merge pull request flang-compiler/f18#116 from flang-compiler/tsk8
Fix bug recognizing derived type constructor call
Original-commit: flang-compiler/f18@
e52910514495abf55094defb6668447e178e1c84
Reviewed-on: https://github.com/flang-compiler/f18/pull/116
Tim Keith [Mon, 9 Jul 2018 22:25:49 +0000 (15:25 -0700)]
[flang] Fix bug recognizing derived type constructor call
A ProcedureDesignator is a derived type constructor call if the name
resolves to a derived type. We need to recognize it as such and not
report an error. It may be in another derived type so we have to call
FindSymbol() first to find the derived type.
Most of the diffs are due to `symbol` changing from a reference to a
pointer.
In this example we were reporting an error on the first `t1()` and
resolving the second as an external function call.
```
module m
type :: t1
end type
type(t1) :: x = t1()
type t2
type(t1) :: y = t1()
end type
end module
```
Original-commit: flang-compiler/f18@
717b22ca2b9e7ade24454b90b980f8c825fe4b12
Reviewed-on: https://github.com/flang-compiler/f18/pull/116
Tim Keith [Thu, 5 Jul 2018 21:47:48 +0000 (14:47 -0700)]
[flang] Merge pull request flang-compiler/f18#114 from flang-compiler/tsk5
Check consistency of generic interfaces.
Original-commit: flang-compiler/f18@
16ed60240ab8a81f5a64cad2741899b9b53fe44e
Reviewed-on: https://github.com/flang-compiler/f18/pull/114
Tim Keith [Thu, 5 Jul 2018 17:36:18 +0000 (10:36 -0700)]
[flang] Add missing copyright.
Original-commit: flang-compiler/f18@
cf7087b3816a3cc5421bb75c4bccf358ac7d2db6
Reviewed-on: https://github.com/flang-compiler/f18/pull/114
Tim Keith [Thu, 5 Jul 2018 17:28:34 +0000 (10:28 -0700)]
[flang] Check consistency of generic interfaces.
The specific procedures in a generic interface must be all functions or
all subroutines. If there is a derived type with the same name they can
only be functions.
Original-commit: flang-compiler/f18@
e02cef047a02585caba550da01dcf7f5e75942dd
Reviewed-on: https://github.com/flang-compiler/f18/pull/114
Tree-same-pre-rewrite: false
Tim Keith [Tue, 26 Jun 2018 22:43:01 +0000 (15:43 -0700)]
[flang] Merge pull request flang-compiler/f18#112 from ThePortlandGroup/tsk5
Support unparse with symbol annotations.
Original-commit: flang-compiler/f18@
fcca042a10b3908ffb72d8cf7ae86c71cffdfc6d
Reviewed-on: https://github.com/flang-compiler/f18/pull/112
Tim Keith [Tue, 26 Jun 2018 22:40:52 +0000 (15:40 -0700)]
[flang] Add -funparse-with-symbols to enable new behavior
Original-commit: flang-compiler/f18@
7ad44e7e33de7020a94378b8f98395e7d5edef51
Reviewed-on: https://github.com/flang-compiler/f18/pull/112
Tim Keith [Tue, 26 Jun 2018 22:01:42 +0000 (15:01 -0700)]
[flang] Support unparse with symbol annotations.
When `-fdebug-dump-symbols` is supplied with `-funparse`, include symbol
information in comments in the Fortran output. This will be used for
testing to verify that correct symbols are defined and references in
the right place.
In `UnparseWithSymbols()`, walk the parse tree and collect symbol
definitions and references, organized by statement. When a symbol is
defined across several statement it is associated with the first.
The definition of implicitly defined symbols is associated with the
first reference.
To write out the symbol information, a new optional argument is added to
`Unparse()`: it is a function that is called immediately before each
statement is unparsed. We pass in a function that prints out the symbol
information collected for that statement.
Add `Symbol::GetType()` to make it easier to write the symbol types
and add `Symbol::SetType()` for uniformity.
Original-commit: flang-compiler/f18@
2e827de4ad23d036fa3436382c8a878a991f11f5
Reviewed-on: https://github.com/flang-compiler/f18/pull/112
Tree-same-pre-rewrite: false
Peter Klausler [Mon, 25 Jun 2018 16:32:14 +0000 (09:32 -0700)]
[flang] Merge pull request flang-compiler/f18#111 from ThePortlandGroup/pmk-expr
Expressions
Original-commit: flang-compiler/f18@
802e18cb5ae3dae3d5f8d2e3bce0807cd362660e
Reviewed-on: https://github.com/flang-compiler/f18/pull/111
peter klausler [Fri, 22 Jun 2018 23:44:23 +0000 (16:44 -0700)]
[flang] Incorporate suggestions from code review.
Original-commit: flang-compiler/f18@
c66bd9ab15846afcaed129764b8c958f277e071f
Reviewed-on: https://github.com/flang-compiler/f18/pull/111
peter klausler [Fri, 22 Jun 2018 21:51:15 +0000 (14:51 -0700)]
[flang] Begin folding, with simple test, as sanity check on usability.
Original-commit: flang-compiler/f18@
3839c65cd5ba3a7d2ab84bd48a371659a249b383
Reviewed-on: https://github.com/flang-compiler/f18/pull/111
Tree-same-pre-rewrite: false
peter klausler [Fri, 22 Jun 2018 20:40:56 +0000 (13:40 -0700)]
[flang] clean up for push
Original-commit: flang-compiler/f18@
8b5bbcedba41828d24e01251b06789d3eef4ebf8
Reviewed-on: https://github.com/flang-compiler/f18/pull/111
Tree-same-pre-rewrite: false
peter klausler [Fri, 22 Jun 2018 20:00:13 +0000 (13:00 -0700)]
[flang] Prepare for check-in
Original-commit: flang-compiler/f18@
2f5b2d5f40106a61bee6b726d2d7915bb891fe85
Reviewed-on: https://github.com/flang-compiler/f18/pull/111
Tree-same-pre-rewrite: false
peter klausler [Fri, 22 Jun 2018 19:22:50 +0000 (12:22 -0700)]
[flang] Operator overloads for expression construction.
Original-commit: flang-compiler/f18@
a4d3a736cf3d0c90fd5e26fb25b3adbc4530179a
Reviewed-on: https://github.com/flang-compiler/f18/pull/111
Tree-same-pre-rewrite: false
peter klausler [Fri, 22 Jun 2018 18:22:50 +0000 (11:22 -0700)]
[flang] clean up clang warnings from master
Original-commit: flang-compiler/f18@
1c9aa95f8ddb2bd2b8366f84bd4cf7144de4c279
Reviewed-on: https://github.com/flang-compiler/f18/pull/111
Tree-same-pre-rewrite: false
peter klausler [Fri, 22 Jun 2018 18:02:54 +0000 (11:02 -0700)]
[flang] More refinement, use const on subexpressions.
Original-commit: flang-compiler/f18@
f484325c61fd5d7d4aec1fdbbf24fb54a97be907
Reviewed-on: https://github.com/flang-compiler/f18/pull/111
Tree-same-pre-rewrite: false
peter klausler [Thu, 21 Jun 2018 22:35:25 +0000 (15:35 -0700)]
[flang] Simplification
Original-commit: flang-compiler/f18@
a50ce6e499f484deeb1296dbb1139a9b8ca91b4a
Reviewed-on: https://github.com/flang-compiler/f18/pull/111
Tree-same-pre-rewrite: false
peter klausler [Thu, 21 Jun 2018 20:28:31 +0000 (13:28 -0700)]
[flang] fix builds, all now clear
Original-commit: flang-compiler/f18@
7c32a531a0cfe6a766fe0c2faa2b7e26ee957a14
Reviewed-on: https://github.com/flang-compiler/f18/pull/111
Tree-same-pre-rewrite: false
peter klausler [Thu, 21 Jun 2018 19:54:46 +0000 (12:54 -0700)]
[flang] Dump complex expressions
Original-commit: flang-compiler/f18@
da25b870d32bebc2b3055ede771efaf6701e8a3f
Reviewed-on: https://github.com/flang-compiler/f18/pull/111
Tree-same-pre-rewrite: false
peter klausler [Thu, 21 Jun 2018 19:47:28 +0000 (12:47 -0700)]
[flang] More dumping code
Original-commit: flang-compiler/f18@
43d147144a843956ab37ae4714902795c652e347
Reviewed-on: https://github.com/flang-compiler/f18/pull/111
Tree-same-pre-rewrite: false
peter klausler [Thu, 21 Jun 2018 18:03:00 +0000 (11:03 -0700)]
[flang] Use unique_ptr for operands. Refactor comparisons.
Original-commit: flang-compiler/f18@
92e154e76eeac6ea91c62cdc0081fb35258f8c78
Reviewed-on: https://github.com/flang-compiler/f18/pull/111
Tree-same-pre-rewrite: false
peter klausler [Wed, 20 Jun 2018 23:50:27 +0000 (16:50 -0700)]
[flang] Expression formatting
Original-commit: flang-compiler/f18@
3d0977a57e32460ac0cf808a7e4b5bcbdb3d30ba
Reviewed-on: https://github.com/flang-compiler/f18/pull/111
Tree-same-pre-rewrite: false
peter klausler [Wed, 20 Jun 2018 22:12:13 +0000 (15:12 -0700)]
[flang] Change memcpy to memmove for overlap case.
Original-commit: flang-compiler/f18@
cb400284e48a486922ee4420f02448eb68966fcf
Reviewed-on: https://github.com/flang-compiler/f18/pull/111
Tree-same-pre-rewrite: false
peter klausler [Wed, 20 Jun 2018 22:10:34 +0000 (15:10 -0700)]
[flang] Numeric constant formatting and tests.
Original-commit: flang-compiler/f18@
ade64420201c45d8082c65ba21e6e7d161605300
Reviewed-on: https://github.com/flang-compiler/f18/pull/111
Tree-same-pre-rewrite: false
peter klausler [Wed, 20 Jun 2018 18:55:10 +0000 (11:55 -0700)]
[flang] Character LEN, operator overloadings
Original-commit: flang-compiler/f18@
08c32de24cae7ea9091f665337c1c2386ec87a32
Reviewed-on: https://github.com/flang-compiler/f18/pull/111
Tree-same-pre-rewrite: false
peter klausler [Wed, 20 Jun 2018 17:53:49 +0000 (10:53 -0700)]
[flang] Finish first cut at expression.h.
Original-commit: flang-compiler/f18@
07142e7fad2b8c672df7549caec8be0d1c0d3856
Reviewed-on: https://github.com/flang-compiler/f18/pull/111
Tree-same-pre-rewrite: false
peter klausler [Tue, 19 Jun 2018 23:26:48 +0000 (16:26 -0700)]
[flang] Expression work
Original-commit: flang-compiler/f18@
b60c84fff491d19402f95f825b4be42f239ac2a9
Reviewed-on: https://github.com/flang-compiler/f18/pull/111
Tree-same-pre-rewrite: false
peter klausler [Tue, 19 Jun 2018 21:17:14 +0000 (14:17 -0700)]
[flang] reformat c++
Original-commit: flang-compiler/f18@
6c5c9b316542b558d1d4e3883c92e172f374e230
Reviewed-on: https://github.com/flang-compiler/f18/pull/111
Tree-same-pre-rewrite: false
peter klausler [Tue, 19 Jun 2018 21:16:01 +0000 (14:16 -0700)]
[flang] first cut at expressions
Original-commit: flang-compiler/f18@
b06c5486e4d80e017a9c697c79ac588a88498547
Reviewed-on: https://github.com/flang-compiler/f18/pull/111
Tree-same-pre-rewrite: false
peter klausler [Mon, 18 Jun 2018 19:09:56 +0000 (12:09 -0700)]
[flang] begin expression representation
Original-commit: flang-compiler/f18@
627c057d5c8392914eb186e8f6dacab40b5a6666
Reviewed-on: https://github.com/flang-compiler/f18/pull/111
Tree-same-pre-rewrite: false
peter klausler [Mon, 18 Jun 2018 18:26:06 +0000 (11:26 -0700)]
[flang] Documentation
Original-commit: flang-compiler/f18@
27f6927053fa685b9366647fa02b595ffd830441
Reviewed-on: https://github.com/flang-compiler/f18/pull/111
Tree-same-pre-rewrite: false
Tim Keith [Fri, 22 Jun 2018 21:45:41 +0000 (14:45 -0700)]
[flang] Merge pull request flang-compiler/f18#110 from ThePortlandGroup/tsk1
Fix problems in PR 109 when compiling with clang.
Original-commit: flang-compiler/f18@
f21c334589e580c1c32aa3b8abad000636283e8f
Reviewed-on: https://github.com/flang-compiler/f18/pull/110
Tim Keith [Fri, 22 Jun 2018 21:08:04 +0000 (14:08 -0700)]
[flang] Fix problems in PR 109 when compiling with clang.
This gets the code base back to compiling cleanly with clang after
pull request 109.
There were two overloadings of `Post(const parser::DeclarationTypeSpec::Type &)`.
The one in DeclarationVisitor needed to call the one in DeclTypeSpecVisitor.
This was fixed by introducing a new function, SetDerivedDeclTypeSpec, to do
the equivalent thing.
Original-commit: flang-compiler/f18@
81e447bf4ec076f8fa823c0c61c9dd72e1f62fe4
Reviewed-on: https://github.com/flang-compiler/f18/pull/110
Tim Keith [Fri, 22 Jun 2018 17:29:28 +0000 (10:29 -0700)]
[flang] Merge pull request flang-compiler/f18#109 from ThePortlandGroup/tsk5
Name resolution for derived types.
Original-commit: flang-compiler/f18@
5317d4f30ae926ee4f839d3afab68363d1d9c5c9
Reviewed-on: https://github.com/flang-compiler/f18/pull/109
Tim Keith [Fri, 22 Jun 2018 15:21:19 +0000 (08:21 -0700)]
[flang] Name resolution for derived types.
This consists of:
- a new kind of symbols to represent them with DerivedTypeDetails
- creating symbols for derived types when they are declared
- creating a new kind of scope for the type to hold component symbols
- resolving entity declarations of objects of derived type
- resolving references to objects of derived type and to components
- handling derived types with same name as generic
Type parameters are not yet implemented.
Refactor DeclTypeSpec to be a value class wrapping an IntrinsicTypeSpec
or a DerivedTypeSpec (or neither in the TypeStar and ClassStar cases).
Store DerivedTypeSpec objects in a new structure the current scope
MakeDerivedTypeSpec so that DeclTypeSpec can just contain a pointer to
them, as it currently does for intrinsic types.
In GenericDetails, add derivedType field to handle case where generic
and derived type have the same name. The generic is in the scope and the
derived type is referenced from the generic, similar to the case where a
generic and specific have the same name. When one of these names is
mis-recognized, we sometimes have to fix up the 'occurrences' lists
of the symbols.
Assign implicit types as soon as an entity is encountered that requires
one. Otherwise implicit derived types won't work. When we see 'x%y' we
have to know the type of x in order to resolve y. Add an Implicit flag
to mark symbols that were implicitly typed
For symbols that introduce a new scope, include a pointer back to that
scope.
Add CurrNonTypeScope() for the times when we want the current scope but
ignoring derived type scopes. For example, that happens when looking for
types or parameters, or creating implicit symbols.
Original-commit: flang-compiler/f18@
9bd16da020b64b78ed3928e0244765cd2e2d8068
Reviewed-on: https://github.com/flang-compiler/f18/pull/109
Tim Keith [Thu, 14 Jun 2018 22:34:57 +0000 (15:34 -0700)]
[flang] Refactor DeclTypeSpec and DerivedTypeSpec classes.
Make DerivedTypeSpec a simple wrapper around the name of the type.
Leave out type parameter values until we are ready to resolve them
as well.
Change DeclTypeSpec to be an old-fashioned union with an enum to
indicate what is in it. std::variant doesn't work well here because
we wanted the enum visible in the class' API and there is not a
1-to-1 mapping between enumerators and data stored.
Original-commit: flang-compiler/f18@
03bdeef790375ea7dbac6abf1118ec743c55a1b6
Reviewed-on: https://github.com/flang-compiler/f18/pull/109
Tree-same-pre-rewrite: false
Tim Keith [Wed, 20 Jun 2018 17:13:43 +0000 (10:13 -0700)]
[flang] Merge pull request flang-compiler/f18#107 from ThePortlandGroup/tsk2
Change how memory for Symbol instances is managed.
Original-commit: flang-compiler/f18@
ccf6aeac622038c5d2a3151d4566aa2536e9aea2
Reviewed-on: https://github.com/flang-compiler/f18/pull/107
Tim Keith [Tue, 19 Jun 2018 23:06:41 +0000 (16:06 -0700)]
[flang] Change how memory for Symbol instances is managed.
With this change, all instances Symbol are stored in class Symbols.
Scope.symbols_, which used to own the symbol memory, now maps names to
Symbol* instead. This causes a bunch of reference-to-pointer changes
because of the change in type of key-value pairs. It also requires a
default constructor for Symbol, which means owner_ can't be a reference.
Symbols manages Symbol instances by allocating a block of them at a time
and returning the next one when needed. They are never freed.
The reason for the change is that there are a few cases where we need
to have a two symbols with the same name, so they can't both live in
the map in Scope. Those are:
1. When there is an erroneous redeclaration of a name we may delete the
first symbol and replace it with a new one. If we have saved a pointer
to the first one it is now dangling. This can be seen by running
`f18 -fdebug-dump-symbols -fparse-only test/semantics/resolve19.f90`
under valgrind. Subroutine s is declared twice: each results in a
scope that contains a pointer back to the symbol for the subroutine.
After the second symbol for s is created the first is gone so the
pointer in the scope is invalid.
2. A generic and one of its specifics can have the same name. We currently
handle that by moving the symbol for the specific into a unique_ptr
in the generic. So in that case the symbol is owned by another symbol
instead of by the scope. It is simpler if we only have to deal with
moving the raw pointer around.
3. A generic and a derived type can have the same name. This case isn't
handled yet, but it can be done like flang-compiler/f18#2 above. It's more complicated
because the derived type and the generic can be declared in either
order.
Original-commit: flang-compiler/f18@
55a68cf0235c8a3ac855de7dc0e2b08690866be0
Reviewed-on: https://github.com/flang-compiler/f18/pull/107
Tim Keith [Tue, 19 Jun 2018 21:59:41 +0000 (14:59 -0700)]
[flang] Fix bug in adding symbols to parse tree.
We were collecting symbols in a map of SourceName to Symbol*.
This is wrong because sometimes different occurrences of a name
map to different symbols (e.g. in different scopes).
SourceName::begin() is unique for each occurrence so use that
as the map key instead.
The problem can be reproduced by running:
`f18 -fdebug-resolve-names -fparse-only -fdebug-dump-parse-tree`
on the following source. The two symbols 'i' should have different
types and they were both coming out as INTEGER because they both
pointed to the first symbol for 'i'.
```
module m
integer :: i
contains
subroutine s
real :: i
end
end
```
Original-commit: flang-compiler/f18@
a165c717ff20d3ccca334b91fa538f54b54071cf
Reviewed-on: https://github.com/flang-compiler/f18/pull/107
Tree-same-pre-rewrite: false
Peter Klausler [Mon, 18 Jun 2018 19:10:35 +0000 (12:10 -0700)]
[flang] Merge pull request flang-compiler/f18#106 from ThePortlandGroup/pmk-value
Rearrange some facilities into a new lib/common.
Original-commit: flang-compiler/f18@
12477c3c3090b6cd2db0fa247aab073808a94511
Reviewed-on: https://github.com/flang-compiler/f18/pull/106
peter klausler [Mon, 18 Jun 2018 18:03:43 +0000 (11:03 -0700)]
[flang] Rearrange some facilities into a new lib/common.
Original-commit: flang-compiler/f18@
279af1e817b1266dd57689e462272f8e29496798
Reviewed-on: https://github.com/flang-compiler/f18/pull/106
Tim Keith [Fri, 15 Jun 2018 22:40:33 +0000 (15:40 -0700)]
[flang] Merge pull request flang-compiler/f18#105 from ThePortlandGroup/tsk2
Add name resolution tests
Original-commit: flang-compiler/f18@
edf182d458cb5a362369fb0b71a3e98282439559
Reviewed-on: https://github.com/flang-compiler/f18/pull/105
Tim Keith [Fri, 15 Jun 2018 21:54:34 +0000 (14:54 -0700)]
[flang] Add name resolution tests
The Fortran source files in test/semantics all contain expected
errors in comments. The script test_errors.sh compiles a file with
'f18 -fdebug-resolve-names -fparse-only' and compares the actual
errors produced against the expected ones.
The change to resolve15.f90 is necessary because test_errors.sh can't
handle two expected errors for the same source line.
A useful command to run these is 'ctest -R f90 --output-on-failure'.
-R means only run tests with f90 in the name
--output-on-failure prints the output of test_errors.sh when a test
fails, showing the expected and actual messages that differ.
Original-commit: flang-compiler/f18@
df18ee7bc95628503b37648d98c5ae25bc74b227
Reviewed-on: https://github.com/flang-compiler/f18/pull/105
Peter Klausler [Fri, 15 Jun 2018 17:35:45 +0000 (10:35 -0700)]
[flang] Merge pull request flang-compiler/f18#101 from ThePortlandGroup/pmk-evaluate
Basic operation evaluation framework
Original-commit: flang-compiler/f18@
e91fac085d347639d1ddc5e6baf8d9b6fc41f3f3
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
peter klausler [Fri, 15 Jun 2018 17:02:09 +0000 (10:02 -0700)]
[flang] Test 64-bit reals too.
Original-commit: flang-compiler/f18@
67fd5514417b2c920be85e0919bf06b06a399e3c
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
peter klausler [Thu, 14 Jun 2018 20:43:02 +0000 (13:43 -0700)]
[flang] Address review comments
Original-commit: flang-compiler/f18@
d96917c70130b12462d28189ded5e6243e8c854e
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Wed, 13 Jun 2018 23:08:12 +0000 (16:08 -0700)]
[flang] More rearrangement, and debug an edge case with Underflow flag.
Original-commit: flang-compiler/f18@
57ef08433ebc1b174551dfaca0c57ba97a1d7806
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Wed, 13 Jun 2018 17:44:55 +0000 (10:44 -0700)]
[flang] Move member functions complex.h -> complex.cc
Original-commit: flang-compiler/f18@
445333b13e212816f42b38c940b89e6a90708414
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Wed, 13 Jun 2018 17:36:56 +0000 (10:36 -0700)]
[flang] Remove work-around in resolve-names.cc.
Original-commit: flang-compiler/f18@
5dc0e037f59f6e58d45d7f65ec52e7cd5525b78c
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Wed, 13 Jun 2018 17:34:23 +0000 (10:34 -0700)]
[flang] Cleaning up Real<> for review.
Original-commit: flang-compiler/f18@
a87f324a7fd9f5f2e6dcc80b537c90ff3eb49484
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Wed, 13 Jun 2018 16:22:50 +0000 (09:22 -0700)]
[flang] Prepare for review.
Original-commit: flang-compiler/f18@
266d25f630b459d1e20aa4dc9074732ad1fd07b5
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Tue, 12 Jun 2018 22:45:52 +0000 (15:45 -0700)]
[flang] Less exhaustive REAL testing by default.
Original-commit: flang-compiler/f18@
d61ac7da9bf719fdda81821aab8fb2b7503f5367
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Tue, 12 Jun 2018 22:14:18 +0000 (15:14 -0700)]
[flang] COMPLEX
Original-commit: flang-compiler/f18@
452d602fbb5931e29f4e8450660705297c2672c5
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Tue, 12 Jun 2018 20:33:08 +0000 (13:33 -0700)]
[flang] LOGICAL
Original-commit: flang-compiler/f18@
6ec49f6edc3fc2bc4475bd08b4d3f2769b6fc441
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Tue, 12 Jun 2018 19:59:31 +0000 (12:59 -0700)]
[flang] Revamp type.h, add LOGICAL
Original-commit: flang-compiler/f18@
f7d77887a2a3f6bf9991181abb09911dd75d8e20
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Mon, 11 Jun 2018 23:01:54 +0000 (16:01 -0700)]
[flang] All operations now work and match x86, all modes and flags.
Original-commit: flang-compiler/f18@
c69eef6524c086403e3f29c4a983514a9f2244bc
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Mon, 11 Jun 2018 18:35:53 +0000 (11:35 -0700)]
[flang] More real work. All ops, rounding modes, and flags good except for division.
Original-commit: flang-compiler/f18@
ea697295db84b64b1c13144e3b5eaef9a879e319
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Fri, 8 Jun 2018 22:49:06 +0000 (15:49 -0700)]
[flang] Check flag bits.
Original-commit: flang-compiler/f18@
b63e39aae7c4c1de2fbdca24aa096d594039e934
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Fri, 8 Jun 2018 22:18:03 +0000 (15:18 -0700)]
[flang] Multiplication, more tests.
Original-commit: flang-compiler/f18@
e7ef16d2166cc946d59dd072754f8a347290e00a
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Fri, 8 Jun 2018 17:58:58 +0000 (10:58 -0700)]
[flang] Refactor rounding code.
Original-commit: flang-compiler/f18@
8ef2418791e62d8a90802a2e6754975a52412479
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Fri, 8 Jun 2018 17:24:15 +0000 (10:24 -0700)]
[flang] Get real add/subtract working and tested.
Original-commit: flang-compiler/f18@
c1b4389638d83cf9be712afc43cddc5d57e4dd48
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Wed, 6 Jun 2018 18:48:00 +0000 (11:48 -0700)]
[flang] start negative number tests
Original-commit: flang-compiler/f18@
1b52ec8d3bc01640a46b2561918c5bb608d64d80
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Wed, 6 Jun 2018 18:26:00 +0000 (11:26 -0700)]
[flang] Get back to passing all tests.
Original-commit: flang-compiler/f18@
d08dc86ede2a6a3c2b14b03f1cc8be9e924c0aff
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Wed, 6 Jun 2018 18:11:35 +0000 (11:11 -0700)]
[flang] Use EnumSet<> for real flags
Original-commit: flang-compiler/f18@
a61f193036e6ea33e5e28bc23ceeb2c13ee14ff2
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Tue, 5 Jun 2018 23:55:31 +0000 (16:55 -0700)]
[flang] some real debugging
Original-commit: flang-compiler/f18@
9653814ed3623f2abf592242b6d914bddc8766c7
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Tue, 5 Jun 2018 23:29:26 +0000 (16:29 -0700)]
[flang] begin testing reals
Original-commit: flang-compiler/f18@
9d261b594bbf2a6dcec833239635599b28007e4d
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Tue, 5 Jun 2018 20:55:56 +0000 (13:55 -0700)]
[flang] Convert REAL code to use IEEE encodings.
Original-commit: flang-compiler/f18@
b36e50f46566cbb6975fc8c9325a003ef6abfcd9
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Mon, 4 Jun 2018 23:22:58 +0000 (16:22 -0700)]
[flang] real work
Original-commit: flang-compiler/f18@
030347a906eda6384fd4d69dfe7d8e638aee9a2d
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Mon, 4 Jun 2018 22:56:40 +0000 (15:56 -0700)]
[flang] More work on reals.
Original-commit: flang-compiler/f18@
3ba634a2140f413f1e7ecb1ac570aa6fc73f0cd7
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Mon, 4 Jun 2018 16:49:47 +0000 (09:49 -0700)]
[flang] more work on reals
Original-commit: flang-compiler/f18@
3afe85bf153e39e20fd2562c605167caf48e7cff
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Fri, 1 Jun 2018 22:30:31 +0000 (15:30 -0700)]
[flang] begin real.h
Original-commit: flang-compiler/f18@
b0f0cd896161d769efc3f499cd3ae1359c82953a
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Fri, 1 Jun 2018 19:55:32 +0000 (12:55 -0700)]
[flang] bugfixing from clang build
Original-commit: flang-compiler/f18@
a05e108288065ebea3976922fb511e8c1851bd76
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Fri, 1 Jun 2018 19:37:23 +0000 (12:37 -0700)]
[flang] Reading numbers from strings.
Original-commit: flang-compiler/f18@
8cbadfe7778a400756bc34dcbb5fe39334a742f8
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Fri, 1 Jun 2018 18:48:31 +0000 (11:48 -0700)]
[flang] Template specializations and more automatic configuration
Original-commit: flang-compiler/f18@
a230a539076bd57f64f1d2fd63852941453c4cda
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Fri, 1 Jun 2018 17:05:15 +0000 (10:05 -0700)]
[flang] Rename fixed-point to integer.
Original-commit: flang-compiler/f18@
3fe9c505a58df5fcd1e2966451cba82c295200bd
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Fri, 1 Jun 2018 00:00:04 +0000 (17:00 -0700)]
[flang] More tests; full build and test cycle.
Original-commit: flang-compiler/f18@
ac363643042cbb3c39234196f2a8c815af359199
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Thu, 31 May 2018 23:32:36 +0000 (16:32 -0700)]
[flang] More tests
Original-commit: flang-compiler/f18@
e4371fca37a16c5dd9eea5a846248ce19c9cdb6b
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Thu, 31 May 2018 23:15:18 +0000 (16:15 -0700)]
[flang] More intrinsics
Original-commit: flang-compiler/f18@
55f974be59e2a691439159c99bef0f3250eb8fb3
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Thu, 31 May 2018 21:28:49 +0000 (14:28 -0700)]
[flang] Add pop count and parity code and tests.
Original-commit: flang-compiler/f18@
a77f2831833551407f2a29e019b61f0da7bc66ec
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Thu, 31 May 2018 19:25:21 +0000 (12:25 -0700)]
[flang] Complete conversion to value semantics
Original-commit: flang-compiler/f18@
e98206ca97530e4d5532a6174582ed3897533a8e
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Thu, 31 May 2018 18:58:50 +0000 (11:58 -0700)]
[flang] Converted multiplication
Original-commit: flang-compiler/f18@
7d4c3182105d4736ffc4e678b647b1013f7f33be
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Thu, 31 May 2018 18:18:14 +0000 (11:18 -0700)]
[flang] Converted shift intrinsics.
Original-commit: flang-compiler/f18@
2e9be8ad66e6af9e7ccff2807645212311805974
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Thu, 31 May 2018 17:45:41 +0000 (10:45 -0700)]
[flang] Continue conversion to value semantics
Original-commit: flang-compiler/f18@
03fe2666110ce464da49190e83c703031edee932
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Thu, 31 May 2018 16:44:27 +0000 (09:44 -0700)]
[flang] Begin conversion to value semantics.
Original-commit: flang-compiler/f18@
9ea9dae7e7ccb2d73297bb4a1e4e073e8dda30cb
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Wed, 30 May 2018 23:09:52 +0000 (16:09 -0700)]
[flang] Reformat
Original-commit: flang-compiler/f18@
104ca5f4c6c462ba74b500a00badc916605e4f66
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Wed, 30 May 2018 23:08:42 +0000 (16:08 -0700)]
[flang] Testing framework, debugging of fixed-point code.
Original-commit: flang-compiler/f18@
a8fb2d75a50fb958079fa81fc7a37a2a08e8e78c
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Tue, 29 May 2018 21:49:52 +0000 (14:49 -0700)]
[flang] unit testing for LZBC
Original-commit: flang-compiler/f18@
c8541fb8fbdd0ee35afe53ed1fb685573712b950
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Tue, 29 May 2018 19:42:21 +0000 (12:42 -0700)]
[flang] add fixed-point.h
Original-commit: flang-compiler/f18@
21c85a5c21aa15ad2a29ea9f2af2bf5357d2f3c6
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
peter klausler [Sat, 19 May 2018 00:11:04 +0000 (17:11 -0700)]
[flang] begin work
Original-commit: flang-compiler/f18@
82e434bf5966afa6e86a24a4de69d1ab537eb607
Reviewed-on: https://github.com/flang-compiler/f18/pull/101
Tree-same-pre-rewrite: false
Peter Klausler [Thu, 14 Jun 2018 20:50:06 +0000 (13:50 -0700)]
[flang] Merge pull request flang-compiler/f18#103 from ThePortlandGroup/pmk-issue98
Issue 98, better error recovery for specification-part
Original-commit: flang-compiler/f18@
0239a080e0a387aeb0a45e750c82c230d6a1b7c1
Reviewed-on: https://github.com/flang-compiler/f18/pull/103
peter klausler [Thu, 14 Jun 2018 17:13:40 +0000 (10:13 -0700)]
[flang] Issue 98, better error recovery for specification-part
Original-commit: flang-compiler/f18@
0b0812a82b15decf430de2c3ca991623cf53e5e2
Reviewed-on: https://github.com/flang-compiler/f18/pull/103
Peter Klausler [Thu, 14 Jun 2018 17:17:04 +0000 (10:17 -0700)]
[flang] Merge pull request flang-compiler/f18#102 from ThePortlandGroup/pmk-omp-fix
Allow tab in fixed form compiler directives. Reformat C++.
Original-commit: flang-compiler/f18@
1b7519b5a8209a1cb0504fbfcd3d3b124aa2be3a
Reviewed-on: https://github.com/flang-compiler/f18/pull/102
peter klausler [Thu, 14 Jun 2018 16:35:38 +0000 (09:35 -0700)]
[flang] Allow tab in fixed form compiler directives. Reformat C++.
Original-commit: flang-compiler/f18@
59ba17cb2478bd0b0f4ed6084c424677c7b46371
Reviewed-on: https://github.com/flang-compiler/f18/pull/102
Tim Keith [Wed, 13 Jun 2018 16:58:34 +0000 (09:58 -0700)]
[flang] Merge pull request flang-compiler/f18#100 from ThePortlandGroup/tsk5
Remove extraneous Pre/Post for ProcedureDeclarationStmt
Original-commit: flang-compiler/f18@
c7cf8c09b91da4bbea14092a3107fc5904312e1c
Reviewed-on: https://github.com/flang-compiler/f18/pull/100