llvm/flang/test/semantics
Tim Keith 3133c9e7e2 [flang] Fix problems with extended derived types
When looking for a component name in a derived type, also look in the
parent type. Before adding a component to a derived type, report an
error if it already has one with that name. Check that components are
accessible when they are accessed.

Add the "parent component" to derived types (i.e. a component with the
same name as the parent type). The symbol is marked with the
`ParentComp` flag so we can avoid writing it to `.mod` files.

Add calls to `add_occurrence()` so that those particular instances of
`parser::Name` get their symbol set.

Change `DeclareObjectEntity` and `DeclareProcEntity` to use `SourceName` as
the name passed in rather than `parser::Name`.

Fix some problems in `unparse-with-symbols.cc` on statements that both
define and reference names.

Fixes flang-compiler/f18#187.

Original-commit: flang-compiler/f18@664b9627f2
Reviewed-on: https://github.com/flang-compiler/f18/pull/192
Tree-same-pre-rewrite: false
2018-09-20 14:08:59 -07:00
..
CMakeLists.txt [flang] Fix problems with extended derived types 2018-09-20 14:08:59 -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] Changes per the review comments. The majority of the changes are simply 2018-09-11 14:01:25 -07:00
label04.f90 [flang] Changes per the review comments. The majority of the changes are simply 2018-09-11 14:01:25 -07:00
label05.f90 [flang] Changes per the review comments. The majority of the changes are simply 2018-09-11 14:01:25 -07:00
label06.f90 [flang] Changes per the review comments. The majority of the changes are simply 2018-09-11 14:01:25 -07:00
label07.f90 [flang] Changes per the review comments. The majority of the changes are simply 2018-09-11 14:01:25 -07:00
label08.f90 [flang] Changes per the review comments. The majority of the changes are simply 2018-09-11 14:01:25 -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] Changes per the review comments. The majority of the changes are simply 2018-09-11 14:01:25 -07:00
label11.f90 [flang] Add semantics checking for END xxx statements. 2018-09-13 15:46:17 -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] Ensure use of ObjectEntityDetails for data objects 2018-09-07 09:57:14 -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] Process procedure declarations and derived types. 2018-06-05 12:18:35 -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] Name resolution for derived types. 2018-06-22 08:21:19 -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
symbol01.f90 [flang] Simplify representation of intrinsic types 2018-09-11 17:33:42 -07:00
symbol02.f90 [flang] Ensure use of ObjectEntityDetails for data objects 2018-09-07 09:57:14 -07:00
symbol03.f90 [flang] Simplify representation of intrinsic types 2018-09-11 17:33:42 -07:00
symbol04.f90 [flang] Simplify representation of intrinsic types 2018-09-11 17:33:42 -07:00
symbol05.f90 [flang] Simplify representation of intrinsic types 2018-09-11 17:33:42 -07:00
symbol06.f90 [flang] Fix problems with extended derived types 2018-09-20 14:08:59 -07:00
test_any.sh [flang] Fix globbing bug and return variable not being set 2018-09-11 14:01:25 -07:00
test_errors.sh [flang] Implement reading of module files 2018-07-25 10:11:38 -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