llvm/flang/test/semantics
Tim Keith 507121f63f [flang] Process SeparateModuleSubprogram during name resolution
When a SeparateModuleSubprogram is encountered, check that there is a
corresponding declaration in the current module/submodule or an ancestor.
When it's the current program unit, special handling is required to
avoid trying to declare it again.

Module subprograms with the `MODULE` prefix are handled similarly.
The `hasModulePrefix` flag is passed in to `BeginSubprogram` to
distinguish this case.

Extract common part of `Post(SubroutineStmt)` and `Post(FunctionStmt)` into
`PostSubprogramStmt`. Add code there to ensure that separate module
procedures do not have `EXTERNAL` set. This requires a fix to `ModFileWriter`
to correctly decide when a subprogram is declared in an interface block.

Extract `WalkSubprogramPart` into a separate function. It walks the
internal or module subprograms collecting their names. It is needed to
handle separate module subprograms.

Original-commit: flang-compiler/f18@339b65f251
Reviewed-on: https://github.com/flang-compiler/f18/pull/218
Tree-same-pre-rewrite: false
2018-10-26 07:34:50 -07:00
..
canondo01.f90 [flang] rework non-block DO loop canonicalization 2018-10-04 13:52:42 -07:00
canondo02.f90 [flang] rework non-block DO loop canonicalization 2018-10-04 13:52:42 -07:00
canondo03.f90 [flang] rework non-block DO loop canonicalization 2018-10-04 13:52:42 -07:00
canondo04.f90 [flang] Parse nonlabel DO within label DO better; add -fdebug-semantics; more testing 2018-10-04 13:54:07 -07:00
canondo05.f90 [flang] Add OpenMP annotated loops example as a test 2018-10-24 12:22:42 -07:00
canondo06.f90 [flang] add openmp simd test 2018-10-24 12:22:42 -07:00
CMakeLists.txt [flang] Process SeparateModuleSubprogram during name resolution 2018-10-26 07:34:50 -07:00
doconcurrent01.f90 [flang] enable the IEEE_GET_FLAG test 2018-10-24 12:22:42 -07:00
doconcurrent02.f90 [flang] Add more constraint checking for DO CONCURRENT. 2018-10-24 12:22:42 -07:00
doconcurrent03.f90 [flang] Fix conflicts 2018-10-24 12:22:42 -07:00
doconcurrent04.f90 [flang] add C1120, C1122 and placehokders for C1006, C1121, and C1123 2018-10-24 12:22:42 -07:00
implicit01.f90 [flang] Add copyright notices. 2018-05-01 12:50:34 -07:00
implicit02.f90 [flang] Add copyright notices. 2018-05-01 12:50:34 -07:00
implicit03.f90 [flang] Add copyright notices. 2018-05-01 12:50:34 -07:00
implicit04.f90 [flang] Add copyright notices. 2018-05-01 12:50:34 -07:00
implicit05.f90 [flang] Add copyright notices. 2018-05-01 12:50:34 -07:00
implicit06.f90 [flang] Add copyright notices. 2018-05-01 12:50:34 -07:00
implicit07.f90 [flang] Add support for BLOCK construct 2018-08-27 11:48:49 -07:00
implicit08.f90 [flang] Add support for BLOCK construct 2018-08-27 11:48:49 -07:00
label01.F90 [flang] Changes per the review comments. The majority of the changes are simply 2018-09-11 14:01:25 -07:00
label02.f90 [flang] Changes per the review comments. The majority of the changes are simply 2018-09-11 14:01:25 -07:00
label03.f90 [flang] Tweak the error messages to not use "here" like gcc does. 2018-10-24 11:03:49 -07:00
label04.f90 [flang] Tweak the error messages to not use "here" like gcc does. 2018-10-24 11:03:49 -07:00
label05.f90 [flang] Tweak the error messages to not use "here" like gcc does. 2018-10-24 11:03:49 -07:00
label06.f90 [flang] Tweak the error messages to not use "here" like gcc does. 2018-10-24 11:03:49 -07:00
label07.f90 [flang] Tweak the error messages to not use "here" like gcc does. 2018-10-24 11:03:49 -07:00
label08.f90 [flang] Tweak the error messages to not use "here" like gcc does. 2018-10-24 11:03:49 -07:00
label09.f90 [flang] Changes per the review comments. The majority of the changes are simply 2018-09-11 14:01:25 -07:00
label10.f90 [flang] Tweak the error messages to not use "here" like gcc does. 2018-10-24 11:03:49 -07:00
label11.f90 [flang] Tweak the error messages to not use "here" like gcc does. 2018-10-24 11:03:49 -07:00
label12.f90 [flang] add another resolve-label test for misplaced end do statement. 2018-10-24 12:22:42 -07:00
label13.f90 [flang] Fix conflicts 2018-10-24 12:22:42 -07:00
modfile01.f90 [flang] Simplify representation of intrinsic types 2018-09-11 17:33:42 -07:00
modfile02.f90 [flang] Simplify representation of intrinsic types 2018-09-11 17:33:42 -07:00
modfile03.f90 [flang] Simplify representation of intrinsic types 2018-09-11 17:33:42 -07:00
modfile04.f90 [flang] Simplify representation of intrinsic types 2018-09-11 17:33:42 -07:00
modfile05.f90 [flang] Simplify representation of intrinsic types 2018-09-11 17:33:42 -07:00
modfile06.f90 [flang] Simplify representation of intrinsic types 2018-09-11 17:33:42 -07:00
modfile07.f90 [flang] Simplify representation of intrinsic types 2018-09-11 17:33:42 -07:00
modfile08.f90 [flang] Simplify representation of intrinsic types 2018-09-11 17:33:42 -07:00
modfile09-a.f90 [flang] Simplify representation of intrinsic types 2018-09-11 17:33:42 -07:00
modfile09-b.f90 [flang] Simplify representation of intrinsic types 2018-09-11 17:33:42 -07:00
modfile09-c.f90 [flang] Simplify representation of intrinsic types 2018-09-11 17:33:42 -07:00
modfile09-d.f90 [flang] Simplify representation of intrinsic types 2018-09-11 17:33:42 -07:00
modfile10.f90 [flang] Simplify representation of intrinsic types 2018-09-11 17:33:42 -07:00
modfile11.f90 [flang] Simplify representation of intrinsic types 2018-09-11 17:33:42 -07:00
resolve01.f90 [flang] Miscellaneous name resolution 2018-09-10 12:20:42 -07:00
resolve02.f90 [flang] Support interface blocks. 2018-05-14 13:53:02 -07:00
resolve03.f90 [flang] Add copyright notices. 2018-05-01 12:50:34 -07:00
resolve04.f90 [flang] Add support for BLOCK construct 2018-08-27 11:48:49 -07:00
resolve05.f90 [flang] Add copyright notices. 2018-05-01 12:50:34 -07:00
resolve06.f90 [flang] Add copyright notices. 2018-05-01 12:50:34 -07:00
resolve07.f90 [flang] Add copyright notices. 2018-05-01 12:50:34 -07:00
resolve08.f90 [flang] Add copyright notices. 2018-05-01 12:50:34 -07:00
resolve09.f90 [flang] Fix problems determining object/function/subroutine 2018-09-22 08:05:46 -07:00
resolve10.f90 [flang] Support for USE statements. 2018-05-03 15:57:56 -07:00
resolve11.f90 [flang] Add copyright notices. 2018-05-01 12:50:34 -07:00
resolve12.f90 [flang] Implement reading of module files 2018-07-25 10:11:38 -07:00
resolve13.f90 [flang] Process procedure declarations and derived types. 2018-06-05 12:18:35 -07:00
resolve14.f90 [flang] Process procedure declarations and derived types. 2018-06-05 12:18:35 -07:00
resolve15.f90 [flang] Correctly resolve generics with forward references 2018-07-20 10:46:11 -07:00
resolve16.f90 [flang] Process procedure declarations and derived types. 2018-06-05 12:18:35 -07:00
resolve17.f90 [flang] Process procedure declarations and derived types. 2018-06-05 12:18:35 -07:00
resolve18.f90 [flang] More miscellaneous name resolution 2018-10-10 16:20:46 -07:00
resolve19.f90 [flang] Process procedure declarations and derived types. 2018-06-05 12:18:35 -07:00
resolve20.f90 [flang] Process procedure declarations and derived types. 2018-06-05 12:18:35 -07:00
resolve21.f90 [flang] Fix problems determining object/function/subroutine 2018-09-22 08:05:46 -07:00
resolve22.f90 [flang] Name resolution for derived types. 2018-06-22 08:21:19 -07:00
resolve23.f90 [flang] Name resolution for derived types. 2018-06-22 08:21:19 -07:00
resolve24.f90 [flang] Add missing copyright. 2018-07-05 10:36:18 -07:00
resolve25.f90 [flang] Correctly resolve generics with forward references 2018-07-20 10:46:11 -07:00
resolve26.f90 [flang] Add missing copyrights. 2018-08-22 16:05:53 -07:00
resolve27.f90 [flang] Add missing copyrights. 2018-08-22 16:05:53 -07:00
resolve28.f90 [flang] Implement host association and import statements 2018-08-22 16:05:06 -07:00
resolve29.f90 [flang] Implement host association and import statements 2018-08-22 16:05:06 -07:00
resolve30.f90 [flang] Small improvements to name resolution 2018-08-29 11:38:12 -07:00
resolve31.f90 [flang] Address review comments 2018-09-07 09:06:27 -07:00
resolve32.f90 [flang] More derived type name resolution 2018-09-06 08:01:49 -07:00
resolve33.f90 [flang] Resolve derived type parameters 2018-09-04 10:28:27 -07:00
resolve34.f90 [flang] Fix problems with extended derived types 2018-09-20 14:08:59 -07:00
resolve35.f90 [flang] More name resolution for construct entities 2018-10-18 09:06:11 -07:00
resolve36.f90 [flang] Process SeparateModuleSubprogram during name resolution 2018-10-26 07:34:50 -07:00
symbol01.f90 [flang] Simplify unparse-with-symbols.cc 2018-10-18 07:56:33 -07:00
symbol02.f90 [flang] Simplify unparse-with-symbols.cc 2018-10-18 07:56:33 -07:00
symbol03.f90 [flang] Simplify unparse-with-symbols.cc 2018-10-18 07:56:33 -07:00
symbol04.f90 [flang] Simplify unparse-with-symbols.cc 2018-10-18 07:56:33 -07:00
symbol05.f90 [flang] Simplify unparse-with-symbols.cc 2018-10-18 07:56:33 -07:00
symbol06.f90 [flang] Simplify unparse-with-symbols.cc 2018-10-18 07:56:33 -07:00
symbol07.f90 [flang] Simplify unparse-with-symbols.cc 2018-10-18 07:56:33 -07:00
symbol08.f90 [flang] Simplify unparse-with-symbols.cc 2018-10-18 07:56:33 -07:00
symbol09.f90 [flang] More name resolution for construct entities 2018-10-18 09:06:11 -07:00
test_any.sh [flang] Parse nonlabel DO within label DO better; add -fdebug-semantics; more testing 2018-10-04 13:54:07 -07:00
test_errors.sh [flang] More miscellaneous name resolution 2018-10-10 16:20:46 -07:00
test_modfile.sh [flang] Simplify representation of intrinsic types 2018-09-11 17:33:42 -07:00
test_symbols.sh [flang] Fix test script portability problems. 2018-07-17 16:48:50 -07:00