Commit graph

1049 commits

Author SHA1 Message Date
peter klausler
8cb33d85a7 [flang] dodge gcc warning on test
Original-commit: flang-compiler/f18@10e9a82088
Reviewed-on: https://github.com/flang-compiler/f18/pull/231
2018-11-28 16:44:38 -08:00
peter klausler
2067929b5a [flang] tested
Original-commit: flang-compiler/f18@e77681a2ff
Reviewed-on: https://github.com/flang-compiler/f18/pull/231
Tree-same-pre-rewrite: false
2018-11-28 16:20:16 -08:00
peter klausler
7f603f6e15 [flang] debugged full precision FP formatting
Original-commit: flang-compiler/f18@ac9a684b91
Reviewed-on: https://github.com/flang-compiler/f18/pull/231
Tree-same-pre-rewrite: false
2018-11-28 10:33:09 -08:00
peter klausler
2fe5b128bd [flang] debugging
Original-commit: flang-compiler/f18@9f30eac130
Reviewed-on: https://github.com/flang-compiler/f18/pull/231
Tree-same-pre-rewrite: false
2018-11-28 10:33:09 -08:00
peter klausler
1df60f3ceb [flang] initial exact decimal conversion code
Original-commit: flang-compiler/f18@a34afdc73b
Reviewed-on: https://github.com/flang-compiler/f18/pull/231
Tree-same-pre-rewrite: false
2018-11-28 10:33:08 -08:00
Peter Klausler
846f8c6cda [flang] Merge pull request flang-compiler/f18#229 from flang-compiler/pmk1
document C++17 feature usage

Original-commit: flang-compiler/f18@d1d18fad36
Reviewed-on: https://github.com/flang-compiler/f18/pull/229
2018-11-28 10:31:41 -08:00
peter klausler
6dd3b8b724 [flang] proofreading
Original-commit: flang-compiler/f18@2af5c40bc1
Reviewed-on: https://github.com/flang-compiler/f18/pull/229
2018-11-26 12:46:11 -08:00
peter klausler
d1cc618f2c [flang] document C++17 feature usage
Original-commit: flang-compiler/f18@40d84ca20f
Reviewed-on: https://github.com/flang-compiler/f18/pull/229
Tree-same-pre-rewrite: false
2018-11-26 12:42:11 -08:00
Peter Klausler
abe5168bdd [flang] Merge pull request flang-compiler/f18#228 from flang-compiler/pmk0
Extend `AnalyzeExpr` to handle wrapped expression parse trees

Original-commit: flang-compiler/f18@7ddf0c159f
Reviewed-on: https://github.com/flang-compiler/f18/pull/228
2018-11-19 14:49:57 -08:00
peter klausler
3fc0f54b24 [flang] Analyze wrapped expressions
Original-commit: flang-compiler/f18@b34db5d38f
Reviewed-on: https://github.com/flang-compiler/f18/pull/228
2018-11-19 11:14:41 -08:00
peter klausler
791ef8c407 [flang] fix comments
Original-commit: flang-compiler/f18@a01eaaacc2
Reviewed-on: https://github.com/flang-compiler/f18/pull/228
Tree-same-pre-rewrite: false
2018-11-19 10:29:35 -08:00
Peter Klausler
609d3824ff [flang] Merge pull request flang-compiler/f18#226 from flang-compiler/pmk2
fix issue#224

Original-commit: flang-compiler/f18@cd6e4f0ada
Reviewed-on: https://github.com/flang-compiler/f18/pull/226
2018-11-14 16:12:23 -08:00
peter klausler
ac9e17f4cf [flang] fix issue#224
Original-commit: flang-compiler/f18@c40e197c61
Reviewed-on: https://github.com/flang-compiler/f18/pull/226
2018-11-14 15:44:17 -08:00
Peter Klausler
a2983e9069 [flang] Merge pull request flang-compiler/f18#225 from flang-compiler/pmk1
Roll up a bunch of changes

Original-commit: flang-compiler/f18@9ad19cd892
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
2018-11-14 15:23:40 -08:00
peter klausler
aa34fc6042 [flang] review comments
Original-commit: flang-compiler/f18@32c02cb668
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
2018-11-14 14:35:10 -08:00
peter klausler
12b0f643ab [flang] bugfixing and review comments
Original-commit: flang-compiler/f18@6df4a52d6b
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false
2018-11-14 11:57:47 -08:00
peter klausler
972d2d52c5 [flang] bugfixing from regression testing
Original-commit: flang-compiler/f18@f1bcaa0292
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false
2018-11-14 11:12:09 -08:00
peter klausler
c41e8706d5 [flang] remove unused variable
Original-commit: flang-compiler/f18@64773cef2c
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false
2018-11-13 16:26:26 -08:00
peter klausler
a10b7bc006 [flang] revamp Real::Read(), use it for mutual testing of ScaledDecimals
Original-commit: flang-compiler/f18@a2054bb9df
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false
2018-11-13 16:02:52 -08:00
peter klausler
bf7c03dbfb [flang] binary->decimal conversion for module files
Original-commit: flang-compiler/f18@6364799e7a
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false
2018-11-13 11:29:54 -08:00
peter klausler
c4601e2bc2 [flang] save work in progress
Original-commit: flang-compiler/f18@98bac3d297
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false
2018-11-08 09:38:04 -08:00
peter klausler
4f6275a1f7 [flang] Rename Dump() as AsFortran(), tweak output for use in .mod files
Original-commit: flang-compiler/f18@4e9dd16d6a
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false
2018-11-08 09:38:03 -08:00
peter klausler
ef59a45f50 [flang] fix warning
Original-commit: flang-compiler/f18@92003070de
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false
2018-11-08 09:38:03 -08:00
peter klausler
10aa1eafa0 [flang] multi-byte character TODOs
Original-commit: flang-compiler/f18@3bd2d227dc
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false
2018-11-08 09:38:02 -08:00
peter klausler
4e56600a8a [flang] more substring clean-up
Original-commit: flang-compiler/f18@e1c19ccd16
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false
2018-11-08 09:38:02 -08:00
peter klausler
2b2ea8d1a5 [flang] documentation
Original-commit: flang-compiler/f18@92f0c397f6
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false
2018-11-08 09:38:01 -08:00
peter klausler
9ddf39811c [flang] documentation
Original-commit: flang-compiler/f18@9aba35a258
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false
2018-11-08 09:38:01 -08:00
peter klausler
3eb69047df [flang] BaseObjects and static data placeholder
Original-commit: flang-compiler/f18@3ddfd5cadf
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false
2018-11-08 09:37:58 -08:00
peter klausler
916ed9eab2 [flang] update pointer documentation
Original-commit: flang-compiler/f18@0f04468c00
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false
2018-11-08 09:37:18 -08:00
peter klausler
fdd006ea28 [flang] small tweaks
Original-commit: flang-compiler/f18@5bbd6c3c19
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false
2018-11-08 09:37:17 -08:00
peter klausler
cfb57cd2d3 [flang] take literal substrings out of variable.h
Original-commit: flang-compiler/f18@a762b70beb
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false
2018-11-08 09:37:15 -08:00
peter klausler
e364b3db8e [flang] allow array constructors in all expressions
Original-commit: flang-compiler/f18@6dd5431cd9
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false
2018-11-08 09:35:48 -08:00
peter klausler
a98e682d7b [flang] represent array constructors
Original-commit: flang-compiler/f18@74ccff6b39
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false
2018-11-08 09:35:47 -08:00
peter klausler
72fd06b389 [flang] Clean up Designator and GetSymbol()
Original-commit: flang-compiler/f18@61c0af323c
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false
2018-11-08 09:35:46 -08:00
peter klausler
59c1233036 [flang] Make all Expr<> instances derived from ExpressionBase
Original-commit: flang-compiler/f18@f7d1a21532
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false
2018-11-08 09:33:57 -08:00
peter klausler
03618fd5e3 [flang] Address TODO: define IsAssumedRank predicate, use it
Original-commit: flang-compiler/f18@f75c3e0ccf
Reviewed-on: https://github.com/flang-compiler/f18/pull/225
Tree-same-pre-rewrite: false
2018-11-08 09:33:57 -08:00
jeanPerier
2457b7c8ed [flang] Merge pull request flang-compiler/f18#222 from flang-compiler/jpr0
C interoperability: Fixes CFI_CDESC_T macro and CFI_establish function

Original-commit: flang-compiler/f18@e104912ef1
Reviewed-on: https://github.com/flang-compiler/f18/pull/222
2018-11-08 11:37:53 +01:00
Jean Perier
da9e84906a [flang] Simplified C++ CFI_CDESC_T implem. Added local namespace around
Original-commit: flang-compiler/f18@456f5a0994
Reviewed-on: https://github.com/flang-compiler/f18/pull/222
2018-11-07 02:27:04 -08:00
Jean Perier
2ab0f0d86a [flang] Changed CFI_CDESC_T macro in C++. Cleaned related tests.
Original-commit: flang-compiler/f18@752f8eefa0
Reviewed-on: https://github.com/flang-compiler/f18/pull/222
Tree-same-pre-rewrite: false
2018-11-06 09:07:27 -08:00
Jean Perier
c3682c3ab7 [flang] Fixed CFI_establish. Improved and renamed related test suit
Original-commit: flang-compiler/f18@b75d858e4f
Reviewed-on: https://github.com/flang-compiler/f18/pull/222
Tree-same-pre-rewrite: false
2018-11-05 07:07:18 -08:00
Jean Perier
63c88cdbc0 [flang] Fixed CFI_DESC_T macro. Started unit test for C interop
Original-commit: flang-compiler/f18@f29b80c758
Reviewed-on: https://github.com/flang-compiler/f18/pull/222
Tree-same-pre-rewrite: false
2018-11-02 09:42:35 -07:00
Tim Keith
5e4aaaeb43 [flang] Merge pull request flang-compiler/f18#223 from flang-compiler/tsk5
Resolve expressions in symbols

Original-commit: flang-compiler/f18@6f253b5514
Reviewed-on: https://github.com/flang-compiler/f18/pull/223
2018-11-07 12:43:56 -08:00
Tim Keith
66d2705025 [flang] Address review comments
Change `const Symbol *` to `const Symbol &`.
Simplify expression for `Assumed()` and `Deferred()` in `ParamValue`.

Original-commit: flang-compiler/f18@b3e76706ca
Reviewed-on: https://github.com/flang-compiler/f18/pull/223
2018-11-07 12:41:52 -08:00
Tim Keith
9095548553 [flang] Resolve expressions in symbols
Add `LazyExpr` class to represent expressions in the symbol table.
Initially they contain a pointer to an expression in the parse tree.
After name resolution is complete and symbols are filled in in the parse
tree, `LazyExpr`s are resolved to `evaluate::Expr<evaluate::SomeType>`.
This is done by `ResolveSymbolExprs()`.

Change `Bound` and `ParamValue` to save their value as a `LazyExpr`.
Change `ObjectEntityDetails` and `TypeParamDetails` to save the initial
value as a `LazyExpr`.

Eliminate `IntExpr` and `IntConst` classes, which were just place-holders.

Add `Clone()` to `ShapeSpec`, `Bound`, `LazyExpr`. Normally they should
be moved but in `ObjectEntityDetails::set_shape()` we need to make copies.

Save type parameter values in `derivedTypeSpec_`. `typeParamValue_` is
not needed.

Write out initial values, type parameter values, and bounds to .mod files.

Evaluate parameter values in expressions.

Make some errors non-fatal so that tests can continue to pass.

Original-commit: flang-compiler/f18@b90cadfc53
Reviewed-on: https://github.com/flang-compiler/f18/pull/223
Tree-same-pre-rewrite: false
2018-11-06 17:18:06 -08:00
Tim Keith
1466eb250d [flang] Remove include of symbol.h from variable.h
This include will lead to circularities when semantics/type.h needs
include evaluate/expression.h. There will probably be a different
long-term solution.

Original-commit: flang-compiler/f18@c7fa815036
Reviewed-on: https://github.com/flang-compiler/f18/pull/223
Tree-same-pre-rewrite: false
2018-11-06 17:12:02 -08:00
Tim Keith
c59de6ca1d [flang] Use forward declarations to reduce includes
Original-commit: flang-compiler/f18@384af49342
Reviewed-on: https://github.com/flang-compiler/f18/pull/223
Tree-same-pre-rewrite: false
2018-11-05 15:03:46 -08:00
Tim Keith
b917390549 [flang] Move Details rather than copying
We don't need to copy the various Details classes. We will be adding
expressions to some of them (e.g. for bounds or initial values) and they
should generally be moved as well.

In check-do-concurrent.cc, put pointers to Symbols in the symbol
collections rather than copies.

Original-commit: flang-compiler/f18@cdedfc9b3e
Reviewed-on: https://github.com/flang-compiler/f18/pull/223
Tree-same-pre-rewrite: false
2018-11-05 14:36:11 -08:00
Peter Klausler
7a9a18227e [flang] Merge pull request flang-compiler/f18#221 from flang-compiler/pmk0
Document various pointer-like abstractions

Original-commit: flang-compiler/f18@11b472741d
Reviewed-on: https://github.com/flang-compiler/f18/pull/221
2018-11-01 15:06:22 -07:00
peter klausler
ddb3d99ec0 [flang] address review comment
Original-commit: flang-compiler/f18@b5da6b4492
Reviewed-on: https://github.com/flang-compiler/f18/pull/221
2018-11-01 15:06:01 -07:00
peter klausler
bd204fcc32 [flang] document pointer variations
Original-commit: flang-compiler/f18@4c718f5664
Reviewed-on: https://github.com/flang-compiler/f18/pull/221
Tree-same-pre-rewrite: false
2018-11-01 13:43:24 -07:00