Skip to content

Commit e4a65fa

Browse files
committed
Make some toml tests pass with ifx
1 parent 10bb637 commit e4a65fa

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

src/fpm/dependency.f90

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1284,7 +1284,10 @@ logical function dependency_node_is_same(this,that)
12841284
if (.not.(this%done .eqv.other%done)) return
12851285
if (.not.(this%update.eqv.other%update)) return
12861286
if (.not.(this%cached.eqv.other%cached)) return
1287+
1288+
if (.not. allocated(this%proj_dir) .eqv. allocated(other%proj_dir)) return
12871289
if (.not.(this%proj_dir==other%proj_dir)) return
1290+
if (.not. allocated(this%revision) .eqv. allocated(other%revision)) return
12881291
if (.not.(this%revision==other%revision)) return
12891292

12901293
if (.not.(allocated(this%version).eqv.allocated(other%version))) return
@@ -1475,7 +1478,10 @@ subroutine tree_dump_to_toml(self, table, error)
14751478

14761479
!> Because dependencies are named, fallback if this has no name
14771480
!> So, serialization will work regardless of size(self%dep) == self%ndep
1478-
if (len_trim(dep%name)==0) then
1481+
if (.not. allocated(dep%name)) then
1482+
write(unnamed,1) ii
1483+
call add_table(ptr_deps, trim(unnamed), ptr)
1484+
else if (len_trim(dep%name)==0) then
14791485
write(unnamed,1) ii
14801486
call add_table(ptr_deps, trim(unnamed), ptr)
14811487
else

src/fpm/git.f90

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ logical function git_is_same(this,that)
149149

150150
select type (other=>that)
151151
type is (git_target_t)
152+
if (.not. allocated(this%url) .or. .not. allocated(other%url) .or. &
153+
.not. allocated(this%object) .or. .not. allocated(other%object)) return
152154

153155
if (.not.(this%descriptor==other%descriptor)) return
154156
if (.not.(this%url==other%url)) return

src/fpm/manifest/dependency.f90

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,11 @@ logical function dependency_is_same(this,that)
411411
select type (other=>that)
412412
type is (dependency_config_t)
413413

414+
if (.not. allocated(this%name) .or. .not. allocated(other%name)) return
414415
if (.not.(this%name==other%name)) return
416+
if (.not. allocated(this%path) .or. .not. allocated(other%path)) return
415417
if (.not.(this%path==other%path)) return
418+
if (.not. allocated(this%namespace) .or. .not. allocated(other%namespace)) return
416419
if (.not.(this%namespace==other%namespace)) return
417420
if (.not.(allocated(this%requested_version).eqv.allocated(other%requested_version))) return
418421
if (allocated(this%requested_version)) then

0 commit comments

Comments
 (0)