File tree 1 file changed +18
-16
lines changed
1 file changed +18
-16
lines changed Original file line number Diff line number Diff line change @@ -615,25 +615,27 @@ recursive subroutine collect_used_modules(target)
615
615
end if
616
616
617
617
if (allocated (target % source)) then
618
- do j= 1 ,size (target % source% modules_used)
619
-
620
- if (.not. (target % source% modules_used(j)% s .in . modules_used)) then
621
-
622
- modules_used = [modules_used, target % source% modules_used(j)]
623
-
624
- ! Recurse into child submodules
625
- do k= 1 ,size (targets)
626
- if (allocated (targets(k)% ptr% source)) then
627
- if (targets(k)% ptr% source% unit_type == FPM_UNIT_SUBMODULE) then
628
- if (target % source% modules_used(j)% s .in . targets(k)% ptr% source% parent_modules) then
629
- call collect_used_modules(targets(k)% ptr)
630
- end if
631
- end if
632
- end if
633
- end do
618
+
619
+ ! Add modules from this target and from any of it's children submodules
620
+ do j= 1 ,size (target % source% modules_provided)
621
+
622
+ if (.not. (target % source% modules_provided(j)% s .in . modules_used)) then
623
+
624
+ modules_used = [modules_used, target % source% modules_provided(j)]
634
625
635
626
end if
636
627
628
+ ! Recurse into child submodules
629
+ do k= 1 ,size (targets)
630
+ if (allocated (targets(k)% ptr% source)) then
631
+ if (targets(k)% ptr% source% unit_type == FPM_UNIT_SUBMODULE) then
632
+ if (target % source% modules_provided(j)% s .in . targets(k)% ptr% source% parent_modules) then
633
+ call collect_used_modules(targets(k)% ptr)
634
+ end if
635
+ end if
636
+ end if
637
+ end do
638
+
637
639
end do
638
640
end if
639
641
You can’t perform that action at this time.
0 commit comments