Peter Steinfeld
0bef67225a
[flang] Added the machinery for REAL DO controls to be treated as a separate
...
extension.
Original-commit: flang-compiler/f18@1907cf8672
Reviewed-on: https://github.com/flang-compiler/f18/pull/478
Tree-same-pre-rewrite: false
2019-06-10 13:31:31 -07:00
Peter Steinfeld
a698d3d579
[flang] Changes responding to comments on my previous pull request. Specifically --
...
parse-tree.cc
- Cleaned up the use of "const" in several declarations.
check-do-stmt.cc
- Replaced uses of parser::Messages with SemanticsContext.
- Removed unused "==" operator from the DoStmtContext class.
- Reduced the size of the GetBounds function by calling GetLoopControl().
- Changed the warning message for REAL DO controls to not mention standard
extensions.
check-do-stmt.h
- Restored the forward reference to Fortran::parser::DoConstruct and removed
the include of parse-tree.h
dosemantics*.f90
- Removed extraneous references to the "RUN" command.
test_errors.sh
- Simplified and generalized the extraction of the OPTIONS specification.
Original-commit: flang-compiler/f18@04a0712766
Reviewed-on: https://github.com/flang-compiler/f18/pull/478
Tree-same-pre-rewrite: false
2019-06-10 13:31:31 -07:00
Peter Steinfeld
93a59505a5
[flang] These changes are for issue 458, to perform semantic checks on DO variable
...
and initial, final, and step expressions. As a new extension, we want to allow
REAL and DOUBLE PRECISION values for them by default.
Here's a summary of the changes:
- There already existed infrastructure for semantic checking of DO loops that
was partially specific to DO CONCURRENT loops. Because I re-used some of
this infrastructure, I renamed some files and classes from "concurrent" to
"stmt".
- I added some functions to distinguish among the different kinds of DO
statements.
- I added the functions to check-do-stmt.cc to produce the necessary warnins
and errors. Note that there are no tests for the warnings since the
necessary testing infrastructure does not yet exist.
- I changed test-errors.sh so that additional compilation options can be
specified in the test source.
- I added two new tests to test for the various kinds of values that can be
used for the DO variables and control expressions. The two tests are
identical except for the use of different compilation options.
dosemantics03.f90 specifies the options "-Mstandard -Werror" to produce
error messages for the use of REAL and DOUBLE PRECISION DO variables and
controls. dosemantics04.f90 uses the default options and only produces
error messages for contructs that are erroneous by default.
Original-commit: flang-compiler/f18@f484660c75
Reviewed-on: https://github.com/flang-compiler/f18/pull/478
Tree-same-pre-rewrite: false
2019-06-10 13:31:31 -07:00
Peter Klausler
cd4491bb68
[flang] Merge pull request flang-compiler/f18#490 from flang-compiler/pmk-gcc-9.1.0
...
Dodge a GCC-specific valgrind warning
Original-commit: flang-compiler/f18@2880605122
Reviewed-on: https://github.com/flang-compiler/f18/pull/490
2019-06-10 09:26:29 -07:00
peter klausler
754c88f35f
[flang] Remove temporary debugging code
...
Original-commit: flang-compiler/f18@e7147ebfbe
Reviewed-on: https://github.com/flang-compiler/f18/pull/490
2019-06-10 09:26:02 -07:00
peter klausler
812bda43f1
[flang] Dodge valgrind complaint by cleaning up the grammar a bit
...
Original-commit: flang-compiler/f18@3f9f9af1e8
Reviewed-on: https://github.com/flang-compiler/f18/pull/490
Tree-same-pre-rewrite: false
2019-06-07 16:01:21 -07:00
peter klausler
82f119414c
[flang] some clean-up
...
Original-commit: flang-compiler/f18@6134e1c2f2
Reviewed-on: https://github.com/flang-compiler/f18/pull/490
Tree-same-pre-rewrite: false
2019-06-07 16:01:20 -07:00
peter klausler
7269dc8a82
[flang] Remove needless braces
...
Original-commit: flang-compiler/f18@edd18355be
Reviewed-on: https://github.com/flang-compiler/f18/pull/490
Tree-same-pre-rewrite: false
2019-06-07 16:01:20 -07:00
Eric Schweitz
19a5dfeacf
[flang] Merge pull request flang-compiler/f18#489 from schweitzpgi/chipper
...
Remove the FIR directory
Original-commit: flang-compiler/f18@8ef23f0720
Reviewed-on: https://github.com/flang-compiler/f18/pull/489
2019-06-07 13:40:50 -07:00
Eric Schweitz
5c978b94a2
[flang] remove FIR
...
Original-commit: flang-compiler/f18@008ad16e28
Reviewed-on: https://github.com/flang-compiler/f18/pull/489
2019-06-07 10:20:15 -07:00
Eric Schweitz
6bbcc8c1d8
[flang] Remove the old FIR middle end from the f18 program and speed up build time.
...
Original-commit: flang-compiler/f18@5b410b978c
Reviewed-on: https://github.com/flang-compiler/f18/pull/489
Tree-same-pre-rewrite: false
2019-06-07 10:19:59 -07:00
Eric Schweitz
8242853380
[flang] start splitting up afforestation so it isn't monolithic
...
Original-commit: flang-compiler/f18@842a42d954
Reviewed-on: https://github.com/flang-compiler/f18/pull/489
Tree-same-pre-rewrite: false
2019-06-07 10:19:45 -07:00
Peter Klausler
170198381a
[flang] Merge pull request flang-compiler/f18#488 from flang-compiler/pmk-fixes
...
More fixes from test suite shakedown
Original-commit: flang-compiler/f18@357b834676
Reviewed-on: https://github.com/flang-compiler/f18/pull/488
2019-06-07 13:32:15 -07:00
peter klausler
3e92bb77aa
[flang] Address review comment
...
Original-commit: flang-compiler/f18@d6964fdd9f
Reviewed-on: https://github.com/flang-compiler/f18/pull/488
2019-06-07 12:00:32 -07:00
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
caa46e5178
[flang] Merge pull request flang-compiler/f18#484 from flang-compiler/pmk-subscript-int
...
Clean up subscript-sized int definitions
Original-commit: flang-compiler/f18@7e60579571
Reviewed-on: https://github.com/flang-compiler/f18/pull/484
2019-06-07 10:23:27 -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
c808bed84f
[flang] Merge pull request flang-compiler/f18#487 from flang-compiler/tsk-486
...
Fix issue flang-compiler/f18#486
Original-commit: flang-compiler/f18@66eaf89c09
Reviewed-on: https://github.com/flang-compiler/f18/pull/487
2019-06-07 08:01:38 -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
jeanPerier
2e60d8f495
[flang] Merge pull request flang-compiler/f18#471 from flang-compiler/jpr-character-intrinsic-folding
...
Fix UTF-8 issues and add implement some character intrinsic functions folding
Original-commit: flang-compiler/f18@766b6c459b
Reviewed-on: https://github.com/flang-compiler/f18/pull/471
2019-06-06 22:44:08 -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
jeanPerier
72c85c6bc7
[flang] Merge pull request flang-compiler/f18#483 from flang-compiler/jpr-482-fix
...
Fix issue flang-compiler/f18#482 related to folding warnings
Original-commit: flang-compiler/f18@8532032960
Reviewed-on: https://github.com/flang-compiler/f18/pull/483
2019-06-06 22:43:17 -07:00
Jean Perier
8dbb09119b
[flang] Address formatting comment
...
Original-commit: flang-compiler/f18@0f5fb6e75a
Reviewed-on: https://github.com/flang-compiler/f18/pull/483
2019-06-06 07:41:57 -07:00
Jean Perier
493cee5ca8
[flang] Remove OS dependency in folding test
...
Original-commit: flang-compiler/f18@3728898ea9
Reviewed-on: https://github.com/flang-compiler/f18/pull/483
Tree-same-pre-rewrite: false
2019-06-06 04:24:42 -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
4dcc6e9603
[flang] Merge pull request flang-compiler/f18#485 from flang-compiler/pmk-iso_fortran_env
...
Define a placeholder for ISO_FORTRAN_ENV standard module
Original-commit: flang-compiler/f18@927ed4283e
Reviewed-on: https://github.com/flang-compiler/f18/pull/485
2019-06-06 15:02:29 -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
433b9e110e
[flang] Merge pull request flang-compiler/f18#480 from flang-compiler/pmk-fixes
...
Fix two bugs
Original-commit: flang-compiler/f18@9023d3c3ac
Reviewed-on: https://github.com/flang-compiler/f18/pull/480
2019-06-05 09:13:20 -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
2f9811d8db
[flang] Merge pull request flang-compiler/f18#479 from flang-compiler/pmk-unparse-expr
...
Unparse the typedExpr from semantics
Original-commit: flang-compiler/f18@f41b303b96
Reviewed-on: https://github.com/flang-compiler/f18/pull/479
2019-06-05 09:11:50 -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
e1f6c6684b
[flang] Merge pull request flang-compiler/f18#477 from flang-compiler/pmk-fixes
...
Roll up some minor fixes + tweak name resolution pass order
Original-commit: flang-compiler/f18@ae57961155
Reviewed-on: https://github.com/flang-compiler/f18/pull/477
2019-06-04 15:20:29 -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