Commit graph

2128 commits

Author SHA1 Message Date
Tim Keith 8269bf6c8c [flang] Merge pull request flang-compiler/f18#591 from flang-compiler/tsk-issue586
Merge use-associated generics

Original-commit: flang-compiler/f18@e0b28015f1
Reviewed-on: https://github.com/flang-compiler/f18/pull/591
2019-07-24 06:18:36 -07:00
Tim Keith 64a8b9b3d3 [flang] Merge use-associated generics
When the same generic is use-associated from two different modules,
they must be merged together into a symbol with GenericDetails.

After that merger, if there is a use association of the same name
with a non-generic we have to report an error. So save the UseDetails
from the original USE in GenericDetails so we can create the
appropriate UseErrorDetails.

Fixes flang-compiler/f18#586.

Original-commit: flang-compiler/f18@5067345f70
Reviewed-on: https://github.com/flang-compiler/f18/pull/591
2019-07-24 06:14:42 -07:00
jeanPerier 7d8a0733c3 [flang] Merge pull request flang-compiler/f18#600 from flang-compiler/jpr-fix-598
Avoid interference between different construct association in name resolutions

Original-commit: flang-compiler/f18@28c32a7538
Reviewed-on: https://github.com/flang-compiler/f18/pull/600
2019-07-24 02:40:30 -07:00
Jean Perier ee845d4c64 [flang] Address comment: make CHECK test more explicit
Original-commit: flang-compiler/f18@a346462676
Reviewed-on: https://github.com/flang-compiler/f18/pull/600
2019-07-24 02:06:31 -07:00
Jean Perier 8ed0f4c806 [flang] Avoid interference between different association variable resoltions
Fix issue 598 and related issues.

Transform resolve-names.cc ConstructVisitor association_ member into a
stack so that different association construct (select-type, select-rank,
change-team, associate) imbrication/succession do not interfere with each
other leading to wrong erronous symbol resolution.

Original-commit: flang-compiler/f18@5781f29ed6
Reviewed-on: https://github.com/flang-compiler/f18/pull/600
Tree-same-pre-rewrite: false
2019-07-23 08:57:40 -07:00
Peter Klausler 165b0b8053 [flang] Merge pull request flang-compiler/f18#601 from flang-compiler/pmk-fixes
Fix legal pointer target test

Original-commit: flang-compiler/f18@751cb64ae9
Reviewed-on: https://github.com/flang-compiler/f18/pull/601
2019-07-23 15:12:29 -07:00
peter klausler ee23b2fbbd [flang] Do not remove things from .gitignore
Original-commit: flang-compiler/f18@27c896ea0b
Reviewed-on: https://github.com/flang-compiler/f18/pull/601
2019-07-23 14:57:46 -07:00
peter klausler a65661d5e6 [flang] Review comment
Original-commit: flang-compiler/f18@784d2cc6df
Reviewed-on: https://github.com/flang-compiler/f18/pull/601
Tree-same-pre-rewrite: false
2019-07-23 14:07:49 -07:00
peter klausler 353202bdcf [flang] Fix handling of ALLOCATABLE components in GetLastTarget
Original-commit: flang-compiler/f18@6b3b404bdc
Reviewed-on: https://github.com/flang-compiler/f18/pull/601
Tree-same-pre-rewrite: false
2019-07-23 13:42:06 -07:00
peter klausler 3f753af937 [flang] Fix pointer target check
Original-commit: flang-compiler/f18@8249bc8cd4
Reviewed-on: https://github.com/flang-compiler/f18/pull/601
Tree-same-pre-rewrite: false
2019-07-23 12:35:56 -07:00
peter klausler 00861127ac [flang] Improve comments
Original-commit: flang-compiler/f18@277fb1cc91
Reviewed-on: https://github.com/flang-compiler/f18/pull/601
Tree-same-pre-rewrite: false
2019-07-23 11:45:55 -07:00
peter klausler e4945e5d09 [flang] Improve expression traversal, use it more for tools
Original-commit: flang-compiler/f18@4980b928bc
Reviewed-on: https://github.com/flang-compiler/f18/pull/601
Tree-same-pre-rewrite: false
2019-07-23 10:55:56 -07:00
peter klausler daf9eb09d4 [flang] Add root/ to .gitignore, remove old build-specific directory names
Original-commit: flang-compiler/f18@d5843aa319
Reviewed-on: https://github.com/flang-compiler/f18/pull/601
Tree-same-pre-rewrite: false
2019-07-22 14:06:06 -07:00
peter klausler 3028ecf0b8 [flang] Reimplement GetLastSymbol with expression visitor
Original-commit: flang-compiler/f18@a996751e97
Reviewed-on: https://github.com/flang-compiler/f18/pull/601
Tree-same-pre-rewrite: false
2019-07-22 14:05:33 -07:00
peter klausler 3f00257e3b [flang] Fix crash
Original-commit: flang-compiler/f18@e00864f17e
Reviewed-on: https://github.com/flang-compiler/f18/pull/601
Tree-same-pre-rewrite: false
2019-07-22 14:05:07 -07:00
jeanPerier 953d93dbe8 [flang] Merge pull request flang-compiler/f18#544 from flang-compiler/jpr-reshape-only-folding
RESHAPE without shared runtime/front-end descriptor API

Original-commit: flang-compiler/f18@24856b8238
Reviewed-on: https://github.com/flang-compiler/f18/pull/544

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

flang-compiler/f18@2ec1d85d39 Implement RESHAPE folding on Constant<T> only
flang-compiler/f18@5394630539 Enable RESHAPE folding tests
flang-compiler/f18@83b2b86253 Answer review comment + Add a common path for intrsinic function folding before specializing the folding per type. + Make reshape folding return an "invalid" intrinsic after errors are met so that warnings do not get re-generated. + Misc style changes
flang-compiler/f18@2e5c29f280 add missing file to previous commit...
flang-compiler/f18@9bd5ad9875 Document issue #518 workaround
flang-compiler/f18@a4f8f51831 Go back to clang-format version 7.01
flang-compiler/f18@e871e58a52 answer comment regarding naming and interface
flang-compiler/f18@145c7c1ece Merge branch 'master' into jpr-reshape-only-folding Too many logical conflicts to simply rebase.
2019-07-23 05:36:17 -07:00
Peter Klausler 1cdcfbcad3 [flang] Merge pull request flang-compiler/f18#597 from flang-compiler/pmk-fixes-2
Fix a couple of crashes on tests, refactor Constant bounds information a bit

Original-commit: flang-compiler/f18@e980d64137
Reviewed-on: https://github.com/flang-compiler/f18/pull/597
2019-07-22 09:34:19 -07:00
peter klausler 31ffd34a02 [flang] Avoid crash on bad subscript, refactor Constant bounds a bit
Original-commit: flang-compiler/f18@c2e01e8386
Reviewed-on: https://github.com/flang-compiler/f18/pull/597
2019-07-19 16:17:07 -07:00
peter klausler 7c03f03c67 [flang] Do not add invalid subscript triple to whole assumed-size array reference
Original-commit: flang-compiler/f18@71c134a552
Reviewed-on: https://github.com/flang-compiler/f18/pull/597
Tree-same-pre-rewrite: false
2019-07-19 14:49:25 -07:00
Peter Klausler 52df04445e [flang] Merge pull request flang-compiler/f18#595 from flang-compiler/pmk-fixes
Avoid crashing in check-allocate.cc on CLASS(*) source

Original-commit: flang-compiler/f18@95f76866e4
Reviewed-on: https://github.com/flang-compiler/f18/pull/595
2019-07-22 09:33:57 -07:00
peter klausler 978b246229 [flang] Avoid crashing in check-allocate.cc on CLASS(*)
Original-commit: flang-compiler/f18@7ba4275998
Reviewed-on: https://github.com/flang-compiler/f18/pull/595
2019-07-19 13:50:39 -07:00
jeanPerier 1199ce264e [flang] Merge pull request flang-compiler/f18#593 from flang-compiler/jpr-fix-515
Fix issue flang-compiler/f18#515

Original-commit: flang-compiler/f18@415d6d6110
Reviewed-on: https://github.com/flang-compiler/f18/pull/593
2019-07-22 01:36:16 -07:00
Jean Perier 815cc42e9a [flang] Fix issue flang-compiler/f18#515
Do not emit "is not a branch target" warning for old action-stmt just
because these action-stmt are depreciated. The depreciated aspect of
these features is already handled via -Mstandard.

Original-commit: flang-compiler/f18@f7d124d8cd
Reviewed-on: https://github.com/flang-compiler/f18/pull/593
2019-07-19 07:20:47 -07:00
Peter Klausler 88cb878bbc [flang] Merge pull request flang-compiler/f18#590 from flang-compiler/pmk-fixes
Roll up some fixes and extensions

Original-commit: flang-compiler/f18@561719d276
Reviewed-on: https://github.com/flang-compiler/f18/pull/590
2019-07-19 10:49:00 -07:00
peter klausler 645d98719d [flang] address review comment
Original-commit: flang-compiler/f18@7012b61786
Reviewed-on: https://github.com/flang-compiler/f18/pull/590
2019-07-19 10:37:55 -07:00
peter klausler 834c4d6bc4 [flang] document a non-extension
Original-commit: flang-compiler/f18@625daf5218
Reviewed-on: https://github.com/flang-compiler/f18/pull/590
Tree-same-pre-rewrite: false
2019-07-18 15:26:17 -07:00
peter klausler 6da0d748d5 [flang] Accept NULL() in struct constructor for ALLOCATABLE component
Original-commit: flang-compiler/f18@7aee0e4852
Reviewed-on: https://github.com/flang-compiler/f18/pull/590
Tree-same-pre-rewrite: false
2019-07-18 15:08:50 -07:00
peter klausler 14f693fb94 [flang] Document intent to not support modules & programs whose names conflict with contents
Original-commit: flang-compiler/f18@e23c481911
Reviewed-on: https://github.com/flang-compiler/f18/pull/590
Tree-same-pre-rewrite: false
2019-07-18 13:57:21 -07:00
peter klausler 85db492ea0 [flang] Support SELECTED_CHAR_KIND("DEFAULT")
Original-commit: flang-compiler/f18@c05c96c474
Reviewed-on: https://github.com/flang-compiler/f18/pull/590
Tree-same-pre-rewrite: false
2019-07-17 15:58:28 -07:00
peter klausler 99ec2fa834 [flang] Document BOZ initializers for REAL
Original-commit: flang-compiler/f18@d72d5feb01
Reviewed-on: https://github.com/flang-compiler/f18/pull/590
Tree-same-pre-rewrite: false
2019-07-17 14:29:11 -07:00
peter klausler 3dbc1b7abe [flang] Allow BOZ initializers on REAL parameters, too.
Original-commit: flang-compiler/f18@e1ab6b316e
Reviewed-on: https://github.com/flang-compiler/f18/pull/590
Tree-same-pre-rewrite: false
2019-07-17 14:26:35 -07:00
peter klausler 8187bc12cd [flang] Silence spurious overflow warning on negative int4->int2 folding
Original-commit: flang-compiler/f18@5f1cad3911
Reviewed-on: https://github.com/flang-compiler/f18/pull/590
Tree-same-pre-rewrite: false
2019-07-17 14:14:09 -07:00
peter klausler 2a3f3163e6 [flang] Extension: relax "same kind" rules on some intrinsics
Original-commit: flang-compiler/f18@ce5130f84b
Reviewed-on: https://github.com/flang-compiler/f18/pull/590
Tree-same-pre-rewrite: false
2019-07-17 12:51:52 -07:00
Peter Klausler 5b91eceb69 [flang] Merge pull request flang-compiler/f18#580 from flang-compiler/pmk-fixes
Allow forward references to procedure interfaces in derived types (fi…

Original-commit: flang-compiler/f18@8c63aa9497
Reviewed-on: https://github.com/flang-compiler/f18/pull/580
2019-07-16 16:05:56 -07:00
peter klausler 2f49ddeefe [flang] review comment
Original-commit: flang-compiler/f18@f5c46291ec
Reviewed-on: https://github.com/flang-compiler/f18/pull/580
2019-07-16 15:57:55 -07:00
peter klausler 40fb469233 [flang] Fix bug flang-compiler/f18#579 while here
Original-commit: flang-compiler/f18@eefbcdcb54
Reviewed-on: https://github.com/flang-compiler/f18/pull/580
Tree-same-pre-rewrite: false
2019-07-16 15:57:52 -07:00
peter klausler 258e8bda21 [flang] Allow forward references to procedure interfaces in derived types (fixing flang-compiler/f18#571 more)
Original-commit: flang-compiler/f18@c1aeeae776
Reviewed-on: https://github.com/flang-compiler/f18/pull/580
Tree-same-pre-rewrite: false
2019-07-16 15:57:29 -07:00
Tim Keith 721a2c55db [flang] Merge pull request flang-compiler/f18#577 from flang-compiler/tsk-issue572
Allow forward reference to binding name in type-bound generic

Original-commit: flang-compiler/f18@3ed8a8a356
Reviewed-on: https://github.com/flang-compiler/f18/pull/577
2019-07-16 11:09:36 -07:00
Tim Keith 16356d58bc [flang] Allow forward reference to binding name in type-bound generic
Type-bound generic statements can have binding names that refer to
bindings that occur later in the type. So save a map of generic to
binding names and process them when we get to the end of the
type-bound procedure part. This is similar to how specific procedures
of generic identifiers are handled.

Also detect duplicate binding names for a type-bound generic.

Fixes issue flang-compiler/f18#572.

Original-commit: flang-compiler/f18@d58bb77cfa
Reviewed-on: https://github.com/flang-compiler/f18/pull/577
2019-07-15 17:09:03 -07:00
Peter Klausler 66a7639f49 [flang] Merge pull request flang-compiler/f18#565 from flang-compiler/pmk-fixes
When creating symbols for intrinsics, do not put them in the global s…

Original-commit: flang-compiler/f18@38789942a7
Reviewed-on: https://github.com/flang-compiler/f18/pull/565
2019-07-16 10:55:27 -07:00
peter klausler d3c8af484a [flang] Fix typo
Original-commit: flang-compiler/f18@f7d9f5bd7c
Reviewed-on: https://github.com/flang-compiler/f18/pull/565
2019-07-16 10:53:39 -07:00
peter klausler 367d3eec60 [flang] Address review comment
Original-commit: flang-compiler/f18@5d6749c3d4
Reviewed-on: https://github.com/flang-compiler/f18/pull/565
Tree-same-pre-rewrite: false
2019-07-16 09:58:55 -07:00
peter klausler 8f40dbcd19 [flang] Fix flang-compiler/f18#571: forward reference to interface
Original-commit: flang-compiler/f18@5e00d1699c
Reviewed-on: https://github.com/flang-compiler/f18/pull/565
Tree-same-pre-rewrite: false
2019-07-16 09:58:53 -07:00
peter klausler 8c0aa90185 [flang] Handle USE and host associations in characteristics analysis
Original-commit: flang-compiler/f18@1625f72e35
Reviewed-on: https://github.com/flang-compiler/f18/pull/565
Tree-same-pre-rewrite: false
2019-07-16 09:58:51 -07:00
peter klausler 29004ece95 [flang] fix crash in ASSOCIATED() intrinsic with two arguments
Original-commit: flang-compiler/f18@1a393ff43b
Reviewed-on: https://github.com/flang-compiler/f18/pull/565
Tree-same-pre-rewrite: false
2019-07-16 09:58:48 -07:00
peter klausler fc638c021c [flang] Make warning about exponent letters more useful
Original-commit: flang-compiler/f18@9c9aaacd7b
Reviewed-on: https://github.com/flang-compiler/f18/pull/565
Tree-same-pre-rewrite: false
2019-07-16 09:58:47 -07:00
peter klausler 375dcec348 [flang] When creating symbols for intrinsics, do not put them in the global scope, and do not emit them to module files.
Original-commit: flang-compiler/f18@9907026609
Reviewed-on: https://github.com/flang-compiler/f18/pull/565
Tree-same-pre-rewrite: false
2019-07-16 09:58:46 -07:00
jeanPerier 64206257a0 [flang] Merge pull request flang-compiler/f18#552 from flang-compiler/jpr-fix-518
Fix issues flang-compiler/f18#517, flang-compiler/f18#518, and flang-compiler/f18#546

Original-commit: flang-compiler/f18@bc3c549d48
Reviewed-on: https://github.com/flang-compiler/f18/pull/552
2019-07-16 02:20:08 -07:00
Jean Perier 31cab04be7 [flang] Add fix for issue flang-compiler/f18#517
Original-commit: flang-compiler/f18@d9bb6890d7
Reviewed-on: https://github.com/flang-compiler/f18/pull/552
2019-07-10 08:44:05 -07:00
Jean Perier 93e05161ea [flang] Answer comment: split cannondo new tests
Original-commit: flang-compiler/f18@7ebf7f72b0
Reviewed-on: https://github.com/flang-compiler/f18/pull/552
Tree-same-pre-rewrite: false
2019-07-10 03:53:25 -07:00