Commit graph

473 commits

Author SHA1 Message Date
peter klausler
70b05522b0 [flang] Also fix bug#377
Original-commit: flang-compiler/f18@56631cf5e1
Reviewed-on: https://github.com/flang-compiler/f18/pull/378
Tree-same-pre-rewrite: false
2019-04-02 11:02:30 -07:00
peter klausler
e2e2ec387a [flang] Adjust member function names in integer.h to avoid confusion.
Original-commit: flang-compiler/f18@56dba8fa08
Reviewed-on: https://github.com/flang-compiler/f18/pull/370
2019-04-01 16:52:03 -07:00
peter klausler
547a0601f1 [flang] Logical operation precedence
Original-commit: flang-compiler/f18@060bc39fb4
Reviewed-on: https://github.com/flang-compiler/f18/pull/371
Tree-same-pre-rewrite: false
2019-04-01 13:01:42 -07:00
peter klausler
9e9b9f0776 [flang] Pass tests
Original-commit: flang-compiler/f18@ffb057f262
Reviewed-on: https://github.com/flang-compiler/f18/pull/371
Tree-same-pre-rewrite: false
2019-04-01 12:30:08 -07:00
peter klausler
b35f4a98e2 [flang] work in progress
Original-commit: flang-compiler/f18@33ea8e506a
Reviewed-on: https://github.com/flang-compiler/f18/pull/371
Tree-same-pre-rewrite: false
2019-04-01 10:59:00 -07:00
peter klausler
95b4e65ecf [flang] Move some AsFortran() implementations into new formatting.cc; use precedence for parentheses
Original-commit: flang-compiler/f18@2b5fa051df
Reviewed-on: https://github.com/flang-compiler/f18/pull/371
Tree-same-pre-rewrite: false
2019-04-01 10:58:55 -07:00
peter klausler
e0f76d2306 [flang] Support CONVERT= and DISPOSE= on INQUIRE
Original-commit: flang-compiler/f18@fbedd32376
Reviewed-on: https://github.com/flang-compiler/f18/pull/352
Tree-same-pre-rewrite: false
2019-04-01 10:14:19 -07:00
peter klausler
822810f017 [flang] Check int literals for overflow when kind is known.
improve test

Original-commit: flang-compiler/f18@09ce783cd3
Reviewed-on: https://github.com/flang-compiler/f18/pull/352
Tree-same-pre-rewrite: false
2019-04-01 10:14:16 -07:00
Jean Perier
3774e9d173 [flang] Update documentation with status of intrinsic procedure support in f18
Original-commit: flang-compiler/f18@aa12037a5b
Tree-same-pre-rewrite: false
2019-03-29 08:48:39 -07:00
Jean Perier
382aafad68 [flang] Remove useless dummy return statements
I first added these because I had issues with return type deduction
in lambdas, but they are actually useless when the return type is
specified in the lambda signature.

Original-commit: flang-compiler/f18@5bcbbd8bdc
Tree-same-pre-rewrite: false
2019-03-29 04:30:35 -07:00
Jean Perier
9f98662b5f [flang] Fix F18 scalar integer power algorithm
Original-commit: flang-compiler/f18@f0609e7ace
2019-03-28 08:18:42 -07:00
Jean Perier
eb52525b91 [flang] Add todo for bessel function default support
Original-commit: flang-compiler/f18@3842e7f5ac
2019-03-29 01:41:26 -07:00
Jean Perier
47251f2db0 [flang] Fix compilation failure on PowerPC
Original-commit: flang-compiler/f18@f79f4973b6
Tree-same-pre-rewrite: false
2019-03-28 06:53:52 -07:00
Jean Perier
07f6963dbb [flang] Remove non standard use of bessel C functions
Original-commit: flang-compiler/f18@a40559372a
Tree-same-pre-rewrite: false
2019-03-28 04:25:13 -07:00
Jean Perier
1d4323ddd5 [flang] Silence GCC 8.1 spurious warning
Original-commit: flang-compiler/f18@69e05d0632
Tree-same-pre-rewrite: false
2019-03-28 02:34:32 -07:00
Steve Scalpone
1de9ecd251 [flang] Add CMake rules to install static and shared libraries in
the default install directory or in the directory specified
with CMAKE_INSTALL_PREFIX.  Fixes flang-compiler/f18#359.

Original-commit: flang-compiler/f18@35ce1628e2
Reviewed-on: https://github.com/flang-compiler/f18/pull/364
2019-03-28 09:55:56 -07:00
Jean Perier
236eeef974 [flang] Only have cmake look for libpgmath if LIBPGMATH_DIR is given
Original-commit: flang-compiler/f18@1d778f5c1a
2019-03-27 10:16:07 -07:00
Jean Perier
be5cfaa5c7 [flang] fix clang errors and warnings
Original-commit: flang-compiler/f18@410f96384f
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier
cabcd851e6 [flang] Prepare to be merged with master branch
ActualArgument was modified in the master branch from
a struct to class. In order to compile once merged, this PR
required the related access paterns to be adapted to match
the new ActualArgument.
As a consequence, this PR does not compile anymore on its own,
it needs to be merged with the master branch to work.

Original-commit: flang-compiler/f18@48cdd2ed0e
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier
167730fd91 [flang] Enable folding of some more intrinsic functions
Enable folding of the following 80 intrinsic functions:

+ Without runtime:

++ Integer:
abs, dim, dshiftl, dshiftr, exponent, iand, ibclr, ibset, ieor, int,
ior, ishft, kind, len, leadz, maskl, maskr, merge_bits, popcnt, poppar,
shifta, shiftl, shiftr, trailz

++ Real:
abs, aimag, aint, dprod, real

+ Complex:
cmplx, conjg

++ Logical:
bge, bgt, ble, blt

+ With Runtime :

+ Real:
acos, acosh, asinh, atan, atan2, atanh, bessel_j0, bessel_j1,
bessel_jn (elemental), bessel_y0, bessel_y1, bessel_yn (elemental),
cos, cosh, erf, erfc, erfc_scaled, exp, gamma, hypot, log, log10,
log_gamma, mod, sin, sqrt, sinh, sqrt, tan, tanh

++ Complex:
acos, acosh, asin, asinh, atan, atanh, cos, cosh, exp, log, sin,
sinh, sqrt, tan, tanh

Original-commit: flang-compiler/f18@7e7d1920f8
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier
dc3cca3427 [flang] make HostIntrinsicProceduresLibrary a class
Original-commit: flang-compiler/f18@b9f5015d4d
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier
aeb7cef41a [flang] add the possibility to use libpgmath for constant folding
Original-commit: flang-compiler/f18@948a665627
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier
9147534f13 [flang] Map more intrinsic functions to <cmath> functions
Original-commit: flang-compiler/f18@f0f2062211
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier
e3b74caa0d [flang] Move host floating point environment handling in host.h/host.cc
Original-commit: flang-compiler/f18@0cba8b1308
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier
ca0261b253 [flang] Removed dynamic loading feature for intrinsic folding
After more reflexion, dynamic loading brings to much uncertainty
regarding which library is actually being use for folding.
It is removed to avoid pushing people to use it.
A static linking to libpgmath will be provided in a later commit.

Original-commit: flang-compiler/f18@2161627d28
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier
9ce02da63a [flang] fix clang++ linking issue with libm
Original-commit: flang-compiler/f18@805c861bd0
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier
8d032dc96b [flang] renaming to focus scope on intrinsic runtime
Original-commit: flang-compiler/f18@7cfd33b178
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier
fa3a179fec [flang] made fenv errors internal errors
Original-commit: flang-compiler/f18@f776c8db91
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier
a955f3e51c [flang] fix signed/unsigned comparison
Original-commit: flang-compiler/f18@46148712e1
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier
4fdf4fa18d [flang] Limits C++ implementation behaviors
The issue addressed here is the use of cast between object pointers
and function pointers. It is implementation defined because C++,
just like C, does not mandate that function and object pointers
must have the same size.
It is needed to have such cast because it is a will to ba able to
call inside F18 numerical function from libraries linked during
a Fortran program compilation in order to perform folding.
dlopen returns function pointers as void* that need to be cast to
pointer before use.
This change limits the usage of such cast inside ifdefs where POSIX
is required. In POSIX context, such cast is defined. Dlopen is
anyway used only if the environment is POSIX compliant.
In the rest of the code, opaque function pointers have been changed
from void* to void*(*)(). reinterpret_cast from function pointer to
function pointer are standard compliant.

Original-commit: flang-compiler/f18@4b2f29a128
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier
dd2c2d5798 [flang] fixed use before init in elemental folding helper
Original-commit: flang-compiler/f18@2cea43ddf9
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier
faddfde12f [flang] add support to fold elemental intrisics over arrays
Original-commit: flang-compiler/f18@c2fec22856
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier
54d7cdbbe0 [flang] answer comments on host/f18 type mappings
Original-commit: flang-compiler/f18@96bce5c4d9
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier
deff1c6a23 [flang] Adds the possibility to use part of libpgmath for folding if it is available
Original-commit: flang-compiler/f18@1c2093ff32
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier
6fbbcfcb49 [flang] answer some comments
Original-commit: flang-compiler/f18@8161f77f60
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier
9b1d928990 [flang] Use new indirection layer to host runtime in folding
Original-commit: flang-compiler/f18@e8bb9c52af
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier
94aa34c3b2 [flang] Add RTE description structure and indirection layer to host runtime for folding
Original-commit: flang-compiler/f18@329a614052
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier
63cdc3b0d3 [flang] Cherry picking commits from #PR275 and simplifying it
Commit was: Draft of elemental intrinsics function folding

Simplification was made in order to solve conflicts and
to prepare for commit of host math library indirection.

Conflicts:
	lib/evaluate/fold.cc

Original-commit: flang-compiler/f18@45678bc44c
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier
4e0804ec77 [flang] Add a utility to safely interact with host types
Original-commit: flang-compiler/f18@32cd789dc2
Tree-same-pre-rewrite: false
2019-03-27 10:16:07 -07:00
Jean Perier
55c01aa295 [flang] Fix .NOT. folding bug
Original-commit: flang-compiler/f18@dd4d9091f1
Tree-same-pre-rewrite: false
2019-03-21 08:33:14 -07:00
peter klausler
dfc1643f3f [flang] get clean compile
Original-commit: flang-compiler/f18@3a606d804d
Reviewed-on: https://github.com/flang-compiler/f18/pull/346
Tree-same-pre-rewrite: false
2019-03-20 13:44:00 -07:00
peter klausler
c090abef3b [flang] checkpoint
Original-commit: flang-compiler/f18@1e213f3fbe
Reviewed-on: https://github.com/flang-compiler/f18/pull/346
Tree-same-pre-rewrite: false
2019-03-20 13:11:49 -07:00
peter klausler
ad057a42fa [flang] Remove OwningPointer, use unique_ptr better instead.
Original-commit: flang-compiler/f18@89aff868aa
Reviewed-on: https://github.com/flang-compiler/f18/pull/346
Tree-same-pre-rewrite: false
2019-03-20 11:38:45 -07:00
peter klausler
18e436afc4 [flang] add descender.h
Original-commit: flang-compiler/f18@cfc3082b7a
Reviewed-on: https://github.com/flang-compiler/f18/pull/316
2019-03-06 16:15:55 -08:00
peter klausler
0de89a5c7d [flang] add rewriting as well as const visitation
Original-commit: flang-compiler/f18@1224eaee85
Reviewed-on: https://github.com/flang-compiler/f18/pull/316
Tree-same-pre-rewrite: false
2019-03-06 16:15:54 -08:00
peter klausler
1a38f0091b [flang] More rearrangement
Original-commit: flang-compiler/f18@7a675d9df6
Reviewed-on: https://github.com/flang-compiler/f18/pull/316
Tree-same-pre-rewrite: false
2019-03-06 16:15:53 -08:00
peter klausler
b7b187e976 [flang] Hide implementation better
Original-commit: flang-compiler/f18@2118b46314
Reviewed-on: https://github.com/flang-compiler/f18/pull/316
Tree-same-pre-rewrite: false
2019-03-06 16:15:53 -08:00
peter klausler
53ae00a9c4 [flang] Address review comments
Original-commit: flang-compiler/f18@3ed6199fed
Reviewed-on: https://github.com/flang-compiler/f18/pull/316
Tree-same-pre-rewrite: false
2019-03-06 16:15:52 -08:00
peter klausler
d9a3442c30 [flang] Improve detection of default Handle() callback
Original-commit: flang-compiler/f18@c09c4c9e00
Reviewed-on: https://github.com/flang-compiler/f18/pull/316
Tree-same-pre-rewrite: false
2019-03-06 16:15:51 -08:00
peter klausler
803d9eabba [flang] some tweaks
Original-commit: flang-compiler/f18@07d196386e
Reviewed-on: https://github.com/flang-compiler/f18/pull/316
Tree-same-pre-rewrite: false
2019-03-06 16:15:50 -08:00
peter klausler
dbed3cebdc [flang] Add Expression traversal framework, use it to reimplement IsConstantExpr()
Original-commit: flang-compiler/f18@f5d3915935
Reviewed-on: https://github.com/flang-compiler/f18/pull/316
Tree-same-pre-rewrite: false
2019-03-06 16:15:49 -08:00
peter klausler
6a0f9474ff [flang] Use value()/has_value() on Indirection class templates instead of operator*/operator->
Original-commit: flang-compiler/f18@a97f377ae6
Reviewed-on: https://github.com/flang-compiler/f18/pull/311
Tree-same-pre-rewrite: false
2019-03-05 12:28:08 -08:00
peter klausler
97038db10e [flang] Dodge bogus G++ 8.1.0 build warning
Original-commit: flang-compiler/f18@582c6d1eca
Reviewed-on: https://github.com/flang-compiler/f18/pull/311
Tree-same-pre-rewrite: false
2019-03-04 17:02:48 -08:00
peter klausler
8a57433273 [flang] C1594 constraint checking on pointer components in struct constructors
Original-commit: flang-compiler/f18@386cd8a9b4
Reviewed-on: https://github.com/flang-compiler/f18/pull/311
Tree-same-pre-rewrite: false
2019-03-04 16:30:24 -08:00
peter klausler
ec8e8b8277 [flang] Length conversions in array constructors, and fix their formatting
Original-commit: flang-compiler/f18@88cdb49f48
Reviewed-on: https://github.com/flang-compiler/f18/pull/311
Tree-same-pre-rewrite: false
2019-03-04 16:30:24 -08:00
peter klausler
69352908e0 [flang] Character length conversion on structure constructor component assignments
Original-commit: flang-compiler/f18@051c1dd923
Reviewed-on: https://github.com/flang-compiler/f18/pull/311
Tree-same-pre-rewrite: false
2019-03-04 16:30:24 -08:00
peter klausler
3edc423bf8 [flang] Add SetLength operator to make character length changes explicit
Original-commit: flang-compiler/f18@f2d751d8a6
Reviewed-on: https://github.com/flang-compiler/f18/pull/311
Tree-same-pre-rewrite: false
2019-03-04 16:30:23 -08:00
peter klausler
431b84880a [flang] snapshot of work in progress
Original-commit: flang-compiler/f18@56e83d4dd6
Reviewed-on: https://github.com/flang-compiler/f18/pull/311
Tree-same-pre-rewrite: false
2019-03-04 16:30:23 -08:00
peter klausler
402cc8c4e9 [flang] Represent NULL()
Original-commit: flang-compiler/f18@2c3368fb5f
Reviewed-on: https://github.com/flang-compiler/f18/pull/311
Tree-same-pre-rewrite: false
2019-03-04 16:30:23 -08:00
peter klausler
857da8cfe9 [flang] Type checking on values in structure components
Original-commit: flang-compiler/f18@bea98aeb96
Reviewed-on: https://github.com/flang-compiler/f18/pull/311
Tree-same-pre-rewrite: false
2019-03-04 16:30:22 -08:00
peter klausler
c7cfc3f357 [flang] Add ForwardReference<> + documentation + clean-up
Original-commit: flang-compiler/f18@09e9501951
Reviewed-on: https://github.com/flang-compiler/f18/pull/314
2019-03-04 15:15:08 -08:00
peter klausler
b8db689ffe [flang] Fix accidentally modified comment
Original-commit: flang-compiler/f18@7d0b365a6d
Reviewed-on: https://github.com/flang-compiler/f18/pull/313
Tree-same-pre-rewrite: false
2019-03-04 13:44:04 -08:00
peter klausler
b67a04c0bb [flang] check out with all versions
Original-commit: flang-compiler/f18@0b1369ce55
Reviewed-on: https://github.com/flang-compiler/f18/pull/313
Tree-same-pre-rewrite: false
2019-03-04 11:55:10 -08:00
peter klausler
5c4faecc0d [flang] Fix flang-compiler/f18#312
Original-commit: flang-compiler/f18@625ffb4f1a
Reviewed-on: https://github.com/flang-compiler/f18/pull/313
Tree-same-pre-rewrite: false
2019-03-04 11:23:50 -08:00
peter klausler
ab74d1ac0c [flang] Rename to Fortran.h, update style guide, run clang-format
Original-commit: flang-compiler/f18@aa2907d226
Reviewed-on: https://github.com/flang-compiler/f18/pull/308
Tree-same-pre-rewrite: false
2019-02-28 11:48:15 -08:00
peter klausler
4eccba942e [flang] Clean up DynamicType, link it to symbol table character length
Original-commit: flang-compiler/f18@833f5f52e2
Reviewed-on: https://github.com/flang-compiler/f18/pull/304
Tree-same-pre-rewrite: false
2019-02-26 16:21:28 -08:00
peter klausler
f953583dea [flang] checkpoint
Original-commit: flang-compiler/f18@4d907e3184
Reviewed-on: https://github.com/flang-compiler/f18/pull/304
Tree-same-pre-rewrite: false
2019-02-26 16:21:26 -08:00
peter klausler
ba56b913a4 [flang] checkpoint
Original-commit: flang-compiler/f18@e7b0f456c9
Reviewed-on: https://github.com/flang-compiler/f18/pull/304
Tree-same-pre-rewrite: false
2019-02-26 16:19:36 -08:00
peter klausler
4417443be9 [flang] Fix CHECK() on wa22 by implementing PGI language extension
Original-commit: flang-compiler/f18@03fcb58977
Reviewed-on: https://github.com/flang-compiler/f18/pull/287
Tree-same-pre-rewrite: false
2019-02-15 12:29:10 -08:00
peter klausler
a412dce037 [flang] checkpoint
Original-commit: flang-compiler/f18@6146957713
Reviewed-on: https://github.com/flang-compiler/f18/pull/287
Tree-same-pre-rewrite: false
2019-02-15 12:22:13 -08:00
peter klausler
83a8530612 [flang] Rework Constant<character>
Original-commit: flang-compiler/f18@fc807bfd7d
Reviewed-on: https://github.com/flang-compiler/f18/pull/287
Tree-same-pre-rewrite: false
2019-02-15 12:22:12 -08:00
peter klausler
5b79ffc5f6 [flang] checkpoint
Original-commit: flang-compiler/f18@156791b288
Reviewed-on: https://github.com/flang-compiler/f18/pull/287
Tree-same-pre-rewrite: false
2019-02-15 12:22:10 -08:00
peter klausler
4313f4c762 [flang] checkpoint array/struct constructor work
Original-commit: flang-compiler/f18@b0a574fa35
Reviewed-on: https://github.com/flang-compiler/f18/pull/287
Tree-same-pre-rewrite: false
2019-02-15 12:22:09 -08:00
peter klausler
e8709a4d6a [flang] checkpoint Constant<SomeDerived> based on StructureConstructor
Original-commit: flang-compiler/f18@47986f0c7e
Reviewed-on: https://github.com/flang-compiler/f18/pull/287
Tree-same-pre-rewrite: false
2019-02-15 12:22:05 -08:00
peter klausler
fef7fcd45f [flang] More value semantics in Constant<> and GetScalarConstantValue
Original-commit: flang-compiler/f18@c7acce4685
Reviewed-on: https://github.com/flang-compiler/f18/pull/271
Tree-same-pre-rewrite: false
2019-02-01 13:37:49 -08:00
peter klausler
6d8aecf981 [flang] Convert structs to classes, move some defs from variable.h to call.h
Original-commit: flang-compiler/f18@c877a34694
Reviewed-on: https://github.com/flang-compiler/f18/pull/271
Tree-same-pre-rewrite: false
2019-01-31 16:04:17 -08:00
peter klausler
140b4adcfe [flang] Address review comments, fix some f90_correct failures
Original-commit: flang-compiler/f18@e468f8cd54
Reviewed-on: https://github.com/flang-compiler/f18/pull/271
Tree-same-pre-rewrite: false
2019-01-31 09:59:37 -08:00
peter klausler
1c95fef459 [flang] pass tests
Original-commit: flang-compiler/f18@db22dc2294
Reviewed-on: https://github.com/flang-compiler/f18/pull/271
Tree-same-pre-rewrite: false
2019-01-31 09:59:35 -08:00
peter klausler
2a88fef290 [flang] array constructor folding with test
Original-commit: flang-compiler/f18@37e7a8e666
Reviewed-on: https://github.com/flang-compiler/f18/pull/271
Tree-same-pre-rewrite: false
2019-01-31 09:59:34 -08:00
peter klausler
ab71bd343c [flang] folding array constructors
Original-commit: flang-compiler/f18@a4e045fc5a
Reviewed-on: https://github.com/flang-compiler/f18/pull/271
Tree-same-pre-rewrite: false
2019-01-31 09:59:33 -08:00
peter klausler
650b32ebfe [flang] support Constant arrays
Original-commit: flang-compiler/f18@a92d8a404f
Reviewed-on: https://github.com/flang-compiler/f18/pull/271
Tree-same-pre-rewrite: false
2019-01-31 09:59:32 -08:00
peter klausler
0ae3d43d76 [flang] Run expression semantic analysis with rest of semantics.
checkpoint array constructor semantics work

checkpoint

array constructors of lengthless intrinsic types

checkpoint

Correct ambiguous substring refs misparsed as array elements

Original-commit: flang-compiler/f18@2232549efe
Reviewed-on: https://github.com/flang-compiler/f18/pull/271
Tree-same-pre-rewrite: false
2019-01-31 09:59:28 -08:00
peter klausler
1e706b1136 [flang] Update fix based on comment
Original-commit: flang-compiler/f18@52dfd3b5dc
Reviewed-on: https://github.com/flang-compiler/f18/pull/272
2019-01-30 10:31:26 -08:00
peter klausler
242407d853 [flang] Fix bugs flang-compiler/f18#269 & flang-compiler/f18#270
Original-commit: flang-compiler/f18@639816f3ef
Reviewed-on: https://github.com/flang-compiler/f18/pull/272
Tree-same-pre-rewrite: false
2019-01-30 09:55:42 -08:00
peter klausler
74a77dd2ed [flang] Use IEEE-754 terminology better: subnormal, not denormal(ized)
Original-commit: flang-compiler/f18@57b0ebb558
Reviewed-on: https://github.com/flang-compiler/f18/pull/273
2019-01-29 16:47:41 -08:00
Jean Perier
a60121f9f3 [flang] Fix issue flang-compiler/f18#267 (GetScalarConstantValue)
Original-commit: flang-compiler/f18@9fcbd09a51
Tree-same-pre-rewrite: false
2019-01-24 09:46:35 -08:00
peter klausler
9d63306d76 [flang] Remove SHARED from add_library(), use cmake command line option instead
Original-commit: flang-compiler/f18@6644c799a7
Reviewed-on: https://github.com/flang-compiler/f18/pull/265
Tree-same-pre-rewrite: false
2019-01-22 16:31:20 -08:00
peter klausler
f47c0bdaba [flang] Add SHARED to add_library() invocations so f18 libraries are always built shared.
Original-commit: flang-compiler/f18@060ced04c7
Reviewed-on: https://github.com/flang-compiler/f18/pull/265
Tree-same-pre-rewrite: false
2019-01-22 16:31:20 -08:00
peter klausler
e7b93436c3 [flang] Rearrange code to eliminate dependence cycles between f18 library binaries
Original-commit: flang-compiler/f18@88651eecae
Reviewed-on: https://github.com/flang-compiler/f18/pull/265
Tree-same-pre-rewrite: false
2019-01-22 16:31:19 -08:00
peter klausler
f9d6c0a338 [flang] Move default intrinsic type kinds from lib/semantics to lib/common
Original-commit: flang-compiler/f18@887e72dd61
Reviewed-on: https://github.com/flang-compiler/f18/pull/265
Tree-same-pre-rewrite: false
2019-01-22 16:31:18 -08:00
peter klausler
cfe14d0f0b [flang] Make x86 fp behavior emulation conditional.
Original-commit: flang-compiler/f18@0c77a634b3
Reviewed-on: https://github.com/flang-compiler/f18/pull/266
2019-01-22 11:13:44 -08:00
peter klausler
7f3590771e [flang] merge with master, implement a TODO with LEN on ASSOCIATE
Original-commit: flang-compiler/f18@e4501c6fa4
Reviewed-on: https://github.com/flang-compiler/f18/pull/260
Tree-same-pre-rewrite: false
2019-01-17 13:52:10 -08:00
peter klausler
be3b765e2a [flang] basic skeleton of assignment analyzer
remove needless template<> on some function overloads

dodge bogus compiler warning from gcc 8.1.0 only

stricter typing of expressions in symbols

adjust modfile12.f90 expected test results

add Unwrap, massage folding a bit

Use Unwrap to simplify folding

Move KindSelector analysis into expression semantics

fix crash

checkpoint

updates to TypeParamInquiry

support of %KIND type parameter inquiry

equality testing for expressions

checkpoint during PDT implementation

reformat

checkpoint derived type instantiation

checkpoint

resolve merge

debugging failed tests

fix failing resolve37.f90 test

all existing tests pass

clean up all build warnings

fix bug

update copyright dates

fix copyright dates

address review comments

review comment

merge with master after peeling off changes

bugfixing new feature

fix warning from old g++s

tweaks after merging with latest head

more bugfixing

making modfile17.f90 test work

Make kinds into expressions in symbol table types

big refactor for deferring kinds in intrinsic types

modfile17.f90 test passes

clean up TODOs

Simplify types as stored in scopes

Test KIND parameter default init expressions, debug them

Update copyright dates

address comments

remove dead line

address comments

Original-commit: flang-compiler/f18@1f43d0a048
Reviewed-on: https://github.com/flang-compiler/f18/pull/260
Tree-same-pre-rewrite: false
2019-01-17 10:41:08 -08:00
peter klausler
51dc18258b [flang] remove debugging output
Original-commit: flang-compiler/f18@3a156953c2
Reviewed-on: https://github.com/flang-compiler/f18/pull/258
Tree-same-pre-rewrite: false
2019-01-09 15:13:23 -08:00
peter klausler
dc9faa270f [flang] cherrypick expression changes
Original-commit: flang-compiler/f18@427e267722
Reviewed-on: https://github.com/flang-compiler/f18/pull/258
Tree-same-pre-rewrite: false
2019-01-09 15:06:07 -08:00
Paul Henning
778e615158 [flang] Added preprocessor directives to limit the use of non-inline ExpressionBase<A>::derived to GCC on Mac (inlined on all other platforms)
Original-commit: flang-compiler/f18@b38b31909a
Reviewed-on: https://github.com/flang-compiler/f18/pull/248
2019-01-03 09:45:27 -07:00
Paul Henning
b61b31dfcd [flang] Addresses issue flang-compiler/f18#242 by making non-inline definitions for the two versions
of ExpressionBase::derived().  gcc-8.2 on macOS was choosing to create
non-inline instances of derived() during the explicit instantiations of
ExpressionBase in expression.cc and fold.cc.  During linking of any
executable, the linker failed when it found these duplicate definitions.

While this solution works, it removes the opportunity to inline the trivial
derived() functions.  Another solution would be to make all of the
templates related to ExpressionBase in expression.cc and fold.cc available
in a single .cc file, where the explicit instantiation
FOR_EACH_TYPE_AND_KIND(template class ExpressionBase) is done once. This
approach would allow inlining, but require something like template
implementation headers that could be included into the instantiation .cc
file.

Original-commit: flang-compiler/f18@074de39418
Reviewed-on: https://github.com/flang-compiler/f18/pull/248
Tree-same-pre-rewrite: false
2018-12-20 10:39:29 -07:00
peter klausler
e760aaa4e6 [flang] fix copyright dates
Original-commit: flang-compiler/f18@75818658d9
Reviewed-on: https://github.com/flang-compiler/f18/pull/253
Tree-same-pre-rewrite: false
2019-01-07 15:50:04 -08:00
peter klausler
e828e0c795 [flang] Update copyright dates.
Original-commit: flang-compiler/f18@8a7722621b
Reviewed-on: https://github.com/flang-compiler/f18/pull/253
Tree-same-pre-rewrite: false
2019-01-07 15:42:36 -08:00
peter klausler
13ed85789d [flang] Symbol changes for PDT instantiation
Original-commit: flang-compiler/f18@0c545a026d
Reviewed-on: https://github.com/flang-compiler/f18/pull/253
Tree-same-pre-rewrite: false
2019-01-07 15:05:53 -08:00
peter klausler
67f13efa44 [flang] update copyright dates
Original-commit: flang-compiler/f18@99f4c98ccb
Reviewed-on: https://github.com/flang-compiler/f18/pull/252
2019-01-07 10:55:09 -08:00
peter klausler
fe3acf5ffc [flang] Roll up folding & expression changes
Original-commit: flang-compiler/f18@60affece05
Reviewed-on: https://github.com/flang-compiler/f18/pull/252
Tree-same-pre-rewrite: false
2019-01-07 10:15:27 -08:00
peter klausler
2ad9986698 [flang] Support operator== for expressions.
Original-commit: flang-compiler/f18@42013513e9
Reviewed-on: https://github.com/flang-compiler/f18/pull/251
2019-01-04 14:05:53 -08:00
Tim Keith
9c35cb8948 [flang] Handle TypeStar and ClassStar in GetSymbolType()
Add DeclTypeSpec::AsDerived() to get the DerivedTypeSpec from a
DeclTypeSpec when it has one.

Original-commit: flang-compiler/f18@3bd921d8f3
Reviewed-on: https://github.com/flang-compiler/f18/pull/247
2018-12-17 17:22:42 -08:00
Tim Keith
b8b53ba2f4 [flang] Refactoring: improve some names
IntrinsicTypeSpec was used for all intrinsics except for character.
Change it to be a common base class for NumericTypeSpec,
LogicalTypeSpec, and CharacterTypeSpec.

Change DeclTypeSpec to categorize the intrinsics as Numeric, Logical,
and Character. Add some utility methods: AsIntrinsic() and IsNumeric().

In scope.h, give the functions that create DeclTypeSpecs better names.

In semantics.h, replace MakeIntrinsicTypeSpec() with MakeNumericType()
and MakeLogicalType() as it does not apply to character types.

Original-commit: flang-compiler/f18@8ad92d069c
Reviewed-on: https://github.com/flang-compiler/f18/pull/247
Tree-same-pre-rewrite: false
2018-12-17 12:41:43 -08:00
peter klausler
8b34535de7 [flang] fix bug noticed by Jean
Original-commit: flang-compiler/f18@9acbff7585
Reviewed-on: https://github.com/flang-compiler/f18/pull/244
2018-12-14 13:19:12 -08:00
peter klausler
8b580e4591 [flang] fix crash that Tim ran into
Original-commit: flang-compiler/f18@498a8c6fb8
Reviewed-on: https://github.com/flang-compiler/f18/pull/245
2018-12-14 11:23:14 -08:00
Tim Keith
a3b09ef72a [flang] Fix bug converting actual argument to Fortran
This fixes a problem with converting the ubound call in the example
below back to Fortran (in this case, for writing to the .mod file).
One of the ActualArguments encountered in ProcedureRef::AsFortran is
a `std::nullopt`, so we need to handle that case.

```
module m
  real :: x(10)
  real :: y(ubound(x, dim=1))
end module
```

Original-commit: flang-compiler/f18@c5ace6b824
Reviewed-on: https://github.com/flang-compiler/f18/pull/240
2018-12-07 07:41:49 -08:00
Tim Keith
8ae55f79bc [flang] Rework when symbol table expressions are evaluated
It's not good enough to evaluate expressions in the symbol table after
name resolution has completed. This is because we need the values of
constant expressions for types, for example, we need to evaluate `k` in
`integer(k) :: x` to know the type of `x`.

So, eliminate `LazyExpr` and call `EvaluateExpr()` on expressions that
we need in the symbol table. The latter evaluates and folds an
expression in the current context. This is now possible because symbols
are added to `parser::Name` as soon as possible rather than in a pass
after name resolution. Along with `LazyExpr` we can eliminate the whole
`ResolveSymbolExprs` pass that used to resolve them.

In resolve-names.cc, many `Pre` functions are changed to `Post` so that
names are resolved before doing the associated processing. For example,
with intrinsic type specs, names in the kind expression must be resolved
before attempting to evaluate that expression.

In `GetSymbolType()` in type.cc, handle both `ObjectEntityDetails` and
`EntityDetails` by using `Symbol::GetType()`.

Add explicit declarations in label01.F90 because we can't handle
implicitly typed array bounds yet.

Original-commit: flang-compiler/f18@d67716640b
Reviewed-on: https://github.com/flang-compiler/f18/pull/238
2018-12-06 07:16:52 -08:00
Tim Keith
d6b37b1967 [flang] Fix error is Negation on integer
The minus sign was missing.

Original-commit: flang-compiler/f18@5fa0a97de5
Reviewed-on: https://github.com/flang-compiler/f18/pull/238
Tree-same-pre-rewrite: false
2018-12-06 07:16:52 -08:00
peter klausler
1b1f60ff50 [flang] Use std::optional<>::value() where appropriate.
Original-commit: flang-compiler/f18@4278b79b3d
Reviewed-on: https://github.com/flang-compiler/f18/pull/237
Tree-same-pre-rewrite: false
2018-12-05 13:03:39 -08:00
peter klausler
34642dab32 [flang] fixes
Original-commit: flang-compiler/f18@d312b2298a
Reviewed-on: https://github.com/flang-compiler/f18/pull/234
2018-12-03 17:20:28 -08:00
peter klausler
972e4b59d5 [flang] address review comments
Original-commit: flang-compiler/f18@2f4b7ac97c
Reviewed-on: https://github.com/flang-compiler/f18/pull/234
Tree-same-pre-rewrite: false
2018-12-03 16:44:25 -08:00
peter klausler
659c32947c [flang] checkpoint during refactor
Original-commit: flang-compiler/f18@01fe82b95b
Reviewed-on: https://github.com/flang-compiler/f18/pull/234
Tree-same-pre-rewrite: false
2018-11-30 14:03:05 -08:00
peter klausler
a0a60e8d6a [flang] address TODO: replace Type flag member with IsSpecificIntrinsicType<T> predicate
Original-commit: flang-compiler/f18@68b89c008f
Reviewed-on: https://github.com/flang-compiler/f18/pull/233
2018-11-29 10:25:46 -08:00
Tim Keith
daa0b054ba [flang] Change formatting of common::visitors{}
Including a comma after the last lambda in a `common::visitors{}` list
causes clang-format to do a better job of formatting them.

Add that recommendation to C++style.md, insert the missing commas,
and reformat the changed files.

Original-commit: flang-compiler/f18@a2486ca3b6
Reviewed-on: https://github.com/flang-compiler/f18/pull/232
2018-11-29 09:27:34 -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
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
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
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
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
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
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
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
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
peter klausler
011e6abd9f [flang] readability improvement from Tim
Original-commit: flang-compiler/f18@14179ead7c
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
2018-10-29 09:26:33 -07:00
peter klausler
0a56867df9 [flang] Back out needless macro change that led to clang-format grief
Original-commit: flang-compiler/f18@5a6e55df11
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
Tree-same-pre-rewrite: false
2018-10-26 16:31:20 -07:00
peter klausler
8832f8b144 [flang] clean up comments, put out for review
Original-commit: flang-compiler/f18@26a3221fc4
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
Tree-same-pre-rewrite: false
2018-10-26 15:55:28 -07:00
peter klausler
87b74269d5 [flang] prepare for merge
Original-commit: flang-compiler/f18@5d2490b1c8
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
Tree-same-pre-rewrite: false
2018-10-26 15:21:04 -07:00
peter klausler
abac228b82 [flang] Complete refactor of Fold() - checkpoint
Original-commit: flang-compiler/f18@5061171268
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
Tree-same-pre-rewrite: false
2018-10-26 15:21:01 -07:00
peter klausler
a99e9c99f3 [flang] complete new Fold
Original-commit: flang-compiler/f18@4d1726778f
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
Tree-same-pre-rewrite: false
2018-10-26 15:19:12 -07:00
peter klausler
60c16541c2 [flang] dodge gcc 7.2.0 build hiccup
Original-commit: flang-compiler/f18@4a9e862d74
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
Tree-same-pre-rewrite: false
2018-10-26 15:19:10 -07:00
peter klausler
f50047f45c [flang] merge with master
Original-commit: flang-compiler/f18@53f15da06a
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
Tree-same-pre-rewrite: false
2018-10-26 15:19:10 -07:00
peter klausler
d6ea6af7c4 [flang] new refactored Fold
Original-commit: flang-compiler/f18@061868fd85
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
Tree-same-pre-rewrite: false
2018-10-26 15:19:09 -07:00
peter klausler
43a0a63441 [flang] start refactoring of Constant and Fold
Original-commit: flang-compiler/f18@53f7174c3d
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
Tree-same-pre-rewrite: false
2018-10-26 15:19:07 -07:00
peter klausler
d804c9d6bb [flang] Refactor some lib/evaluate headers for sanity
Original-commit: flang-compiler/f18@9530378c39
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
Tree-same-pre-rewrite: false
2018-10-26 15:17:52 -07:00
peter klausler
84ea49d062 [flang] rearrange arguments into dummy argument order
Original-commit: flang-compiler/f18@3bab0f55de
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
Tree-same-pre-rewrite: false
2018-10-26 15:16:46 -07:00
peter klausler
ef9dd9d1fe [flang] refactor a bit, and rearrange actual arguments into dummy order on intrinsic calls
Original-commit: flang-compiler/f18@1f50ace68b
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
Tree-same-pre-rewrite: false
2018-10-26 15:16:41 -07:00
peter klausler
fdd3a2adca [flang] Use Attrs for intrinsic results rather than flags.
Original-commit: flang-compiler/f18@14c9199718
Reviewed-on: https://github.com/flang-compiler/f18/pull/219
Tree-same-pre-rewrite: false
2018-10-26 15:15:54 -07:00
Jean Perier
f7e7cb349b [flang] Changed .clang-format so that it will not add a comment after the closing brace of each namespace. Removed all such previous comments from all .cc and .h files
Original-commit: flang-compiler/f18@aa7f55e15f
Reviewed-on: https://github.com/flang-compiler/f18/pull/217
2018-10-25 05:55:23 -07:00
peter klausler
7c402d9c50 [flang] Add -i8, -r8, &c. options to f18 development driver
Original-commit: flang-compiler/f18@ff7f338126
Reviewed-on: https://github.com/flang-compiler/f18/pull/213
2018-10-16 14:42:22 -07:00
peter klausler
76effcc5fb [flang] Eliminate DefaultInteger
Original-commit: flang-compiler/f18@1760b9ccc5
Reviewed-on: https://github.com/flang-compiler/f18/pull/213
Tree-same-pre-rewrite: false
2018-10-16 13:24:57 -07:00
peter klausler
d2f36b9d76 [flang] Eliminating old default type declarations
Original-commit: flang-compiler/f18@10e4a3385a
Reviewed-on: https://github.com/flang-compiler/f18/pull/213
Tree-same-pre-rewrite: false
2018-10-15 17:11:24 -07:00
peter klausler
bf339f8d47 [flang] Extract IntrinsicTypeDefaultKinds, move it into semantics
Original-commit: flang-compiler/f18@dd819b4727
Reviewed-on: https://github.com/flang-compiler/f18/pull/213
Tree-same-pre-rewrite: false
2018-10-15 15:28:47 -07:00
peter klausler
94041d7667 [flang] review comments
Original-commit: flang-compiler/f18@daaf080dbc
Reviewed-on: https://github.com/flang-compiler/f18/pull/212
2018-10-15 13:39:51 -07:00
peter klausler
51b09b62c6 [flang] improve naming, silence bogus warnings
Original-commit: flang-compiler/f18@f884fcb2c5
Reviewed-on: https://github.com/flang-compiler/f18/pull/212
Tree-same-pre-rewrite: false
2018-10-15 12:17:30 -07:00
peter klausler
55df4a7ad8 [flang] more unit testing, fix a bug
Original-commit: flang-compiler/f18@70189119df
Reviewed-on: https://github.com/flang-compiler/f18/pull/212
Tree-same-pre-rewrite: false
2018-10-12 16:25:39 -07:00
peter klausler
7bda1b3243 [flang] unit testing, better error messages
Original-commit: flang-compiler/f18@f3876008d0
Reviewed-on: https://github.com/flang-compiler/f18/pull/212
Tree-same-pre-rewrite: false
2018-10-12 16:02:41 -07:00
peter klausler
62425d6021 [flang] begin unit testing
Original-commit: flang-compiler/f18@c8b691a4ae
Reviewed-on: https://github.com/flang-compiler/f18/pull/212
Tree-same-pre-rewrite: false
2018-10-12 16:02:40 -07:00
peter klausler
ad9aede8ce [flang] finish most intrinsic table entries
Original-commit: flang-compiler/f18@134bd885af
Reviewed-on: https://github.com/flang-compiler/f18/pull/212
Tree-same-pre-rewrite: false
2018-10-12 16:02:39 -07:00
peter klausler
24379cc0fc [flang] a few more intrinsics and some style guide comments
Original-commit: flang-compiler/f18@b6696ef923
Reviewed-on: https://github.com/flang-compiler/f18/pull/212
Tree-same-pre-rewrite: false
2018-10-12 16:02:37 -07:00
peter klausler
8efb8972c2 [flang] more intrinsics
Original-commit: flang-compiler/f18@2e7210be5b
Reviewed-on: https://github.com/flang-compiler/f18/pull/212
Tree-same-pre-rewrite: false
2018-10-12 16:02:36 -07:00
peter klausler
f7f2a73a43 [flang] remove arg->intValue field
Original-commit: flang-compiler/f18@721dc92022
Reviewed-on: https://github.com/flang-compiler/f18/pull/212
Tree-same-pre-rewrite: false
2018-10-12 16:02:35 -07:00
peter klausler
a62636f634 [flang] debug initial intrinsic table probes
Original-commit: flang-compiler/f18@dce9a1e173
Reviewed-on: https://github.com/flang-compiler/f18/pull/212
Tree-same-pre-rewrite: false
2018-10-12 16:02:34 -07:00
peter klausler
cb308d32a1 [flang] error messages
Original-commit: flang-compiler/f18@392a733073
Reviewed-on: https://github.com/flang-compiler/f18/pull/212
Tree-same-pre-rewrite: false
2018-10-12 16:02:33 -07:00
peter klausler
75a32097fd [flang] checkpoint
Original-commit: flang-compiler/f18@e103152671
Reviewed-on: https://github.com/flang-compiler/f18/pull/212
Tree-same-pre-rewrite: false
2018-10-12 16:02:31 -07:00
peter klausler
a70f596719 [flang] intrinsic pattern matching
Original-commit: flang-compiler/f18@ca0ee1660a
Reviewed-on: https://github.com/flang-compiler/f18/pull/212
Tree-same-pre-rewrite: false
2018-10-12 16:02:30 -07:00
peter klausler
b22d494357 [flang] buildable checkpoint before merging with master
Original-commit: flang-compiler/f18@78c5b8c411
Reviewed-on: https://github.com/flang-compiler/f18/pull/212
Tree-same-pre-rewrite: false
2018-10-12 16:02:29 -07:00
peter klausler
42b33da129 [flang] initial intrinsics table
Original-commit: flang-compiler/f18@8b5c3adf88
Reviewed-on: https://github.com/flang-compiler/f18/pull/212
Tree-same-pre-rewrite: false
2018-10-12 16:02:28 -07:00
peter klausler
884d9057d0 [flang] Prep for review
Original-commit: flang-compiler/f18@a9439ee83c
Reviewed-on: https://github.com/flang-compiler/f18/pull/209
2018-10-10 15:27:17 -07:00
peter klausler
fa671ab542 [flang] Remove some obsolete casts now that Integer has a better constructor
Original-commit: flang-compiler/f18@f9a4a8bdda
Reviewed-on: https://github.com/flang-compiler/f18/pull/209
Tree-same-pre-rewrite: false
2018-10-10 15:01:12 -07:00
peter klausler
a10f6000b0 [flang] Fix issue#202 by avoiding clang+BSD/Darwin header bug
Original-commit: flang-compiler/f18@1bdefe528a
Reviewed-on: https://github.com/flang-compiler/f18/pull/209
Tree-same-pre-rewrite: false
2018-10-10 15:01:10 -07:00
Paul Henning
3712060d2e [flang] Removed obsolete comments and conversions
The addition of a more robust Integer constructor for POD types has
made some comments and static_cast expressions obsolete.

Original-commit: flang-compiler/f18@847b8a7684
Reviewed-on: https://github.com/flang-compiler/f18/pull/208
2018-10-10 14:43:21 -07:00
peter klausler
4bdb76af0b [flang] Make conversions between C++ integral types and Integer fully generic.
Original-commit: flang-compiler/f18@bf753a183d
Reviewed-on: https://github.com/flang-compiler/f18/pull/206
2018-10-10 13:21:46 -07:00
peter klausler
7b141b62df [flang] Resolve g++ 7.2 build problem
Original-commit: flang-compiler/f18@09859b2e9c
Reviewed-on: https://github.com/flang-compiler/f18/pull/197
2018-10-01 14:36:31 -07:00
peter klausler
3cecff6a05 [flang] checkpoint
Original-commit: flang-compiler/f18@960ae495fd
Reviewed-on: https://github.com/flang-compiler/f18/pull/195
Tree-same-pre-rewrite: false
2018-09-25 15:24:04 -07:00
peter klausler
d969464673 [flang] typed function references
Original-commit: flang-compiler/f18@e9b9d72958
Reviewed-on: https://github.com/flang-compiler/f18/pull/195
Tree-same-pre-rewrite: false
2018-09-25 15:24:04 -07:00
peter klausler
ad2fda8932 [flang] substrings and better rank checks
Original-commit: flang-compiler/f18@4fa483ac49
Reviewed-on: https://github.com/flang-compiler/f18/pull/195
Tree-same-pre-rewrite: false
2018-09-25 15:24:02 -07:00
peter klausler
1322e6090f [flang] Use dynamic default REAL kind for conversions that were static
Original-commit: flang-compiler/f18@9a83fbbe95
Reviewed-on: https://github.com/flang-compiler/f18/pull/195
Tree-same-pre-rewrite: false
2018-09-25 15:24:01 -07:00
peter klausler
a5687fd579 [flang] source provenances for expressions
Original-commit: flang-compiler/f18@5fe292fcac
Reviewed-on: https://github.com/flang-compiler/f18/pull/195
Tree-same-pre-rewrite: false
2018-09-25 15:24:00 -07:00
peter klausler
b74d469103 [flang] some clean-up
Original-commit: flang-compiler/f18@b6eb3e990a
Reviewed-on: https://github.com/flang-compiler/f18/pull/195
Tree-same-pre-rewrite: false
2018-09-25 15:24:00 -07:00
peter klausler
84af9c28f0 [flang] subscripts
Original-commit: flang-compiler/f18@7fb7518af7
Reviewed-on: https://github.com/flang-compiler/f18/pull/195
Tree-same-pre-rewrite: false
2018-09-25 15:23:59 -07:00
peter klausler
93a7f1f85c [flang] work on structure components
Original-commit: flang-compiler/f18@619b6957b4
Reviewed-on: https://github.com/flang-compiler/f18/pull/195
Tree-same-pre-rewrite: false
2018-09-25 15:23:58 -07:00
peter klausler
58b357d1ce [flang] Repair CMakeLists.txt after accidentally clang-formatting it
Original-commit: flang-compiler/f18@21eef98f47
Reviewed-on: https://github.com/flang-compiler/f18/pull/183
Tree-same-pre-rewrite: false
2018-09-12 16:37:28 -07:00
peter klausler
74563c17c1 [flang] Add "explicit" to constructors, define Type<TypeCategory::Derived>
Original-commit: flang-compiler/f18@79c165af65
Reviewed-on: https://github.com/flang-compiler/f18/pull/183
Tree-same-pre-rewrite: false
2018-09-12 16:29:23 -07:00
peter klausler
55763194f1 [flang] Merge with current master, address early review comments.
Original-commit: flang-compiler/f18@d1f981ddb4
Reviewed-on: https://github.com/flang-compiler/f18/pull/183
Tree-same-pre-rewrite: false
2018-09-12 16:29:22 -07:00
peter klausler
6c6234be9e [flang] clean up for review
Original-commit: flang-compiler/f18@d3d81b1e6f
Reviewed-on: https://github.com/flang-compiler/f18/pull/183
Tree-same-pre-rewrite: false
2018-09-12 16:29:20 -07:00
peter klausler
9236fa92ae [flang] array references
Original-commit: flang-compiler/f18@5659510c31
Reviewed-on: https://github.com/flang-compiler/f18/pull/183
Tree-same-pre-rewrite: false
2018-09-12 16:29:19 -07:00
peter klausler
f9d4cef84e [flang] cleaning up TODOs
Original-commit: flang-compiler/f18@cfd67de3cd
Reviewed-on: https://github.com/flang-compiler/f18/pull/183
Tree-same-pre-rewrite: false
2018-09-12 16:29:18 -07:00
peter klausler
dc31b3d1ca [flang] LOGICAL operations
Original-commit: flang-compiler/f18@71a1de4c59
Reviewed-on: https://github.com/flang-compiler/f18/pull/183
Tree-same-pre-rewrite: false
2018-09-12 16:29:17 -07:00
peter klausler
003c8329ba [flang] add left(), right(), and comments
Original-commit: flang-compiler/f18@372fd06508
Reviewed-on: https://github.com/flang-compiler/f18/pull/183
Tree-same-pre-rewrite: false
2018-09-12 16:29:16 -07:00
peter klausler
710d635cad [flang] mixed Complex; removed BOZConstant in favor of converting in place
Original-commit: flang-compiler/f18@17a18ddd22
Reviewed-on: https://github.com/flang-compiler/f18/pull/183
Tree-same-pre-rewrite: false
2018-09-12 16:29:13 -07:00
peter klausler
63a26fc7dc [flang] mixed z+i, z+r expressions
Original-commit: flang-compiler/f18@5c5d11c1f7
Reviewed-on: https://github.com/flang-compiler/f18/pull/183
Tree-same-pre-rewrite: false
2018-09-12 16:29:12 -07:00
peter klausler
0b2d90bc00 [flang] Finish typeless casting
Original-commit: flang-compiler/f18@a4cfd1696a
Reviewed-on: https://github.com/flang-compiler/f18/pull/183
Tree-same-pre-rewrite: false
2018-09-12 16:29:12 -07:00
peter klausler
5f43f78b82 [flang] more operators
Original-commit: flang-compiler/f18@4925b4b944
Reviewed-on: https://github.com/flang-compiler/f18/pull/183
Tree-same-pre-rewrite: false
2018-09-12 16:29:11 -07:00
peter klausler
79408f956d [flang] restructure work in progress in semantics/expression.cc; checkpoint before finishing operators
Original-commit: flang-compiler/f18@5d991b0df3
Reviewed-on: https://github.com/flang-compiler/f18/pull/183
Tree-same-pre-rewrite: false
2018-09-12 16:29:10 -07:00