-
Notifications
You must be signed in to change notification settings - Fork 111
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
If the fpm testsuite is compiled with gfortran's -fcheck=all
flag, several runtime allocation errors arise from the dependency checking testsuite:
# Testing: fpm_module_dependencies
# Starting library-module-use ... (1/15)
At line 819 of file /Users/federico/Documents/GitHub/fpm/src/fpm_targets.f90
Fortran runtime error: Allocatable actual argument 'model' is not allocated
Error termination. Backtrace:
The reason is that some routines e.g. add_target
have non-allocated allocatable
variables of model
in non-optional dummy arguments:
Lines 247 to 251 in 5efb9e0
call add_target(targets,package=model%packages(j)%name,source = sources(i), & | |
type = FPM_TARGET_CPP_OBJECT, & | |
output_name = get_object_name(sources(i)), & | |
macros = model%packages(j)%macros, & | |
version = model%packages(j)%version) |
Lines 400 to 408 in 5efb9e0
subroutine add_target(targets,package,type,output_name,source,link_libraries, macros, version) | |
type(build_target_ptr), allocatable, intent(inout) :: targets(:) | |
character(*), intent(in) :: package | |
integer, intent(in) :: type | |
character(*), intent(in) :: output_name | |
type(srcfile_t), intent(in), optional :: source | |
type(string_t), intent(in), optional :: link_libraries(:) | |
type(string_t), intent(in), optional :: macros(:) | |
character(*), intent(in), optional :: version |
Expected Behaviour
Should not crash
Version of fpm
0.7.0
Platform and Architecture
MacOS
Additional Information
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working