Commit graph

2029 commits

Author SHA1 Message Date
Jinxin (Brian) Yang
0f8e792455 [flang] 2.8.1 SIMD structural checks (flang-compiler/f18#554)
Straightforward implementation but not including:
* list-item on aligned clause
* nesting check with the ordered construct (parse tree changes needed!)
* list-item attributes check on aligned clause

Original-commit: flang-compiler/f18@cf04d8ad26
Reviewed-on: https://github.com/flang-compiler/f18/pull/554
2019-07-09 14:08:50 -07:00
Peter Klausler
9b73091758 [flang] Merge pull request flang-compiler/f18#553 from flang-compiler/pmk-fixes
Support "*length" character length specifier on declarations, plus a couple small fixes.

Original-commit: flang-compiler/f18@afe12f7f4b
Reviewed-on: https://github.com/flang-compiler/f18/pull/553
2019-07-08 16:16:55 -07:00
peter klausler
008e697192 [flang] Fix regressions found in testing
Original-commit: flang-compiler/f18@ea09b191df
Reviewed-on: https://github.com/flang-compiler/f18/pull/553
2019-07-08 16:02:50 -07:00
peter klausler
644b2aabd0 [flang] Support *length character length specifiers
Original-commit: flang-compiler/f18@874b13b7d8
Reviewed-on: https://github.com/flang-compiler/f18/pull/553
Tree-same-pre-rewrite: false
2019-07-08 14:07:56 -07:00
peter klausler
7a6dabf974 [flang] Resolve merge
Original-commit: flang-compiler/f18@44743f1fa9
Reviewed-on: https://github.com/flang-compiler/f18/pull/553
Tree-same-pre-rewrite: false
2019-07-08 10:44:43 -07:00
peter klausler
626a4cfdfc [flang] Document non-standard use of larger INTEGER for sizes
Original-commit: flang-compiler/f18@edc79c4257
Reviewed-on: https://github.com/flang-compiler/f18/pull/553
Tree-same-pre-rewrite: false
2019-07-08 10:44:14 -07:00
peter klausler
cc2172b6f4 [flang] Fix multi-file compilations in throwaway driver
Original-commit: flang-compiler/f18@7954d0aecf
Reviewed-on: https://github.com/flang-compiler/f18/pull/553
Tree-same-pre-rewrite: false
2019-07-08 10:43:42 -07:00
peter klausler
e05f539917 [flang] Crash less
Original-commit: flang-compiler/f18@e8ac1a697d
Reviewed-on: https://github.com/flang-compiler/f18/pull/553
Tree-same-pre-rewrite: false
2019-07-03 16:00:26 -07:00
peter klausler
d1de4fe462 [flang] Avoid null pointer dereference
Original-commit: flang-compiler/f18@3c108c0edc
Reviewed-on: https://github.com/flang-compiler/f18/pull/553
Tree-same-pre-rewrite: false
2019-07-03 16:00:25 -07:00
Tim Keith
6b8df08cad [flang] Merge pull request flang-compiler/f18#550 from flang-compiler/tsk-bug
Prevent segfault in DynamicType::IsTkCompatibleWith

Original-commit: flang-compiler/f18@8ff0df020b
Reviewed-on: https://github.com/flang-compiler/f18/pull/550
2019-07-03 15:54:27 -07:00
Tim Keith
0386490751 [flang] Prevent segfault in DynamicType::IsTkCompatibleWith
Make sure `derived_` is not null before dereferencing it.

This might only happen when there is a previous error. I saw it
compiling a test program where a USEd module was not found.

Original-commit: flang-compiler/f18@2db516556b
Reviewed-on: https://github.com/flang-compiler/f18/pull/550
2019-07-03 15:47:37 -07:00
psteinfeld
8d8a867b83 [flang] Merge pull request flang-compiler/f18#542 from flang-compiler/ps-c1128
Enforce constraint C1128 for DO CONCURRENT locality-spec's

Original-commit: flang-compiler/f18@248600031d
Reviewed-on: https://github.com/flang-compiler/f18/pull/542
2019-07-03 14:28:49 -07:00
Peter Steinfeld
5b7b8866b8 [flang] Improved the implementation of "IsCoarray()" suggested by @tskeith.
Original-commit: flang-compiler/f18@efaf5fca2e
Reviewed-on: https://github.com/flang-compiler/f18/pull/542
2019-07-03 13:59:44 -07:00
Peter Steinfeld
02a395dcb7 [flang] Changes in response to comments on pull request flang-compiler/f18#542.
Original-commit: flang-compiler/f18@e156f977d8
Reviewed-on: https://github.com/flang-compiler/f18/pull/542
Tree-same-pre-rewrite: false
2019-07-03 13:50:57 -07:00
Peter Steinfeld
84b70d8b73 [flang] Enforce constraint C1128 for DO CONCURRENT locality-spec's
These changes implement most of the requirements for C1128, which says: "A
variable-name that appears in a LOCAL or LOCAL_INIT locality-spec shall not
have the ALLOCATABLE; INTENT (IN); or OPTIONAL attribute; shall not be of
finalizable type; shall not be a nonpointer polymorphic dummy argument; and
shall not be a coarray or an assumed-size array.  A variable-name that is not
permitted to appear in a variable definition context shall not appear in a
LOCAL or LOCAL_INIT locality-spec."

The changes do not implement the checking required to determine whether a
variable can appear in a "variable definition context".

Here's a summary of the changes:
 - I created the function 'PassesLocalityChecks()' to enforce C1128 along with
   C1124, C1125, and C1126.
 - I cleaned up the code to check if a type or symbol is a coarray.
 - I added functions to tools.[h,cc] to test if a symbol is OPTIONAL, INTENT
   IN, finalizable, a coarray, or an assumed size array.  Should these be
   member functions of the type "Symbol"?
 - Since I changed one of the locality related error messages, I needed to
   change the test resolve35.f90.
 - I added the test resolve55.f90 to test all of the checks implemented in this
   update.

Original-commit: flang-compiler/f18@4ca5d090b9
Reviewed-on: https://github.com/flang-compiler/f18/pull/542
Tree-same-pre-rewrite: false
2019-07-03 13:50:56 -07:00
Jinxin (Brian) Yang
f8da811848 [flang] 2.7.1 DO: Checks about clause arguments that allow Int Expr (flang-compiler/f18#540)
All the IntExpr argument checks are done through evaluating the result of GetIntValue. If the argument is non-constant integer expr, Expression Analysis will be the gatekeeper.


Original-commit: flang-compiler/f18@d8c4804828
Reviewed-on: https://github.com/flang-compiler/f18/pull/540
2019-07-03 14:24:37 -07:00
Peter Klausler
e9482517ae [flang] Merge pull request flang-compiler/f18#548 from flang-compiler/pmk-fixes
Fix FINDLOC for Character data

Original-commit: flang-compiler/f18@74a5c2a529
Reviewed-on: https://github.com/flang-compiler/f18/pull/548
2019-07-03 14:22:14 -07:00
peter klausler
24eb863fda [flang] Quick additional fix for crashes on statement functions without arguments
Original-commit: flang-compiler/f18@79779967a9
Reviewed-on: https://github.com/flang-compiler/f18/pull/548
2019-07-03 13:04:56 -07:00
peter klausler
c180c0229f [flang] Trim duplicate error messages on intrinsics, and fix FINDLOC for Character data.
Original-commit: flang-compiler/f18@48ab22e213
Reviewed-on: https://github.com/flang-compiler/f18/pull/548
Tree-same-pre-rewrite: false
2019-07-03 12:30:28 -07:00
Peter Klausler
b102a4523f [flang] Merge pull request flang-compiler/f18#545 from flang-compiler/pmk-more-fixes
Fix some crashes

Original-commit: flang-compiler/f18@dcf5990e85
Reviewed-on: https://github.com/flang-compiler/f18/pull/545
2019-07-03 12:04:16 -07:00
peter klausler
042298446b [flang] Graceful handling of failure in LEN() (fixes crashes)
Original-commit: flang-compiler/f18@8bab36574d
Reviewed-on: https://github.com/flang-compiler/f18/pull/545
2019-07-03 10:27:50 -07:00
peter klausler
a6d02b5b55 [flang] Avoid CHECK in error recovery situation with bad array bound
Original-commit: flang-compiler/f18@d522c0da21
Reviewed-on: https://github.com/flang-compiler/f18/pull/545
Tree-same-pre-rewrite: false
2019-07-03 10:27:49 -07:00
vdonaldson
a254653536 [flang] A minimal PRINT Enter function requires a minimal PRINT Leave function. (flang-compiler/f18#543)
Fixes flang-compiler/f18#541

Original-commit: flang-compiler/f18@8f3c5481e1
Reviewed-on: https://github.com/flang-compiler/f18/pull/543
2019-07-03 09:59:59 -07:00
Tim Keith
42831fa6a9 [flang] Merge pull request flang-compiler/f18#539 from flang-compiler/tsk1
Check that procedures of a generic are distinguishable

Original-commit: flang-compiler/f18@a24701e313
Reviewed-on: https://github.com/flang-compiler/f18/pull/539

Due to a conflicting rebase during the linearizing of flang-compiler/f18, this commit squashes a number of other commits:

flang-compiler/f18@9b1343af36 Some cleanup in characteristics.{h,cc}
flang-compiler/f18@ddb70e53d2 Merge branch 'master' of github.com:flang-compiler/f18 into tsk1
flang-compiler/f18@d1eef95066 Merge branch 'master' of github.com:flang-compiler/f18 into tsk1
flang-compiler/f18@24a6d3ffbf Make test_folding.sh stricter in test for warnings
flang-compiler/f18@c2c5b64060 Replace SymbolList with SymbolVector
flang-compiler/f18@c8499584df Add CopyAttrs to copy attributes from Symbol
flang-compiler/f18@0573ffd8b2 Replace cascading detailsIf calls with std::visit
flang-compiler/f18@28ec62b3ff Add name to characteristics::DummyArgument
flang-compiler/f18@568eaf0114 Add name to CopySymbol()
flang-compiler/f18@8c557b09e7 Check that procedures of a generic are distinguishable
flang-compiler/f18@50515fd987 Merge branch 'master' of github.com:flang-compiler/f18 into tsk1
flang-compiler/f18@a7963e98a4 Address review comments
flang-compiler/f18@edd65b3962 Merge branch 'master' of github.com:flang-compiler/f18 into tsk1
2019-07-02 14:00:44 -07:00
Peter Klausler
0d5112dcb3 [flang] Merge pull request flang-compiler/f18#538 from flang-compiler/pmk-fixes
Semantics for LOC() & %LOC()

Original-commit: flang-compiler/f18@770ed61805
Reviewed-on: https://github.com/flang-compiler/f18/pull/538
2019-07-02 10:01:46 -07:00
peter klausler
800138e2c2 [flang] Use enums instead of magic int values
Original-commit: flang-compiler/f18@238f84c2fb
Reviewed-on: https://github.com/flang-compiler/f18/pull/538
2019-07-02 09:16:08 -07:00
peter klausler
bdcdf04431 [flang] Use LOC() in iso_c_binding for C_LOC and C_FUNLOC
Original-commit: flang-compiler/f18@da02305d1b
Reviewed-on: https://github.com/flang-compiler/f18/pull/538
Tree-same-pre-rewrite: false
2019-07-01 16:54:53 -07:00
peter klausler
c140c1e674 [flang] clean up for review
Original-commit: flang-compiler/f18@9bf94ea39c
Reviewed-on: https://github.com/flang-compiler/f18/pull/538
Tree-same-pre-rewrite: false
2019-07-01 14:00:33 -07:00
peter klausler
8e93226e74 [flang] Add LOC()/%LOC() intrinsics
Original-commit: flang-compiler/f18@3a6b90c9f5
Reviewed-on: https://github.com/flang-compiler/f18/pull/538
Tree-same-pre-rewrite: false
2019-07-01 14:00:32 -07:00
Jinxin (Brian) Yang
1b0be3e0c9 [flang] Structural checks for DO construct (flang-compiler/f18#536)
Most restrictions in 2.7.1 Loop construct, nesting checks are still on TODO list.

seenClauses (EnumSet) is dropped. A multimap clauseInfo is added to save the encountering clause and its parser tree node pointer (parser::OmpClause) and to do the checks after walking through all the clauses.

Original-commit: flang-compiler/f18@f797357682
Reviewed-on: https://github.com/flang-compiler/f18/pull/536
2019-07-01 13:55:06 -07:00
Eric Schweitz
ebf5b43e9d [flang] Merge pull request flang-compiler/f18#537 from schweitzpgi/master
Fix a typo in Extract_Value description.

Original-commit: flang-compiler/f18@b0b88d905c
Reviewed-on: https://github.com/flang-compiler/f18/pull/537
2019-07-01 09:35:03 -07:00
Eric Schweitz
f8cc9310c7 [flang] Fix a typo in Extract_Value description.
Original-commit: flang-compiler/f18@873a6678da
Reviewed-on: https://github.com/flang-compiler/f18/pull/537
2019-07-01 09:11:33 -07:00
Peter Klausler
2db7d7e497 [flang] Merge pull request flang-compiler/f18#535 from flang-compiler/pmk-no-nchar
Extirpate NCHARACTER type, NC"" literals, and EUC-JP Hollerith

Original-commit: flang-compiler/f18@62b19842bc
Reviewed-on: https://github.com/flang-compiler/f18/pull/535
2019-06-28 14:02:44 -07:00
peter klausler
0ae02c8630 [flang] One more
Original-commit: flang-compiler/f18@8d73b44eae
Reviewed-on: https://github.com/flang-compiler/f18/pull/535
2019-06-28 11:43:57 -07:00
peter klausler
17fdb0a0e4 [flang] Missed one
Original-commit: flang-compiler/f18@e84f4b9c7a
Reviewed-on: https://github.com/flang-compiler/f18/pull/535
Tree-same-pre-rewrite: false
2019-06-28 11:34:15 -07:00
peter klausler
dbb202c5be [flang] Extirpate NCHARACTER type, NC"" literals, and EUC-JP Hollerith
Original-commit: flang-compiler/f18@10a592a591
Reviewed-on: https://github.com/flang-compiler/f18/pull/535
Tree-same-pre-rewrite: false
2019-06-28 11:22:43 -07:00
Peter Klausler
d4119baffc [flang] Merge pull request flang-compiler/f18#531 from flang-compiler/pmk-more-fixes
Roll up more minor features & fixes to semantics for bugs found by regression testing

Original-commit: flang-compiler/f18@96a7932dab
Reviewed-on: https://github.com/flang-compiler/f18/pull/531
2019-06-28 10:36:47 -07:00
peter klausler
f937238d42 [flang] Better error reporting, with test
Original-commit: flang-compiler/f18@85e8b64d3e
Reviewed-on: https://github.com/flang-compiler/f18/pull/531
2019-06-28 09:21:04 -07:00
peter klausler
6710f623e9 [flang] Formatting fix
Original-commit: flang-compiler/f18@e158e4f1c6
Reviewed-on: https://github.com/flang-compiler/f18/pull/531
Tree-same-pre-rewrite: false
2019-06-28 09:21:02 -07:00
peter klausler
4470eddabd [flang] Work around GCC 7.2.0 build issue
Original-commit: flang-compiler/f18@c68349f78f
Reviewed-on: https://github.com/flang-compiler/f18/pull/531
Tree-same-pre-rewrite: false
2019-06-28 09:21:00 -07:00
peter klausler
28c03d3a38 [flang] address review comments
Original-commit: flang-compiler/f18@f7188a7a33
Reviewed-on: https://github.com/flang-compiler/f18/pull/531
Tree-same-pre-rewrite: false
2019-06-28 09:20:59 -07:00
peter klausler
aa67387005 [flang] delete two obsolete tests that somehow got committed
Original-commit: flang-compiler/f18@8b6a49416c
Reviewed-on: https://github.com/flang-compiler/f18/pull/531
Tree-same-pre-rewrite: false
2019-06-28 09:20:59 -07:00
peter klausler
737fe29f2b [flang] Fix regressions from testing pass
Original-commit: flang-compiler/f18@70ea3b4b09
Reviewed-on: https://github.com/flang-compiler/f18/pull/531
Tree-same-pre-rewrite: false
2019-06-28 09:20:55 -07:00
peter klausler
7d33b8529a [flang] Refine implicit typing of functions and prevent invalid conversion to objects
Original-commit: flang-compiler/f18@a90f752c20
Reviewed-on: https://github.com/flang-compiler/f18/pull/531
Tree-same-pre-rewrite: false
2019-06-28 09:20:46 -07:00
peter klausler
6c5487dfca [flang] Fix bad visitor type
Original-commit: flang-compiler/f18@968b24c033
Reviewed-on: https://github.com/flang-compiler/f18/pull/531
Tree-same-pre-rewrite: false
2019-06-28 09:16:55 -07:00
peter klausler
ad668e1a8b [flang] Fix regression in constant array sections
Original-commit: flang-compiler/f18@595be8defa
Reviewed-on: https://github.com/flang-compiler/f18/pull/531
Tree-same-pre-rewrite: false
2019-06-28 09:16:52 -07:00
peter klausler
e012a13a0d [flang] Make unparsing of typed Exprs conditional when unparsing to pgf90
Original-commit: flang-compiler/f18@3b79c290cd
Reviewed-on: https://github.com/flang-compiler/f18/pull/531
Tree-same-pre-rewrite: false
2019-06-28 09:16:50 -07:00
peter klausler
ba780030c7 [flang] Fix function call implicit typing after recent merge
Original-commit: flang-compiler/f18@f91779c79a
Reviewed-on: https://github.com/flang-compiler/f18/pull/531
Tree-same-pre-rewrite: false
2019-06-28 09:16:49 -07:00
peter klausler
00e128e42a [flang] Refactor SymbolOrComponent typedef to NamedEntity class
Original-commit: flang-compiler/f18@e8ec4b88bd
Reviewed-on: https://github.com/flang-compiler/f18/pull/531
Tree-same-pre-rewrite: false
2019-06-28 09:16:47 -07:00
peter klausler
b5fa75763e [flang] work around bad module file output for visibility attrs on subprograms
Original-commit: flang-compiler/f18@0970cccc4e
Reviewed-on: https://github.com/flang-compiler/f18/pull/531
Tree-same-pre-rewrite: false
2019-06-28 09:16:47 -07:00