Skip to content

Fix: deallocate in metapackage_t destroy() - #1192

Merged
perazz merged 1 commit into
fortran-lang:mainfrom
SamueleGiuli:fix-destroy-deallocate-dependency
Oct 11, 2025
Merged

Fix: deallocate in metapackage_t destroy()#1192
perazz merged 1 commit into
fortran-lang:mainfrom
SamueleGiuli:fix-destroy-deallocate-dependency

Conversation

@SamueleGiuli

Copy link
Copy Markdown

This PR fixes a runtime error caused by attempting to allocate an already allocated variable in the init_minpack subroutine.

The root cause was that the destroy(this) subroutine of in fpm_meta_base.f90 did not deallocate the dependency allocatable array that was previously allocated in the subroutine init_stdlib, which led to a double-allocation error when calling allocate(this%dependency(1)) inside init_minpack.

@perazz perazz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch, thank you @SamueleGiuli.

@perazz
perazz merged commit cb7ff95 into fortran-lang:main Oct 11, 2025
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants