Skip to content

Commit 7b035fd

Browse files
committed
fix Intel error on unallocated character array
1 parent 99543ae commit 7b035fd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/fpm/manifest/preprocess.f90

+5-3
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ subroutine add_config(this,that)
253253
class(preprocess_config_t), intent(inout) :: this
254254
type(preprocess_config_t), intent(in) :: that
255255

256-
if (.not.that%name=="cpp") then
256+
if (.not.that%is_cpp()) then
257257
write(stderr, '(a)') 'Warning: Preprocessor ' // that%name // &
258258
' is not supported; will ignore it'
259259
return
@@ -293,13 +293,15 @@ end subroutine add_config
293293
! Check cpp
294294
logical function is_cpp(this)
295295
class(preprocess_config_t), intent(in) :: this
296-
is_cpp = this%name == "cpp"
296+
is_cpp = .false.
297+
if (allocated(this%name)) is_cpp = this%name == "cpp"
297298
end function is_cpp
298299

299300
! Check cpp
300301
logical function is_fypp(this)
301302
class(preprocess_config_t), intent(in) :: this
302-
is_fypp = this%name == "fypp"
303+
is_fypp = .false.
304+
if (allocated(this%name)) is_fypp = this%name == "fypp"
303305
end function is_fypp
304306

305307
end module fpm_manifest_preprocess

0 commit comments

Comments
 (0)