Skip to content

Commit 826b182

Browse files
committed
fix unallocated preprocess in test
1 parent e29f394 commit 826b182

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

src/fpm/dependency.f90

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,16 +1223,18 @@ logical function dependency_has_changed(cached, manifest, verbosity, iunit) resu
12231223
if (verbosity > 1) write (iunit, out_fmt) "PROJECT DIR has changed presence "
12241224
end if
12251225
if (allocated(cached%preprocess) .eqv. allocated(manifest%preprocess)) then
1226-
if (size(cached%preprocess) /= size(manifest%preprocess)) then
1227-
if (verbosity > 1) write (iunit, out_fmt) "PREPROCESS has changed size"
1228-
return
1229-
end if
1230-
do ip=1,size(cached%preprocess)
1231-
if (.not.(cached%preprocess(ip) == manifest%preprocess(ip))) then
1232-
if (verbosity > 1) write (iunit, out_fmt) "PREPROCESS config has changed"
1226+
if (allocated(cached%preprocess)) then
1227+
if (size(cached%preprocess) /= size(manifest%preprocess)) then
1228+
if (verbosity > 1) write (iunit, out_fmt) "PREPROCESS has changed size"
12331229
return
1234-
end if
1235-
end do
1230+
end if
1231+
do ip=1,size(cached%preprocess)
1232+
if (.not.(cached%preprocess(ip) == manifest%preprocess(ip))) then
1233+
if (verbosity > 1) write (iunit, out_fmt) "PREPROCESS config has changed"
1234+
return
1235+
end if
1236+
end do
1237+
endif
12361238
else
12371239
if (verbosity > 1) write (iunit, out_fmt) "PREPROCESS has changed presence "
12381240
return

0 commit comments

Comments
 (0)