Commit graph

1225 commits

Author SHA1 Message Date
peter klausler
fc61632c21 [flang] Fix characterization of functions called in association selectors
Original-commit: flang-compiler/f18@cada0c61e3
Reviewed-on: https://github.com/flang-compiler/f18/pull/488
Tree-same-pre-rewrite: false
2019-06-07 10:24:35 -07:00
peter klausler
b408a02c14 [flang] Avoid segfault in association semantics by cleaning up code a bit
Original-commit: flang-compiler/f18@04d40c3d75
Reviewed-on: https://github.com/flang-compiler/f18/pull/488
Tree-same-pre-rewrite: false
2019-06-07 10:24:33 -07:00
peter klausler
8a326cb7f7 [flang] Interpret intrinsic table more correctly
Original-commit: flang-compiler/f18@ff34f32447
Reviewed-on: https://github.com/flang-compiler/f18/pull/488
Tree-same-pre-rewrite: false
2019-06-07 10:24:33 -07:00
peter klausler
a28607f837 [flang] Use ConstantSubscript as the one name for int64_t
Original-commit: flang-compiler/f18@13870c0017
Reviewed-on: https://github.com/flang-compiler/f18/pull/484
2019-06-07 09:57:52 -07:00
peter klausler
c26b696085 [flang] Clean up subscript-sized int definitions
Original-commit: flang-compiler/f18@256fc4e3ca
Reviewed-on: https://github.com/flang-compiler/f18/pull/484
Tree-same-pre-rewrite: false
2019-06-07 09:57:49 -07:00
Tim Keith
e69c6a6259 [flang] Fix issue flang-compiler/f18#486
In a function without a function result specified, the name in the
`FunctionStmt` was resolved to the function result symbol rather than
the function symbol itself. That is inconsistent with subroutines and
other functions.

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

Original-commit: flang-compiler/f18@b0172d3284
Reviewed-on: https://github.com/flang-compiler/f18/pull/487
2019-06-06 16:09:11 -07:00
Jean Perier
5567377d36 [flang] Remove unused captured values
Original-commit: flang-compiler/f18@ae79e7e699
Reviewed-on: https://github.com/flang-compiler/f18/pull/471
2019-06-06 01:34:39 -07:00
Jean Perier
5b569e209a [flang] Fix logical conflict after rebase
Original-commit: flang-compiler/f18@93d6c1e53a
Reviewed-on: https://github.com/flang-compiler/f18/pull/471
Tree-same-pre-rewrite: false
2019-06-05 07:33:37 -07:00
Jean Perier
6dd3ca917a [flang] Remove encoding related checks in achar/char
Original-commit: flang-compiler/f18@86bc6a0252
Reviewed-on: https://github.com/flang-compiler/f18/pull/471
Tree-same-pre-rewrite: false
2019-06-05 06:54:01 -07:00
Jean Perier
6a1b208a4d [flang] Answer first comments
Original-commit: flang-compiler/f18@4058efcd9c
Reviewed-on: https://github.com/flang-compiler/f18/pull/471
Tree-same-pre-rewrite: false
2019-06-05 06:53:57 -07:00
Jean Perier
e303c352ce [flang] Implement folding of IACHAR, ICHAR, CHAR, ACHAR, ADJUSTL, ADJUSTR
Original-commit: flang-compiler/f18@e8e8071e93
Reviewed-on: https://github.com/flang-compiler/f18/pull/471
Tree-same-pre-rewrite: false
2019-06-05 06:53:49 -07:00
Jean Perier
bc30bef24b [flang] Fix UTF-8 bugs and add related tests
Original-commit: flang-compiler/f18@9dd19ede9e
Reviewed-on: https://github.com/flang-compiler/f18/pull/471
Tree-same-pre-rewrite: false
2019-06-05 06:53:23 -07:00
Jean Perier
958e4e691e [flang] checkpoint character intrinsic folding
Original-commit: flang-compiler/f18@f495ed92bd
Reviewed-on: https://github.com/flang-compiler/f18/pull/471
Tree-same-pre-rewrite: false
2019-06-05 06:43:38 -07:00
Jean Perier
057b6875f7 [flang] Fix 482: do not check floating point environment flags with clang
Original-commit: flang-compiler/f18@fc423c1516
Reviewed-on: https://github.com/flang-compiler/f18/pull/483
Tree-same-pre-rewrite: false
2019-06-06 03:24:35 -07:00
peter klausler
0f1fd64ae5 [flang] Other changes moved to their own branch.
Original-commit: flang-compiler/f18@6a922d085a
Reviewed-on: https://github.com/flang-compiler/f18/pull/485
2019-06-06 13:56:22 -07:00
peter klausler
d8f72a3105 [flang] Placeholder for standard module iso_fortran_env
Original-commit: flang-compiler/f18@386ebb0490
Reviewed-on: https://github.com/flang-compiler/f18/pull/485
Tree-same-pre-rewrite: false
2019-06-06 13:42:33 -07:00
peter klausler
4d7da503fc [flang] Apply suggestion from code review
Original-commit: flang-compiler/f18@211c99917c
Reviewed-on: https://github.com/flang-compiler/f18/pull/480
2019-06-05 09:12:21 -07:00
peter klausler
dd50c1bca7 [flang] Fix two bugs
Original-commit: flang-compiler/f18@919e512c08
Reviewed-on: https://github.com/flang-compiler/f18/pull/480
Tree-same-pre-rewrite: false
2019-06-04 17:03:34 -07:00
peter klausler
f586ad5e56 [flang] Unparse the typedExpr from semantics, when present, rather than original parse tree expressions
Original-commit: flang-compiler/f18@4274cc8eaa
Reviewed-on: https://github.com/flang-compiler/f18/pull/479
2019-06-04 16:25:06 -07:00
peter klausler
2e44404e94 [flang] Fix build warning, add comment about extension not supported
Original-commit: flang-compiler/f18@1033ae05ca
Reviewed-on: https://github.com/flang-compiler/f18/pull/477
2019-06-04 14:51:56 -07:00
peter klausler
cab9b3072b [flang] Skim executable parts to detect dummy procedure calls
Original-commit: flang-compiler/f18@b085255e5c
Reviewed-on: https://github.com/flang-compiler/f18/pull/477
Tree-same-pre-rewrite: false
2019-06-04 13:37:35 -07:00
peter klausler
0d242e2006 [flang] INTRINSIC attribute should convert symbol to procedure; also check C840
Original-commit: flang-compiler/f18@b698b84ccd
Reviewed-on: https://github.com/flang-compiler/f18/pull/477
Tree-same-pre-rewrite: false
2019-06-04 13:37:26 -07:00
peter klausler
5774f0ab30 [flang] Fix arg specs for CMPLX intrinsic
Original-commit: flang-compiler/f18@3586b8a646
Reviewed-on: https://github.com/flang-compiler/f18/pull/477
Tree-same-pre-rewrite: false
2019-06-04 13:37:25 -07:00
peter klausler
fb1fcbb9cd [flang] Fix LEN(char array), it is not elemental.
Original-commit: flang-compiler/f18@b44eb2e7b1
Reviewed-on: https://github.com/flang-compiler/f18/pull/477
Tree-same-pre-rewrite: false
2019-06-04 13:37:23 -07:00
peter klausler
b50170c99d [flang] allow alternate return indicators
Original-commit: flang-compiler/f18@a04150a4f9
Reviewed-on: https://github.com/flang-compiler/f18/pull/477
Tree-same-pre-rewrite: false
2019-06-04 13:37:20 -07:00
peter klausler
89a0181da6 [flang] Allow for FINAL procedures in PDT instantiation
Original-commit: flang-compiler/f18@e276374b29
Reviewed-on: https://github.com/flang-compiler/f18/pull/477
Tree-same-pre-rewrite: false
2019-06-04 13:37:17 -07:00
peter klausler
3e313d43e1 [flang] Fix correction of misparsed struct const as actual arg, and semantics of MODULE PROCEDURE in INTERFACE
Original-commit: flang-compiler/f18@6c86de6cef
Reviewed-on: https://github.com/flang-compiler/f18/pull/477
Tree-same-pre-rewrite: false
2019-06-04 13:37:16 -07:00
peter klausler
d72fd348f7 [flang] Allow some BOZ usage when unambiguous (extension)
Original-commit: flang-compiler/f18@bf3bd54c88
Reviewed-on: https://github.com/flang-compiler/f18/pull/477
Tree-same-pre-rewrite: false
2019-06-04 13:37:12 -07:00
peter klausler
0ddea8ae24 [flang] Rearrange references to AllSources singleton, fix FindScope for module files
Original-commit: flang-compiler/f18@50ccc1c819
Reviewed-on: https://github.com/flang-compiler/f18/pull/477
Tree-same-pre-rewrite: false
2019-06-04 13:37:09 -07:00
peter klausler
9d5490a561 [flang] Fix spelling of ISHFT
Original-commit: flang-compiler/f18@3c93c40ed5
Reviewed-on: https://github.com/flang-compiler/f18/pull/477
Tree-same-pre-rewrite: false
2019-06-04 13:37:08 -07:00
peter klausler
710a5147cd [flang] Reformatting before merging
Original-commit: flang-compiler/f18@9f084c1da6
Reviewed-on: https://github.com/flang-compiler/f18/pull/472
2019-05-30 16:39:23 -07:00
peter klausler
c3ce68c1ee [flang] Two more fixes made while waiting for code review
Original-commit: flang-compiler/f18@6dc58004ab
Reviewed-on: https://github.com/flang-compiler/f18/pull/472
Tree-same-pre-rewrite: false
2019-05-30 16:14:24 -07:00
peter klausler
535484e2cc [flang] Address review comment
Original-commit: flang-compiler/f18@17be1f6a7d
Reviewed-on: https://github.com/flang-compiler/f18/pull/472
Tree-same-pre-rewrite: false
2019-05-30 15:26:54 -07:00
peter klausler
d3b23e9dd6 [flang] Handle large integer literals without kinds better
Original-commit: flang-compiler/f18@381ea32d57
Reviewed-on: https://github.com/flang-compiler/f18/pull/472
Tree-same-pre-rewrite: false
2019-05-30 13:31:11 -07:00
peter klausler
d49aa3c57c [flang] Final fixes before review
Original-commit: flang-compiler/f18@efe5c1b8ec
Reviewed-on: https://github.com/flang-compiler/f18/pull/472
Tree-same-pre-rewrite: false
2019-05-29 16:00:31 -07:00
peter klausler
f4b1209f4b [flang] PRECISION, RANGE, RADIX
Original-commit: flang-compiler/f18@de0bf5a18f
Reviewed-on: https://github.com/flang-compiler/f18/pull/472
Tree-same-pre-rewrite: false
2019-05-29 15:38:33 -07:00
peter klausler
eff41b8fa7 [flang] Complete folding of intermixed array and component references
Original-commit: flang-compiler/f18@70db03e4ac
Reviewed-on: https://github.com/flang-compiler/f18/pull/472
Tree-same-pre-rewrite: false
2019-05-29 13:22:35 -07:00
peter klausler
4cd29d1002 [flang] Fix intrinsic folding after merging changes
Original-commit: flang-compiler/f18@a982c34b6f
Reviewed-on: https://github.com/flang-compiler/f18/pull/472
Tree-same-pre-rewrite: false
2019-05-28 15:42:28 -07:00
peter klausler
d29530e1c4 [flang] Defer conversions to objects; fix some intrinsic table entries
more fixes

Access components of constant structures

Apply implicit typing to dummy args used in automatic array dimensions

SELECTED_INT_KIND and SELECTED_REAL_KIND

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

Original-commit: flang-compiler/f18@e9f8e53e55
Reviewed-on: https://github.com/flang-compiler/f18/pull/472
Tree-same-pre-rewrite: false
2019-05-28 13:29:29 -07:00
Jean Perier
33d6fb2332 [flang] Make integer divide by zero in constants a fatal error
Original-commit: flang-compiler/f18@e5acff6b63
Reviewed-on: https://github.com/flang-compiler/f18/pull/468
Tree-same-pre-rewrite: false
2019-05-24 07:55:57 -07:00
Jean Perier
49c8d329b7 [flang] Fix support of parenthesized arguments in function folding
Original-commit: flang-compiler/f18@1ecb07cddf
Reviewed-on: https://github.com/flang-compiler/f18/pull/468
Tree-same-pre-rewrite: false
2019-05-24 07:55:44 -07:00
Jean Perier
f62528535e [flang] Folding improvments:
- Add location to non-fatal error message (context was not given
    a location before folding in semantics).
  - Avoid refolding expression from scratch several times (update GenericExprWrapper
    after folding). So far, warning messages were generated twice per parametere init
    expressions.

Original-commit: flang-compiler/f18@bf7f6cf9cd
Reviewed-on: https://github.com/flang-compiler/f18/pull/468
Tree-same-pre-rewrite: false
2019-05-24 07:55:40 -07:00
Jean Perier
e5f396511d [flang] fix error message typo
Original-commit: flang-compiler/f18@049163e0d4
Reviewed-on: https://github.com/flang-compiler/f18/pull/469
Tree-same-pre-rewrite: false
2019-05-23 02:09:58 -07:00
Jean Perier
15630a4ddd [flang] Prevent possible infinte loop in parameter folding
Original-commit: flang-compiler/f18@38360930ce
Reviewed-on: https://github.com/flang-compiler/f18/pull/469
Tree-same-pre-rewrite: false
2019-05-22 08:26:50 -07:00
Jean Perier
d146db54ca [flang] Fix: catch subroutine symbols in ALLOCATE
Original-commit: flang-compiler/f18@99d4b3dcd6
Reviewed-on: https://github.com/flang-compiler/f18/pull/467
2019-05-22 08:00:19 -07:00
peter klausler
7026445c07 [flang] Address review comments from Jean (thanks!)
Original-commit: flang-compiler/f18@5183c6196e
Reviewed-on: https://github.com/flang-compiler/f18/pull/466
2019-05-21 10:24:30 -07:00
peter klausler
59342b0641 [flang] work in progress
checkpoint: changes build, tests all pass

many fixes, ready to test more

Further CLASS(*) support

More fixes for CLASS(*)

Hide data members of DynamicType

implement PRESENT() intrinsic

Original-commit: flang-compiler/f18@044ba12c20
Reviewed-on: https://github.com/flang-compiler/f18/pull/466
Tree-same-pre-rewrite: false
2019-05-20 13:37:28 -07:00
peter klausler
d0fcb7681a [flang] Fix crash reported by Tim
Original-commit: flang-compiler/f18@7fe2d197ea
Reviewed-on: https://github.com/flang-compiler/f18/pull/465
2019-05-15 13:23:31 -07:00
peter klausler
9a13ea959c [flang] Fix bug with comment clipping on compiler directives
Original-commit: flang-compiler/f18@3f4375c57c
Reviewed-on: https://github.com/flang-compiler/f18/pull/463
2019-05-15 12:35:36 -07:00
peter klausler
01a3e1b80e [flang] Strip comments from source and directive lines after macro replacement
Original-commit: flang-compiler/f18@ecf22e6698
Reviewed-on: https://github.com/flang-compiler/f18/pull/460
2019-05-10 16:04:10 -07:00