! Return a variable by character key
FUNCTION get_var( c_key )
CHARACTER(LEN=jp_var_name_max_len), INTENT(IN) :: c_key
TYPE(fvar_typ), POINTER :: get_var
CLASS(*), POINTER :: this=>null()
INTEGER :: ilen
ilen = LEN(c_key)
CALL gvars_list%get( c_key(1:MIN(ilen, jp_var_name_max_len)), this )
SELECT TYPE(self => this)
TYPE IS (fvar_typ)
get_var => self
CLASS DEFAULT
CALL abort
END SELECT
END FUNCTION get_var
and we get an index-out-of-range because we expect a TYPE or CLASS declaration to always have an associated Fortran2003.Type_Name. We need to fix this at line 1532 of psyir/frontend/fparser2.py.
This has been 'fixed' in #1520 - class declarations are now captured as UnknownFortranType. #1504 remains open for us to discuss whether we should/need to do better than this.
NEMOVAR has the following function:
and we get an index-out-of-range because we expect a TYPE or CLASS declaration to always have an associated
Fortran2003.Type_Name
. We need to fix this at line 1532 of psyir/frontend/fparser2.py.