Skip to content

Commit f8b0217

Browse files
committed
initialize allocatable strings before using in a comparison
1 parent 5617e65 commit f8b0217

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/fpm_sources.f90

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
!># Discovery of sources
22
!>
3-
!> This module implements subroutines for building a list of
4-
!> `[[srcfile_t]]` objects by looking for source files in the filesystem.
3+
!> This module implements subroutines for building a list of
4+
!> `[[srcfile_t]]` objects by looking for source files in the filesystem.
55
!>
66
module fpm_sources
77
use fpm_error, only: error_t
@@ -158,7 +158,7 @@ subroutine add_executable_sources(sources,executables,scope,auto_discover,error)
158158
if (basename(sources(j)%file_name,suffix=.true.) == executables(i)%main .and.&
159159
canon_path(dirname(sources(j)%file_name)) == &
160160
canon_path(executables(i)%source_dir) ) then
161-
161+
162162
sources(j)%exe_name = executables(i)%name
163163
if (allocated(executables(i)%link)) then
164164
sources(j)%link_libraries = executables(i)%link
@@ -176,7 +176,7 @@ subroutine add_executable_sources(sources,executables,scope,auto_discover,error)
176176
exe_source%link_libraries = executables(i)%link
177177
end if
178178
exe_source%unit_scope = scope
179-
179+
180180
if (allocated(error)) return
181181

182182
if (.not.allocated(sources)) then
@@ -200,6 +200,11 @@ subroutine get_executable_source_dirs(exe_dirs,executables)
200200
integer :: i, n
201201

202202
n = 0
203+
204+
do i=1,size(executables)
205+
dirs_temp(i)%s=' '
206+
enddo
207+
203208
do i=1,size(executables)
204209
if (.not.(executables(i)%source_dir .in. dirs_temp)) then
205210

0 commit comments

Comments
 (0)