2016-10-23 Paul Thomas <pault@gcc.gnu.org>
commitb0cb70c025ac91a7399318963114adb1848a50a6
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 23 Oct 2016 18:09:14 +0000 (23 18:09 +0000)
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 23 Oct 2016 18:09:14 +0000 (23 18:09 +0000)
treefbc0891231c59b5f11319981f233231b8a38dc77
parent50703e6fe56095d300ab12de77679ea190b85802
2016-10-23  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/69834
* class.c (gfc_find_derived_vtab): Obtain the gsymbol for the
derived type's module. If the gsymbol is present and the top
level namespace corresponds to a module, use the gsymbol name
space. In the search to see if the vtable exists, try the gsym
namespace first.
* dump-parse-tree (show_code_node): Modify select case dump to
show select type construct.
* resolve.c (build_loc_call): New function.
(resolve_select_type): Add check for repeated type is cases.
Retain selector expression and use it later instead of expr1.
Exclude deferred length TYPE IS cases and emit error message.
Store the address for the vtable in the 'low' expression and
the hash value in the 'high' expression, for each case. Do not
call resolve_select.
* trans.c(trans_code) : Call gfc_trans_select_type.
* trans-stmt.c (gfc_trans_select_type_cases): New function.
(gfc_trans_select_type): New function.
* trans-stmt.h : Add prototype for gfc_trans_select_type.

2016-10-23  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/69834
* gfortran.dg/select_type_1.f03: Change error for overlapping
TYPE IS cases.
* gfortran.dg/select_type_36.f03: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241450 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/fortran/ChangeLog
gcc/fortran/class.c
gcc/fortran/dump-parse-tree.c
gcc/fortran/resolve.c
gcc/fortran/trans-expr.c
gcc/fortran/trans-stmt.c
gcc/fortran/trans-stmt.h
gcc/fortran/trans.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/select_type_1.f03
gcc/testsuite/gfortran.dg/select_type_36.f03 [new file with mode: 0644]