-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Labels
bugFor issues describing bugs, or PRs fixing bugsFor issues describing bugs, or PRs fixing bugs
Description
Description
ccpp_fortran_to_metadata.py crashes with TypeError: sequence item 0: expected str instance, ParseSyntaxError found when parsing a module with a variable declaration that triggers a
ParseSyntaxError:
Traceback (most recent call last):
File "...ccpp_fortran_to_metadata.py", line 248, in <module>
_main_func()
File "...ccpp_fortran_to_metadata.py", line 241, in _main_func
_ = parse_fortran_files(fort_files, run_env,
File "...ccpp_fortran_to_metadata.py", line 185, in parse_fortran_files
ftables, _ = parse_fortran_file(filename, run_env)
File "...scripts/fortran_tools/parse_fortran_file.py", line 1063, in parse_fortran_file
statements, ptables, additional_routines = parse_module(pobj, statements, run_env)
File "...scripts/fortran_tools/parse_fortran_file.py", line 1036, in parse_module
raise CCPPError('\n'.join(errors))
TypeError: sequence item 0: expected str instance, ParseSyntaxError found
Steps to Reproduce
On latest develop
- Create a Fortran file with a module-level DDT variable with integer dimensions that triggers the error
module fruit_basket
implicit none
!> \section arg_table_fruit_basket Argument Table
!! \htmlinclude arg_table_fruit_basket.html
integer, parameter :: N_FRUITS = 10
type :: banana_t
real :: ripeness
end type banana_t
type(banana_t) :: bananas(0:N_FRUITS)
end module fruit_basket- Run
ccpp_fortran_to_metadata.py - Script crashes with
TypeErrorinstead of reporting the parse error.
PR forthcoming. The expected fix will allow for the correct error
bananas: '0:N_FRUITS' is an invalid dimension name; integer dimension indices not supported, at ...module_with_ddt_var.F90:13
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugFor issues describing bugs, or PRs fixing bugsFor issues describing bugs, or PRs fixing bugs